My Project
ViewCullingObject.h
1 #pragma once
2 #include "BaseObject.h"
3 
4 namespace ParaEngine
5 {
6  class CShapeOBB;
7  class CShapeAABB;
8 
17  {
18  public:
19  CViewCullingObject(void);
20  virtual ~CViewCullingObject(void);
21  private:
22 
24  Vector3 m_vMin;
25  Vector3 m_vMax;
26 
28  CShapeAABB* m_pShapeAABB;
29 
31  DVector3 m_vPos;
32 
34  CShapeOBB* m_pShapeOBB;
36  Matrix4 m_mWorldTransform;
37 
39  FLOAT m_fRadius;
40  float m_bound_fY;
41  public:
42  virtual CBaseObject::_SceneObjectType GetType(){return CBaseObject::ViewCullingObject;};
43 
44  virtual float GetDepth(){return m_bound_fY;};
45  virtual float GetWidth(){return m_bound_fY;};
46  virtual FLOAT GetHeight(){return m_bound_fY;};
47 
52  virtual void SetRadius(FLOAT fRadius);
53 
57  virtual FLOAT GetRadius(){return m_fRadius;};
58 
59  virtual DVector3 GetPosition();
60 
62  virtual void SetAABB(const Vector3 *vMin, const Vector3 *vMax);
63 
67  virtual void GetOBB(CShapeOBB* obb);
68  virtual void GetAABB(CShapeAABB* aabb);
69 
75  virtual void SetTransform(Matrix4* pLocalTransform, const DVector3& pGlobalPos, float* pRotation);
76 
81  virtual void GetRenderVertices(Vector3 * pVertices, int* nNumber);
82 
84  virtual Matrix4* GetWorldTransform(Matrix4& pOut, int nRenderNumber = 0);
85  private:
87  void UpdateOBB();
88  void UpdateAABB();
89  };
90 }
virtual DVector3 GetPosition()
get object position in the world space.
Definition: ViewCullingObject.cpp:38
3-dimensional vector with double precision.
Definition: ParaDVector3.h:17
It is used for object-level view culling.
Definition: ViewCullingObject.h:16
Pure interface for CBaseObject (3D scene object) It defines basic shapes and collision detection...
Definition: IViewClippingObject.h:29
different physics engine has different winding order.
Definition: EventBinding.h:32
virtual float GetDepth()
get object depth: z axis
Definition: ViewCullingObject.h:44
virtual FLOAT GetRadius()
Definition: ViewCullingObject.h:57
virtual FLOAT GetHeight()
get object height y axis: only for object that has a Height property, usually is height of the boundi...
Definition: ViewCullingObject.h:46
virtual float GetWidth()
get object width: x axis
Definition: ViewCullingObject.h:45
Standard 3-dimensional vector.
Definition: ParaVector3.h:16
virtual void SetTransform(Matrix4 *pLocalTransform, const DVector3 &pGlobalPos, float *pRotation)
Set a local transform matrix, a global position and a facing value, according to which the object wil...
Definition: ViewCullingObject.cpp:48
virtual void GetAABB(CShapeAABB *aabb)
Definition: ViewCullingObject.cpp:209
AABB-related code.
Definition: ShapeAABB.h:11
virtual Matrix4 * GetWorldTransform(Matrix4 &pOut, int nRenderNumber=0)
get world transform
Definition: ViewCullingObject.cpp:224
Class encapsulating a standard 4x4 homogeneous matrix.
Definition: ParaMatrix4.h:23
virtual void SetRadius(FLOAT fRadius)
Set the object shape to Sphere and sphere parameters.
Definition: ViewCullingObject.cpp:158
AABB with orientation by a matrix.
Definition: ShapeOBB.h:11
virtual void GetRenderVertices(Vector3 *pVertices, int *nNumber)
this function is called by the game engine for rough object level clipped.
Definition: ViewCullingObject.cpp:91
virtual void SetAABB(const Vector3 *vMin, const Vector3 *vMax)
Set AABB information.
Definition: ViewCullingObject.cpp:42
virtual void GetOBB(CShapeOBB *obb)
get the oriented bounding box in world space.
Definition: ViewCullingObject.cpp:140