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 | |
---|
10 | namespace IMG |
---|
11 | { |
---|
12 | |
---|
13 | class _IMGExport Cluster |
---|
14 | { |
---|
15 | public: |
---|
16 | Cluster(); |
---|
17 | |
---|
18 | virtual ~Cluster(); |
---|
19 | |
---|
20 | Cluster & operator =(const Cluster & p); |
---|
21 | |
---|
22 | Cluster(const Cluster & p); |
---|
23 | |
---|
24 | void setNormal(Ogre::Vector3* n); |
---|
25 | |
---|
26 | Ogre::Vector3* getNormal(); |
---|
27 | |
---|
28 | BBox* getBound(); |
---|
29 | |
---|
30 | Box2d* getBspNodeBound(); |
---|
31 | |
---|
32 | void setBspNodeBound(Box2d* box); |
---|
33 | |
---|
34 | void print(); |
---|
35 | |
---|
36 | //* return the dominant normal axis, for calculate the 2d projection |
---|
37 | int axisProjected(); |
---|
38 | |
---|
39 | int getId() const; |
---|
40 | |
---|
41 | void setId(int id_); |
---|
42 | |
---|
43 | std::vector<Ogre::Vector3>* getVector3sVector(); |
---|
44 | |
---|
45 | Ogre::Vector3* getVector3sTex() const; |
---|
46 | |
---|
47 | void finish(); |
---|
48 | |
---|
49 | void setPlane(Ogre::Vector3* normal, Ogre::Vector3 * point); |
---|
50 | |
---|
51 | Plane3 * getPlane(); |
---|
52 | |
---|
53 | //* Return the increment in U (lumel increment in x). For patchs calculation |
---|
54 | Ogre::Vector3 getIncU(); |
---|
55 | |
---|
56 | //* Return the increment in V (lumel increment in x). For patchs calculation |
---|
57 | Ogre::Vector3 getIncV(); |
---|
58 | |
---|
59 | //* Return the origin. For patchs calculation |
---|
60 | Ogre::Vector3 getOrigin(); |
---|
61 | |
---|
62 | bool pointIn(Ogre::Vector3 & point); |
---|
63 | |
---|
64 | Ogre::Real *pointeru[4];
|
---|
65 |
|
---|
66 | Ogre::Real *pointerv[4];
|
---|
67 |
|
---|
68 | Ogre::Vector2 *uv; |
---|
69 | |
---|
70 | private: |
---|
71 | BBox bound; |
---|
72 | |
---|
73 | Box2d bspnodebound; |
---|
74 | |
---|
75 | static unsigned int ID_CLUSTER; |
---|
76 | |
---|
77 | Ogre::Vector3 normal; |
---|
78 | |
---|
79 | unsigned int id; |
---|
80 | |
---|
81 | std::vector<Ogre::Vector3> Vector3s_vector;
|
---|
82 |
|
---|
83 | Ogre::Vector3 *Vector3s;
|
---|
84 |
|
---|
85 | Ogre::Vector3 *Vector3s_triangle_text; |
---|
86 | |
---|
87 | int axisproj; |
---|
88 | |
---|
89 | int order; |
---|
90 | |
---|
91 | Cluster2d * triangle2d_text; |
---|
92 | |
---|
93 | Ogre::Vector3 lumel_origin, lumel_x_axis, lumel_y_axis;
|
---|
94 | |
---|
95 | Plane3 plane; |
---|
96 | |
---|
97 | }; |
---|
98 | |
---|
99 | } |
---|
100 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.