CNode.h Source File

Chapitre 1

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

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 
00015 
00016 class CNode
00017 {
00018         protected:
00019                 int                             m_NodeType;
00020                 char*                   m_Name;
00021                                 
00022         public:
00023                 // constructeurs et destructeur
00024                 CNode() { m_Name = NULL; };
00025                 CNode(int nodeType, char *name) { m_NodeType=nodeType; m_Name=name; }
00026                 virtual ~CNode() { SAFERELEASE(m_Name); }
00027                                   
00028                 // raytrace related
00029                 virtual bool IntersectsNode(const CRay& ray, CIntersectInfo *intersectInfo=NULL) = 0;
00030                                   
00031                 // get
00032                 __forceinline int                       GetNodeType() const                     { return m_NodeType; }
00033                 __forceinline const char*       GetName() const                         { return m_Name; }
00034         __forceinline           CNode*  GetNodeInstance() const         { return (CNode*)this; }    
00035                 
00036                 // set
00037                 __forceinline void      SetNodeType(int nodeType)       { m_NodeType = nodeType; }
00038                 __forceinline void      SetName(char* name)                     { m_Name = name; }
00039 };
00040 
00041 #endif /* #ifndef __CNODE_H__ */

Generated on Thu Apr 4 23:14:17 2002 by doxygen1.2.15