- Timestamp:
- 03/31/06 17:29:32 (19 years ago)
- Location:
- GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/IMG
- Files:
-
- 2 deleted
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/IMG/IMG.h
r700 r721 1 #ifndef _LBBC_H 2 #define _LBBC_H 3 4 #include <LBBCPrerequisites.h> 5 #include <LBBCRoot.h> 6 #include <LBBCLeaves.h> 7 #include <LBBCLeafKdTreeClusterData.h> 8 #include <LBBCSampleConfigFile.h> 1 #ifndef _IMG_H 2 #define _IMG_H 9 3 10 4 #endif -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/IMG/IMGBBox.h
r700 r721 27 27 class BBox: public Ogre::AxisAlignedBox { 28 28 public: 29 inline BBox() { BBox::StartBoundingBox(); }29 BBox(); 30 30 31 inline void StartBoundingBox() { 32 mMinimum.x = BOUNDINGBOX_MAXVALUE; 33 mMinimum.y = BOUNDINGBOX_MAXVALUE; 34 mMinimum.z = BOUNDINGBOX_MAXVALUE; 35 mMaximum.x = -BOUNDINGBOX_MAXVALUE; 36 mMaximum.y = -BOUNDINGBOX_MAXVALUE; 37 mMaximum.z = -BOUNDINGBOX_MAXVALUE; 38 }; 31 ~BBox(); 39 32 40 inline Ogre::Vector3 GetMinimum() { return mMinimum; } 33 void StartBoundingBox(); 41 34 42 // 43 // Vector3 * GetMinimum() 44 // { 45 // Vector3 *Vector3; 46 // 47 // Ogre::Vector3 v = mMinimum; 48 // Vector3.x = v.x; 49 // Vector3.y = v.y; 50 // Vector3.z = v.z; 51 // 52 // return v; 53 // } 54 55 inline Ogre::Vector3 GetMaximum() { return mMaximum;}; 35 Ogre::Vector3 GetMinimum(); 56 36 57 // 58 // Vector3 GetMaximum() 59 // { 60 // 61 // Vector3 Vector3; 62 // Ogre::Vector3 v = mMaximum; 63 // Vector3.x = v.x; 64 // Vector3.y = v.y; 65 // Vector3.z = v.z; 66 // return Vector3; 67 // } 68 // 69 inline void AddBoundingVector3(float x, float y, float z) { 70 if (x < mMinimum.x) mMinimum.x = x; if (x > mMaximum.x) mMaximum.x = x; 71 if (y < mMinimum.y) mMinimum.y = y; if (y > mMaximum.y) mMaximum.y = y; 72 if (z < mMinimum.z) mMinimum.z = z; if (z > mMaximum.z) mMaximum.z = z; 73 }; 37 Ogre::Vector3 GetMaximum(); 74 38 75 inline void Print() { 76 printf("\nValor de la Caixa: (%.4f, %.4f, %.4f) - (%.4f, %.4f, %.4f)\n\n", mMinimum.x, mMinimum.y, mMinimum.z, mMaximum.x, mMaximum.y, mMaximum.z); 77 }; 39 void AddBoundingVector3(float x, float y, float z); 78 40 79 //Ogre::Vector3* GetCorner (int corner) const 80 inline Ogre::Vector3 * GetCorner(int corner) const { 81 82 //if (corner < 0 || corner > 7) return Ogre::Vector3 (-1111111111, -1111111111, -1111111111); 83 //return Ogre::AxisAlignedBox::getAllCorners ()[corner]; 84 //printf("\nGetCorner: %d", corner); 85 86 if (corner < 0 || corner > 7) return NULL; 87 88 Ogre::Vector3 *vector; 89 switch (corner) 90 { 91 /* 92 case BOX_CORNER_xyz: return vector = new Ogre::Vector3(mMinimum.x, mMinimum.y, mMinimum.z ); 93 case BOX_CORNER_xyZ: return vector = new Ogre::Vector3(mMinimum.x, mMinimum.y, mMaximum.z ); 94 case BOX_CORNER_xYz: return vector = new Ogre::Vector3(mMinimum.x, mMaximum.y, mMinimum.z ); 95 case BOX_CORNER_xYZ: return vector = new Ogre::Vector3(mMinimum.x, mMaximum.y, mMaximum.z ); 96 case BOX_CORNER_Xyz: return vector = new Ogre::Vector3(mMaximum.x, mMinimum.y, mMinimum.z ); 97 case BOX_CORNER_XyZ: return vector = new Ogre::Vector3(mMaximum.x, mMinimum.y, mMaximum.z ); 98 case BOX_CORNER_XYz: return vector = new Ogre::Vector3(mMaximum.x, mMaximum.y, mMinimum.z ); 99 case BOX_CORNER_XYZ: return vector = new Ogre::Vector3(mMaximum.x, mMaximum.y, mMaximum.z ); 100 */ 101 case BOX_CORNER_xyz: vector = new Ogre::Vector3(mMinimum.x, mMinimum.y, mMinimum.z ); break; 102 case BOX_CORNER_xyZ: vector = new Ogre::Vector3(mMinimum.x, mMinimum.y, mMaximum.z ); break; 103 case BOX_CORNER_xYz: vector = new Ogre::Vector3(mMinimum.x, mMaximum.y, mMinimum.z ); break; 104 case BOX_CORNER_xYZ: vector = new Ogre::Vector3(mMinimum.x, mMaximum.y, mMaximum.z ); break; 105 case BOX_CORNER_Xyz: vector = new Ogre::Vector3(mMaximum.x, mMinimum.y, mMinimum.z ); break; 106 case BOX_CORNER_XyZ: vector = new Ogre::Vector3(mMaximum.x, mMinimum.y, mMaximum.z ); break; 107 case BOX_CORNER_XYz: vector = new Ogre::Vector3(mMaximum.x, mMaximum.y, mMinimum.z ); break; 108 case BOX_CORNER_XYZ: vector = new Ogre::Vector3(mMaximum.x, mMaximum.y, mMaximum.z ); break; 109 } 110 111 //vector->Print(); 112 return vector; 113 }; 41 void Print(); 114 42 115 inline bool intersects(Ogre::Vector3 * v) { 116 return Ogre::AxisAlignedBox::intersects(*v); 117 }; 43 Ogre::Vector3 GetCorner(int corner) const; 118 44 119 ~BBox();45 bool intersects(Ogre::Vector3 v); 120 46 121 47 }; -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/IMG/IMGBox2d.h
r700 r721 2 2 #define _IMGBOX2D_H 3 3 4 #include "IMGBBox.h"4 #include <IMGBBox.h> 5 5 6 6 namespace IMG { 7 7 8 8 //* this class represents a 2d bound box for a texture 9 class Box2d { 10 public: 11 inline Box2d() { 12 mMinimum.x = BOUNDINGBOX_MAXVALUE; 13 mMinimum.y = BOUNDINGBOX_MAXVALUE; 14 15 mMaximum.x = -BOUNDINGBOX_MAXVALUE; 16 mMaximum.y = -BOUNDINGBOX_MAXVALUE; 17 }; 9 class Box2d 10 { 11 public: 12 Box2d(); 18 13 19 // GametoolsError -- Isma 17/08/2005 20 inline Box2d & operator =(const Box2d & p) { 21 mMinimum = p.mMinimum; 22 mMaximum = p.mMaximum; 23 }; 14 ~Box2d(); 24 15 25 inline Ogre::Vector2 GetMinimum() { 26 return mMinimum; 27 }; 16 // GametoolsError -- Isma 17/08/2005 17 Box2d & Box2d::operator =(const Box2d & p) 18 { 19 mMinimum = p.mMinimum; 20 mMaximum = p.mMaximum; 21 return (*this); 22 } 28 23 29 inline Ogre::Vector2 GetMaximum() { 30 return mMaximum; 31 }; 24 Ogre::Vector2 GetMinimum(); 32 25 33 inline void SetBoundBox(float x, float y, float X, float Y) { 34 mMinimum.x = x; 35 mMinimum.y = y; 36 mMaximum.x = X; 37 mMaximum.y = Y; 38 }; 26 Ogre::Vector2 GetMaximum(); 39 27 40 inline void AddBoundingVector3(float x, float y) { 41 if (x < mMinimum.x) mMinimum.x = x; if (x > mMaximum.x) mMaximum.x = x; 42 if (y < mMinimum.y) mMinimum.y = y; if (y > mMaximum.y) mMaximum.y = y; 43 }; 28 void SetBoundBox(float x, float y, float X, float Y); 44 29 45 inline void Print() { 46 printf("\nValor de la Caixa: (%.4f, %.4f) - (%.4f, %.4f)", mMinimum.x, mMinimum.y, mMaximum.x, mMaximum.y); 47 }; 30 void AddBoundingVector3(float x, float y); 48 31 49 inline Ogre::Vector2 * GetCorner(int corner) const { 50 51 //if (corner < 0 || corner > 7) return Ogre::Vector3 (-1111111111, -1111111111, -1111111111); 52 //return Ogre::AxisAlignedBox::getAllCorners ()[corner]; 53 //printf("\nGetCorner: %d", corner); 54 55 if (corner < 0 || corner > 4) return NULL; 56 57 Ogre::Vector2 *vector; 58 switch (corner) 59 { 60 case BOX_CORNER_xy: vector = new Ogre::Vector2(mMinimum.x, mMinimum.y ); break; 61 case BOX_CORNER_xY: vector = new Ogre::Vector2(mMinimum.x, mMaximum.y ); break; 62 case BOX_CORNER_Xy: vector = new Ogre::Vector2(mMaximum.x, mMinimum.y ); break; 63 case BOX_CORNER_XY: vector = new Ogre::Vector2(mMaximum.x, mMaximum.y ); break; 64 65 } 66 67 return vector; 68 }; 32 void Print(); 69 33 70 inline bool In(int w, int h) { 71 if (w <= (mMaximum.x - mMinimum.x) && 72 h <= (mMaximum.y - mMinimum.y)) return true; 73 74 return false; 75 }; 34 Ogre::Vector2 GetCorner(int corner) const; 76 35 77 inline bool FitPerfect(int w, int h) { 78 if (w == (mMaximum.x - mMinimum.x) && 79 h == (mMaximum.y - mMinimum.y)) return true; 80 81 return false; 82 }; 36 bool In(int w, int h); 83 37 84 ~Box2d();38 bool FitPerfect(int w, int h); 85 39 86 pr ivate:40 protected: 87 41 Ogre::Vector2 mMinimum, mMaximum; 88 42 }; -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/IMG/IMGBsp.h
r700 r721 9 9 class Bsp { 10 10 public: 11 inline Bsp() : root(NULL), countleaf(0), counttotal(0){};11 Bsp(); 12 12 13 inline void SetRoot(NodeBsp * node) { 14 root = node; 15 counttotal++; 16 }; 13 virtual ~Bsp(); 17 14 18 inline void Print() { 19 printf("\nImprimint Arbre BSP, num nodes leaf: %d, totals: %d", countleaf, counttotal); 20 Print(root); 21 }; 15 void SetRoot(NodeBspPtr node); 22 16 23 inline void PrintLeaf() { 24 PrintLeaf(root); 25 }; 17 void Print(); 26 18 27 inline NodeBsp * Insert(int w, int h, int idcluster) { 28 //printf("\nInsret dins Bsp: %d, %d", w, h); 29 30 NodeBsp *node = root->Insert (w,h); 31 32 //printf("\nNode on s'insertarà finalment éS: "); node->Print(); 33 34 if (idcluster != -1) 35 { 36 node->SetId (idcluster); 37 countleaf++; 38 } 39 else counttotal++; 40 41 //Copiar pixels de la imatge al node 42 43 return node; 44 }; 19 void PrintLeaf(); 45 20 46 inline NodeBsp * Get(int i) { 47 return root->Get (root, i); 48 }; 21 NodeBspPtr Insert(int w, int h, int idcluster); 49 22 23 NodeBspPtr Get(int i); 50 24 51 pr ivate:52 NodeBsp *root;25 protected: 26 NodeBspPtr root; 53 27 54 28 int countleaf; … … 56 30 int counttotal; 57 31 58 inline void Print(NodeBsp * node) { 59 if (!node) return; 60 node->Print(); 61 Print(node->GetChild(0)); 62 Print(node->GetChild(1)); 63 }; 32 void Print(NodeBspPtr node); 64 33 65 inline void PrintLeaf(NodeBsp * node) { 66 if (!node) return; 67 68 69 if (node->GetChild(0) == NULL && node->GetChild(1) == NULL) node->Print(); 70 71 PrintLeaf (node->GetChild(0)); 72 PrintLeaf (node->GetChild(1)); 73 74 }; 75 76 77 public: 78 ~Bsp(); 34 void PrintLeaf(NodeBspPtr node); 79 35 80 36 }; -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/IMG/IMGCluster.h
r700 r721 2 2 #define _IMGCLUSTER_H 3 3 4 #include "IMGPrerequisites.h" 5 #include "IMGBBox.h" 6 #include "IMGBox2d.h" 7 #include "IMGPlane3.h" 4 #include <IMGPrerequisites.h> 5 #include <IMGBBox.h> 6 #include <IMGBox2d.h> 7 #include <IMGPlane3.h> 8 #include <IMGCluster2d.h> 8 9 9 namespace IMG { class Cluster2d; } 10 namespace IMG 11 { 10 12 11 namespace IMG { 12 13 class Cluster { 13 class Cluster 14 { 14 15 public: 15 16 Cluster(); … … 19 20 Cluster(const Cluster & p); 20 21 21 // Gametools -- Isma 17/08/2005 22 //void Insert (Triangle *t); 23 // Gametools -- Isma 17/08/2005 24 //* return the patchs that the point is in 25 //int CalculaPatch (Vector3 &point); 26 inline void SetNormal(Ogre::Vector3* n) { normal = *n; }; 22 void SetNormal(Ogre::Vector3* n); 27 23 28 inline Ogre::Vector3* GetNormal() { return &normal; };24 Ogre::Vector3* GetNormal(); 29 25 30 inline BBox* GetBound() { return bound; };26 BBox* GetBound(); 31 27 32 inline Box2d* GetBspNodeBound() { return bspnodebound; };28 Box2d* GetBspNodeBound(); 33 29 34 inline void SetBspNodeBound(Box2d* box) { 35 bspnodebound = box; 36 }; 30 void SetBspNodeBound(Box2d* box); 37 31 38 32 void Print(); … … 41 35 int AxisProjected(); 42 36 43 in line int GetId() const { return id; };37 int GetId() const; 44 38 45 inline void SetId(int id_) { id = id;};39 void SetId(int id_); 46 40 47 //Vector3 * GetVector3s() const{ return Vector3s;} 48 //Vector3 * GetVector3s(); 49 //Vector3 * GetVector3s() { return Vector3s_triangle_text; } 50 inline std::vector<Ogre::Vector3>* GetVector3sVector() { return &Vector3s_vector; }; 41 std::vector<Ogre::Vector3>* GetVector3sVector(); 51 42 52 inline Ogre::Vector3* GetVector3sTex() const { return Vector3s_triangle_text;};43 Ogre::Vector3* GetVector3sTex() const; 53 44 54 // Gametools -- Isma 17/08/200555 //bool CreatePatches(bool dinamic = false);56 // Gametools -- Isma 17/08/200557 //Listid *GetPatchList() { return &patchlistid;}58 //Listid *GetTriangleList(){ return &trianglelistid; }59 // Gametools -- Isma 17/08/200560 //int GetIdPatch (unsigned int i)61 //{62 // if (i > patchlistid.GetSize()) return -1;63 //64 // return patchlistid.Get(i);65 //}66 // Gametools -- Isma 17/08/200567 //int GetIdTriangle (unsigned int i)68 //{69 // if (i > trianglelistid.GetSize()) return -1;70 //71 // return trianglelistid.Get(i);72 //}73 45 void Finish(); 74 46 75 inline void SetPlane(Ogre::Vector3* normal, Ogre::Vector3 * point) { 76 plane.normal = *normal; 77 plane.normal = -plane.normal; 78 plane.d = -normal->dotProduct (*point); 79 //plane.d = normal->dotProduct (*point); 80 }; 47 void SetPlane(Ogre::Vector3* normal, Ogre::Vector3 * point); 81 48 82 inline Plane3 * GetPlane() { return &plane; };49 Plane3 * GetPlane(); 83 50 84 51 //* Return the increment in U (lumel increment in x). For patchs calculation … … 91 58 Ogre::Vector3 GetOrigin(); 92 59 93 //94 // void CreateVector3s()95 // {96 //97 // //Vector3s = new Vector3[4];98 // //Vector3s_triangle_text = new Vector3[4];99 // }100 //101 60 bool PointIn(Ogre::Vector3 & point); 102 61 103 Ogre::Real *pointeru[4]; //coordentate u for obscurancemap 104 Ogre::Real *pointerv[4]; //coordentate v for obscurancemap 105 Ogre::Vector2 *uv; //Vector3 coordenates for the original texture 62 Ogre::Real *pointeru[4]; 63 64 Ogre::Real *pointerv[4]; 65 66 Ogre::Vector2 *uv; 106 67 107 68 private: 108 BBox *bound;69 BBox bound; 109 70 110 Box2d *bspnodebound;71 Box2d bspnodebound; 111 72 112 73 static unsigned int ID_CLUSTER; … … 117 78 118 79 std::vector<Ogre::Vector3> Vector3s_vector; 80 119 81 Ogre::Vector3 *Vector3s; 82 120 83 Ogre::Vector3 *Vector3s_triangle_text; 121 84 … … 130 93 Plane3 plane; 131 94 132 // Gametools -- Isma 17/08/2005133 //Listid patchlistid;134 //Listid trianglelistid;135 int CalcPatch(Ogre::Vector3 & point);136 137 138 95 public: 139 ~Cluster();96 virtual ~Cluster(); 140 97 141 98 }; -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/IMG/IMGCluster2d.h
r700 r721 2 2 #define _IMGCLUSTER2D_H 3 3 4 #include "IMGCluster.h"4 #include <IMGPrerequisites.h> 5 5 6 6 namespace IMG { 7 7 8 class Cluster; 9 8 10 class Cluster2d { 9 11 public: 10 inline Cluster2d() { 11 Vector3s = NULL; 12 cluster =NULL; 13 normal = NULL; 14 }; 12 Cluster2d(); 13 14 virtual ~Cluster2d(); 15 15 16 16 //* Create a 2d polygon from a polygon 3d. The projecte polygon is belong the dominant normal. … … 21 21 void Print(); 22 22 23 inline Ogre::Vector2 * GetVector3s() { return Vector3s; }23 Ogre::Vector2 * GetVector3s(); 24 24 25 inline std::vector<Ogre::Vector2> * GetVector3sVector() { return &Vector3s2_vector; }25 std::vector<Ogre::Vector2> * GetVector3sVector(); 26 26 27 inline Ogre::Vector3 * GetNormal() { return normal; }27 Ogre::Vector3 * GetNormal(); 28 28 29 protected: 29 30 30 private:31 31 unsigned int id; 32 32 … … 34 34 35 35 Ogre::Vector2 *Vector3s; 36 36 37 std::vector<Ogre::Vector2> Vector3s2_vector; 37 38 38 39 Ogre::Vector3 *normal; 39 40 public:41 ~Cluster2d();42 40 43 41 }; -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/IMG/IMGClusterList.h
r709 r721 7 7 namespace IMG { 8 8 9 //* 10 // ClusterList 11 //* 12 class ClusterList { 9 class ClusterList 10 { 13 11 public: 14 inline ClusterList() { 15 list.reserve(100); 16 }; 12 ClusterList(); 17 13 18 //std::vector<Polygon*> * GetList() { return &list;} //return the pointer to the list of voxels 19 inline std::vector<Cluster> * GetList() { return &list;}; 14 virtual ~ClusterList(); 15 16 std::vector<Cluster> * GetList(); 20 17 21 18 //return the pointer to the list of voxels 22 inline unsigned int GetSize() const { return list.size(); }19 unsigned int GetSize() const; 23 20 24 21 //return the number of elements of list 25 inline Cluster * Get(unsigned int i) { 26 if (i <= list.size()) return &list[i]; 27 //if (i <= list.size()) return list[i]; 28 return NULL; 29 }; 22 Cluster * Get(unsigned int i); 30 23 31 24 bool Insert(Cluster * p); … … 34 27 35 28 36 private: 29 protected: 30 37 31 std::vector<Cluster> list; 38 39 public:40 ~ClusterList();41 32 42 33 }; -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/IMG/IMGNodeBsp.h
r700 r721 7 7 namespace IMG { 8 8 9 class NodeBsp { 9 // Fordward declaration... 10 class NodeBsp; 11 12 typedef ::boost::intrusive_ptr<NodeBsp> NodeBspPtr; 13 14 namespace boost 15 { 16 void intrusive_ptr_add_ref(NodeBsp * p); 17 void intrusive_ptr_release(NodeBsp * p); 18 }; 19 20 class NodeBsp 21 { 10 22 public: 11 23 NodeBsp(); 12 24 13 Box2d * GetBound();25 virtual ~NodeBsp(); 14 26 15 inline void SetBound(Box2d * box) { bound = box; };27 Box2d* GetBound(); 16 28 17 inline NodeBsp * GetChild(int i) { return child[i]; };29 void SetBound(Box2d *box); 18 30 19 inline void SetId(int id_) { id = id_; };31 NodeBspPtr GetChild(int i); 20 32 21 inline unsigned int GetId() const { return id; };33 void SetId(int id_); 22 34 23 inline void SetChild(NodeBsp * node, int i) { child[i] = node; }; 35 unsigned int GetId() const; 36 37 void SetChild(NodeBspPtr node, int i); 24 38 25 39 void Print(); 26 40 27 //void SetPlane (Plane3 *pla) { plane = pla; } 28 //Plane3 * GetPlane () { return plane; } 29 NodeBsp * Insert(int w, int h); 41 NodeBspPtr Insert(int w, int h); 30 42 31 inline NodeBsp * Get(NodeBsp * node, int i) { 32 if (!node) return NULL; 33 if (node->GetId() == i ) return node; 34 35 NodeBsp *nod; 36 if (nod = node->GetChild(0)->Get (node->GetChild(0), i)) return nod; 37 38 return node->GetChild(0)->Get (node->GetChild(1), i); 39 40 }; 43 NodeBspPtr Get(NodeBspPtr node, int i); 41 44 45 protected: 42 46 43 private:44 47 bool fit; 45 48 46 Box2d *bound;49 Box2d bound; 47 50 48 NodeBsp *child[2];51 NodeBspPtr child[2]; 49 52 50 53 static unsigned int ID; … … 52 55 int id; 53 56 57 private: 58 59 long references; 54 60 55 public: 56 ~NodeBsp(); 61 friend void boost::intrusive_ptr_add_ref(NodeBsp * p); 57 62 63 friend void boost::intrusive_ptr_release(NodeBsp * p); 58 64 }; 65 66 // class specific addref/release implementation 67 // the two function overloads must be in the boost namespace on most compilers: 68 namespace boost 69 { 70 inline void intrusive_ptr_add_ref(NodeBsp * p) 71 { 72 // increment reference count of object *p 73 ++(p->references); 74 } 75 76 77 78 inline void intrusive_ptr_release(NodeBsp * p) 79 { 80 // decrement reference count, and delete object when reference count reaches 0 81 if (--(p->references) == 0) 82 delete p; 83 } 84 } // namespace boost 59 85 60 86 } -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/IMG/IMGPlane3.h
r700 r721 2 2 #define _IMGPLANE3_H 3 3 4 #include "IMGPrerequisites.h"4 #include <IMGPrerequisites.h> 5 5 6 6 namespace IMG { … … 9 9 public: 10 10 //a plane's interface 11 //Plane(); 12 //~Plane(); 13 inline Plane3 & operator =(const Plane3 & p) { 14 normal.x = p.normal.x; 15 normal.y = p.normal.y; 16 normal.z = p.normal.z; 17 d = p.d; 18 return *this; 19 }; 11 Plane3(); 20 12 21 inline Ogre::Vector3 * GetNormal() { 22 Ogre::Vector3 *v = new Ogre::Vector3; 23 v->x = normal.x; 24 v->y = normal.y; 25 v->z = normal.z; 26 return v; 27 }; 13 virtual ~Plane3(); 28 14 29 inline void SetNormal(float x, float y, float z) { 30 normal.x = x; 31 normal.y = y; 32 normal.z = z; 33 }; 15 Plane3 & operator =(const Plane3 & p); 34 16 35 inline void SetDistance(float dist) { 36 d = dist; 37 }; 17 Ogre::Vector3 * GetNormal(); 38 18 39 inline float GetDistance() const { return d;};19 void SetNormal(float x, float y, float z); 40 20 41 inline void Print() { 42 printf("\nPrintant pla: (%.4f, %.4f, %.4f, %.4f)", normal.x, normal.y, normal.z, d); 43 }; 21 void SetDistance(float dist); 44 22 45 ~Plane3(); 23 float GetDistance() const; 24 25 void Print(); 46 26 47 27 }; -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/IMG/IMGPrerequisites.h
r700 r721 9 9 #include <OgreAxisAlignedBox.h> 10 10 11 #include <boost/smart_ptr.hpp> 12 11 13 #endif
Note: See TracChangeset
for help on using the changeset viewer.