CNode.h
00001 00008 #ifndef __CNODE_H__ 00009 #define __CNODE_H__ 00010 00011 #include "UtilityLib.h" 00012 #include "CIntersectInfo.h" 00013 #include "CRay.h" 00014 #include "RayTracerTypes.h" 00015 00016 class CNode 00017 { 00018 protected: 00019 int mNodeType; 00020 char* mName; 00021 00022 public: 00023 // constructeurs et destructeur 00024 CNode() { mName = NULL; }; 00025 CNode(int nodeType, char *name) { mNodeType=nodeType; mName=name; } 00026 virtual ~CNode() { SAFERELEASE(mName); } 00027 00028 // raytrace related 00029 virtual bool IntersectsNode(const CRay& ray, CIntersectInfo *intersectInfo=NULL) = 0; 00030 00031 // get 00032 __forceinline int GetNodeType() const { return mNodeType; } 00033 __forceinline const char* GetName() const { return mName; } 00034 __forceinline CNode* GetNodeInstance() const { return (CNode*)this; } 00035 00036 // set 00037 __forceinline void SetNodeType(int nodeType) { mNodeType = nodeType; } 00038 __forceinline void SetName(char* name) { mName = name; } 00039 }; 00040 00041 #endif /* #ifndef __CNODE_H__ */
Generated on Fri Apr 19 16:19:34 2002 by 1.2.15