Ignore:
Timestamp:
03/31/06 17:29:32 (19 years ago)
Author:
igarcia
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/IMG/IMGCluster.h

    r700 r721  
    22#define _IMGCLUSTER_H 
    33 
    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> 
    89 
    9 namespace IMG { class Cluster2d; }  
     10namespace IMG  
     11{ 
    1012 
    11 namespace IMG { 
    12  
    13 class Cluster { 
     13class Cluster  
     14{ 
    1415  public: 
    1516    Cluster(); 
     
    1920    Cluster(const Cluster & p); 
    2021 
    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); 
    2723 
    28         inline Ogre::Vector3* GetNormal() { return &normal; }; 
     24        Ogre::Vector3* GetNormal(); 
    2925 
    30     inline BBox* GetBound() { return bound; }; 
     26    BBox* GetBound(); 
    3127 
    32     inline Box2d* GetBspNodeBound() { return bspnodebound; }; 
     28    Box2d* GetBspNodeBound(); 
    3329 
    34     inline void SetBspNodeBound(Box2d* box) { 
    35                 bspnodebound = box; 
    36         }; 
     30    void SetBspNodeBound(Box2d* box); 
    3731 
    3832    void Print(); 
     
    4135    int AxisProjected(); 
    4236 
    43     inline int GetId() const { return id; }; 
     37    int GetId() const; 
    4438 
    45     inline void SetId(int id_) { id = id;}; 
     39    void SetId(int id_); 
    4640 
    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(); 
    5142 
    52         inline Ogre::Vector3* GetVector3sTex() const { return Vector3s_triangle_text;}; 
     43        Ogre::Vector3* GetVector3sTex() const; 
    5344 
    54     // Gametools -- Isma 17/08/2005 
    55     //bool CreatePatches(bool dinamic = false); 
    56     // Gametools -- Isma 17/08/2005 
    57     //Listid *GetPatchList() { return &patchlistid;} 
    58     //Listid *GetTriangleList(){ return &trianglelistid; } 
    59     // Gametools -- Isma 17/08/2005 
    60     //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/2005 
    67     //int GetIdTriangle  (unsigned int i) 
    68     //{ 
    69     //  if (i > trianglelistid.GetSize()) return -1; 
    70     //   
    71     //  return trianglelistid.Get(i); 
    72     //} 
    7345    void Finish(); 
    7446 
    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); 
    8148 
    82     inline Plane3 * GetPlane() { return &plane; }; 
     49    Plane3 * GetPlane(); 
    8350 
    8451    //* Return the increment in U (lumel increment in x). For patchs calculation  
     
    9158        Ogre::Vector3 GetOrigin(); 
    9259 
    93     // 
    94     //  void CreateVector3s() 
    95     //  {  
    96     //           
    97     //          //Vector3s = new Vector3[4]; 
    98     //          //Vector3s_triangle_text = new Vector3[4]; 
    99     //  } 
    100     //   
    10160        bool PointIn(Ogre::Vector3 & point); 
    10261 
    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; 
    10667 
    10768  private: 
    108     BBox * bound; 
     69    BBox bound; 
    10970 
    110     Box2d * bspnodebound; 
     71    Box2d bspnodebound; 
    11172 
    11273    static unsigned int ID_CLUSTER; 
     
    11778 
    11879        std::vector<Ogre::Vector3> Vector3s_vector; 
     80 
    11981        Ogre::Vector3 *Vector3s; 
     82 
    12083        Ogre::Vector3 *Vector3s_triangle_text; 
    12184 
     
    13093    Plane3 plane; 
    13194 
    132     // Gametools -- Isma 17/08/2005 
    133     //Listid patchlistid; 
    134     //Listid trianglelistid; 
    135         int CalcPatch(Ogre::Vector3 & point); 
    136  
    137  
    13895  public: 
    139     ~Cluster(); 
     96    virtual ~Cluster(); 
    14097 
    14198}; 
Note: See TracChangeset for help on using the changeset viewer.