Changeset 3675 in orxonox.OLD for orxonox/trunk/src/lib/coord
- Timestamp:
- Mar 30, 2005, 5:20:21 PM (20 years ago)
- Location:
- orxonox/trunk/src/lib/coord
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/coord/p_node.cc
r3669 r3675 142 142 \brief get relative coordinates 143 143 \returns relative coordinates to its parent 144 */ 145 Vector PNode::getRelCoor () 146 { 147 Vector r = *this->relCoordinate; /* return a copy, so it can't be modified */ 148 return r; 144 145 the reference that is returned is a pointer to the real relCoor, so don't 146 change it unless you realy know what you are doing. 147 */ 148 Vector* PNode::getRelCoor () 149 { 150 //Vector r = *this->relCoordinate; /* return a copy, so it can't be modified */ 151 return this->relCoordinate; 149 152 } 150 153 … … 166 169 167 170 /** 171 \brief set relative coordinates 172 \param relCoord relative coordinates to its parent 173 174 it is very importand, that you use this function, if you want to update the 175 relCoordinates. If you don't use this, the PNode won't recognize, that something 176 has changed and won't update the children Nodes. 177 */ 178 void PNode::setRelCoor (Vector relCoord) 179 { 180 this->bRelCoorChanged = true; 181 *this->relCoordinate = relCoord; 182 } 183 184 185 /** 168 186 \brief get absolute coordinates 169 187 \returns absolute coordinates from (0,0,0) … … 186 204 this->bAbsCoorChanged = true; 187 205 *this->absCoordinate = *absCoord; 206 } 207 208 209 210 /** 211 \param absCoord set absolute coordinate 212 213 it is very importand, that you use this function, if you want to update the 214 absCoordinates. If you don't use this, the PNode won't recognize, that something 215 has changed and won't update the children Nodes. 216 */ 217 void PNode::setAbsCoor (Vector absCoord) 218 { 219 this->bAbsCoorChanged = true; 220 *this->absCoordinate = absCoord; 188 221 } 189 222 … … 249 282 250 283 284 void PNode::setRelDir (Quaternion relDir) 285 { 286 this->bRelCoorChanged = true; 287 *this->relDirection = relDir; 288 } 289 290 251 291 /** 252 292 \brief gets the absolute direction (0,0,1) … … 272 312 *this->absDirection = *absDir; 273 313 } 314 315 316 317 /** 318 \brief sets the absolute direction (0,0,1) 319 \param absDir absolute coordinates 320 321 it is very importand, that you use this function, if you want to update the 322 absDirection. If you don't use this, the PNode won't recognize, that something 323 has changed and won't update the children Nodes. 324 */ 325 void PNode::setAbsDir (Quaternion absDir) 326 { 327 this->bAbsDirChanged = true; 328 *this->absDirection = absDir; 329 } 330 274 331 275 332 -
orxonox/trunk/src/lib/coord/p_node.h
r3644 r3675 57 57 58 58 59 Vector getRelCoor ();59 Vector* getRelCoor (); 60 60 void setRelCoor (Vector* relCoord); 61 //void setRelCoor (Vector relCoord);61 void setRelCoor (Vector relCoord); 62 62 Vector getAbsCoor (); 63 63 void setAbsCoor (Vector* absCoord); 64 //void setAbsCoor (Vector absCoord);64 void setAbsCoor (Vector absCoord); 65 65 void shiftCoor (Vector* shift); 66 66 //void shiftCoor (Vector shift); … … 68 68 Quaternion getRelDir (); 69 69 void setRelDir (Quaternion* relDir); 70 void setRelDir (Quaternion relDir); 70 71 Quaternion getAbsDir (); 71 72 void setAbsDir (Quaternion* absDir); 73 void setAbsDir (Quaternion absDir); 72 74 void shiftDir (Quaternion* shift); 73 75
Note: See TracChangeset
for help on using the changeset viewer.