1 | |
---|
2 | #include "BBCBillboardClusterData.h" |
---|
3 | |
---|
4 | namespace BBC { |
---|
5 | |
---|
6 | BillboardClusterData::BillboardClusterData(): references(0) // initialize references to 0 |
---|
7 | { |
---|
8 | |
---|
9 | } |
---|
10 | |
---|
11 | BillboardClusterData::~BillboardClusterData() |
---|
12 | { |
---|
13 | mGroupedBillboardUVMapMaxList.clear(); |
---|
14 | mGroupedBillboardUVMapMinList.clear(); |
---|
15 | } |
---|
16 | |
---|
17 | void BillboardClusterData::setNormal(Ogre::Vector3 value) |
---|
18 | { |
---|
19 | mNormal = value; |
---|
20 | } |
---|
21 | |
---|
22 | Ogre::Vector3 BillboardClusterData::getNormal() |
---|
23 | { |
---|
24 | return mNormal; |
---|
25 | } |
---|
26 | |
---|
27 | void BillboardClusterData::setD(float value) |
---|
28 | { |
---|
29 | mD = value; |
---|
30 | } |
---|
31 | |
---|
32 | float BillboardClusterData::getD() |
---|
33 | { |
---|
34 | return mD; |
---|
35 | } |
---|
36 | |
---|
37 | void BillboardClusterData::writeBillboardClusterData(TiXmlNode *parentNode, int iBillboardGroup) |
---|
38 | { |
---|
39 | Ogre::LogManager::getSingleton().logMessage("writeBillboardClusterData method not implemented."); |
---|
40 | } |
---|
41 | |
---|
42 | void BillboardClusterData::readBillboardClusterData(TiXmlNode *parentNode, int iBillboardGroup) |
---|
43 | { |
---|
44 | Ogre::LogManager::getSingleton().logMessage("readBillboardClusterData method not implemented."); |
---|
45 | } |
---|
46 | |
---|
47 | void BillboardClusterData::generateBillboardBoundingQuad() |
---|
48 | { |
---|
49 | Ogre::LogManager::getSingleton().logMessage("generateBillboardBoundingQuad method not implemented."); |
---|
50 | } |
---|
51 | |
---|
52 | void BillboardClusterData::setEntityCluster(EntityClusterPtr value) |
---|
53 | { |
---|
54 | mEntityCluster = value; |
---|
55 | } |
---|
56 | |
---|
57 | EntityClusterPtr BillboardClusterData::getEntityCluster() |
---|
58 | { |
---|
59 | return mEntityCluster; |
---|
60 | } |
---|
61 | |
---|
62 | Ogre::Vector3 BillboardClusterData::getQuadTopLeftCorner() |
---|
63 | { |
---|
64 | return mBillboardCorners[QUAD_TOP_LEFT]; |
---|
65 | } |
---|
66 | |
---|
67 | Ogre::Vector3 BillboardClusterData::getQuadTopRightCorner() |
---|
68 | { |
---|
69 | return mBillboardCorners[QUAD_TOP_RIGHT]; |
---|
70 | } |
---|
71 | |
---|
72 | Ogre::Vector3 BillboardClusterData::getQuadBottomLeftCorner() |
---|
73 | { |
---|
74 | return mBillboardCorners[QUAD_BOTTOM_LEFT]; |
---|
75 | } |
---|
76 | |
---|
77 | Ogre::Vector3 BillboardClusterData::getQuadBottomRightCorner() |
---|
78 | { |
---|
79 | return mBillboardCorners[QUAD_BOTTOM_RIGHT]; |
---|
80 | } |
---|
81 | |
---|
82 | void BillboardClusterData::setQuadTopLeftCorner(Ogre::Vector3 topLeft) |
---|
83 | { |
---|
84 | mBillboardCorners[QUAD_TOP_LEFT] = topLeft; |
---|
85 | } |
---|
86 | |
---|
87 | void BillboardClusterData::setQuadTopRightCorner(Ogre::Vector3 topRight) |
---|
88 | { |
---|
89 | mBillboardCorners[QUAD_TOP_RIGHT] = topRight; |
---|
90 | } |
---|
91 | |
---|
92 | void BillboardClusterData::setQuadBottomLeftCorner(Ogre::Vector3 bottomLeft) |
---|
93 | { |
---|
94 | mBillboardCorners[QUAD_BOTTOM_LEFT] = bottomLeft; |
---|
95 | } |
---|
96 | |
---|
97 | void BillboardClusterData::setQuadBottomRightCorner(Ogre::Vector3 bottomRight) |
---|
98 | { |
---|
99 | mBillboardCorners[QUAD_BOTTOM_RIGHT] = bottomRight; |
---|
100 | } |
---|
101 | |
---|
102 | Ogre::Vector3 BillboardClusterData::getAxisX() |
---|
103 | { |
---|
104 | return mAxisX; |
---|
105 | } |
---|
106 | |
---|
107 | Ogre::Vector3 BillboardClusterData::getAxisY() |
---|
108 | { |
---|
109 | return mAxisY; |
---|
110 | } |
---|
111 | |
---|
112 | Ogre::Vector3 BillboardClusterData::getAxisZ() |
---|
113 | { |
---|
114 | return mAxisZ; |
---|
115 | } |
---|
116 | |
---|
117 | void BillboardClusterData::setAxisX(Ogre::Vector3 axisX) |
---|
118 | { |
---|
119 | mAxisX = axisX; |
---|
120 | } |
---|
121 | |
---|
122 | void BillboardClusterData::setAxisY(Ogre::Vector3 axisY) |
---|
123 | { |
---|
124 | mAxisY = axisY; |
---|
125 | } |
---|
126 | |
---|
127 | void BillboardClusterData::setAxisZ(Ogre::Vector3 axisZ) |
---|
128 | { |
---|
129 | mAxisZ = axisZ; |
---|
130 | } |
---|
131 | |
---|
132 | Ogre::Vector2 BillboardClusterData::getBillboardUVMapMin(unsigned int iBillboardGroup) |
---|
133 | { |
---|
134 | return mGroupedBillboardUVMapMinList[iBillboardGroup]; |
---|
135 | } |
---|
136 | |
---|
137 | void BillboardClusterData::addBillboardUVMapMin(Ogre::Vector2 minVec) |
---|
138 | { |
---|
139 | mGroupedBillboardUVMapMinList.push_back(minVec); |
---|
140 | } |
---|
141 | |
---|
142 | void BillboardClusterData::removeBillboardUVMapMin(unsigned int iBillboardGroup) |
---|
143 | { |
---|
144 | mGroupedBillboardUVMapMinList.erase(mGroupedBillboardUVMapMinList.begin() + iBillboardGroup); |
---|
145 | } |
---|
146 | |
---|
147 | Ogre::Vector2 BillboardClusterData::getBillboardUVMapMax(unsigned int iBillboardGroup) |
---|
148 | { |
---|
149 | return mGroupedBillboardUVMapMaxList[iBillboardGroup]; |
---|
150 | } |
---|
151 | |
---|
152 | void BillboardClusterData::addBillboardUVMapMax(Ogre::Vector2 maxVec) |
---|
153 | { |
---|
154 | mGroupedBillboardUVMapMaxList.push_back(maxVec); |
---|
155 | } |
---|
156 | |
---|
157 | void BillboardClusterData::removeBillboardUVMapMax(unsigned int iBillboardGroup) |
---|
158 | { |
---|
159 | mGroupedBillboardUVMapMaxList.erase(mGroupedBillboardUVMapMaxList.begin() + iBillboardGroup); |
---|
160 | } |
---|
161 | |
---|
162 | unsigned int BillboardClusterData::getNumUVMapGroups() |
---|
163 | { |
---|
164 | if (mGroupedBillboardUVMapMaxList.size() == mGroupedBillboardUVMapMinList.size()) |
---|
165 | { |
---|
166 | return mGroupedBillboardUVMapMaxList.size(); |
---|
167 | } |
---|
168 | else |
---|
169 | { |
---|
170 | return 0; |
---|
171 | } |
---|
172 | } |
---|
173 | |
---|
174 | } |
---|