00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef __NESCENEENTITY_H
00028 #define __NESCENEENTITY_H
00029
00030
00037 #include "base.h"
00038 #include "updateentity.h"
00039 #include "renderentity.h"
00040 #include "visitor.h"
00041
00042
00043 namespace NeoEngine
00044 {
00045
00046
00047
00048 class SceneNode;
00049 class BoundingVolume;
00050 class ContactSet;
00051 class Ray;
00052
00053
00065 class NEOENGINE_API SceneEntity : public virtual UpdateEntity, public RenderEntity, public BaseVisitable
00066 {
00067 friend class SceneNode;
00068
00069 public:
00070
00071 DefineVisitable();
00072
00073
00074 protected:
00075
00077 SceneNode *m_pkNode;
00078
00080 BoundingVolume *m_pkBoundingVolume;
00081
00085 virtual void SetNode() {}
00086
00087
00088 public:
00089
00092 SceneEntity() : m_pkNode( 0 ), m_pkBoundingVolume( 0 ) {}
00093
00096 virtual ~SceneEntity();
00097
00101 inline SceneNode *GetSceneNode() { return m_pkNode; }
00102
00106 inline BoundingVolume *GetBoundingVolume() { return m_pkBoundingVolume; }
00107
00114 void SetBoundingVolume( BoundingVolume *pkBoundingVolume );
00115
00120 virtual SceneEntity *Duplicate() { return 0; }
00121
00129 virtual bool Intersection( BoundingVolume *pkObj, ContactSet *pkContactSet = 0, bool bInvertNormal = false ) { return false; }
00130
00137 virtual bool Intersection( const Ray &rkRay, ContactSet *pkContactSet = 0 ) { return false; }
00138 };
00139
00140
00141 };
00142
00143
00144 #endif