source: GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/IMG/IMGCluster.h @ 721

Revision 721, 1.7 KB checked in by igarcia, 19 years ago (diff)
Line 
1#ifndef _IMGCLUSTER_H
2#define _IMGCLUSTER_H
3
4#include <IMGPrerequisites.h>
5#include <IMGBBox.h>
6#include <IMGBox2d.h>
7#include <IMGPlane3.h>
8#include <IMGCluster2d.h>
9
10namespace IMG
11{
12
13class Cluster
14{
15  public:
16    Cluster();
17
18    Cluster & operator =(const Cluster & p);
19
20    Cluster(const Cluster & p);
21
22        void SetNormal(Ogre::Vector3* n);
23
24        Ogre::Vector3* GetNormal();
25
26    BBox* GetBound();
27
28    Box2d* GetBspNodeBound();
29
30    void SetBspNodeBound(Box2d* box);
31
32    void Print();
33
34    //* return the dominant normal axis, for calculate the 2d projection
35    int AxisProjected();
36
37    int GetId() const;
38
39    void SetId(int id_);
40
41        std::vector<Ogre::Vector3>* GetVector3sVector();
42
43        Ogre::Vector3* GetVector3sTex() const;
44
45    void Finish();
46
47        void SetPlane(Ogre::Vector3* normal, Ogre::Vector3 * point);
48
49    Plane3 * GetPlane();
50
51    //* Return the increment in U (lumel increment in x). For patchs calculation
52        Ogre::Vector3 GetIncU();
53
54    //* Return the increment in V (lumel increment in x). For patchs calculation
55        Ogre::Vector3 GetIncV();
56
57    //* Return the origin. For patchs calculation
58        Ogre::Vector3 GetOrigin();
59
60        bool PointIn(Ogre::Vector3 & point);
61
62        Ogre::Real *pointeru[4];
63
64        Ogre::Real *pointerv[4];
65
66        Ogre::Vector2 *uv;
67
68  private:
69    BBox bound;
70
71    Box2d bspnodebound;
72
73    static unsigned int ID_CLUSTER;
74
75        Ogre::Vector3 normal;
76
77    unsigned int id;
78
79        std::vector<Ogre::Vector3> Vector3s_vector;
80
81        Ogre::Vector3 *Vector3s;
82
83        Ogre::Vector3 *Vector3s_triangle_text;
84
85    int axisproj;
86
87    int order;
88
89    Cluster2d * triangle2d_text;
90
91        Ogre::Vector3 lumel_origin, lumel_x_axis, lumel_y_axis;
92       
93    Plane3 plane;
94
95  public:
96    virtual ~Cluster();
97
98};
99
100}
101#endif
Note: See TracBrowser for help on using the repository browser.