- Timestamp:
- Aug 23, 2005, 9:51:20 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/coord/p_node.cc
r5091 r5108 165 165 void PNode::setRelCoor (const Vector& relCoord) 166 166 { 167 if (this->toCoordinate!= NULL) 168 { 169 delete this->toCoordinate; 170 this->toCoordinate = NULL; 171 } 172 167 173 this->relCoordinate = relCoord; 168 174 this->bRelCoorChanged = true; … … 213 219 void PNode::setAbsCoor (const Vector& absCoord) 214 220 { 221 if (this->toCoordinate!= NULL) 222 { 223 delete this->toCoordinate; 224 this->toCoordinate = NULL; 225 } 226 215 227 if( likely(this->parentMode & PNODE_MOVEMENT)) 216 228 { … … 276 288 void PNode::setRelDir (const Quaternion& relDir) 277 289 { 290 if (this->toDirection!= NULL) 291 { 292 delete this->toDirection; 293 this->toDirection = NULL; 294 } 278 295 this->relDirection = relDir; 279 296 this->bRelCoorChanged = true; … … 327 344 void PNode::setAbsDir (const Quaternion& absDir) 328 345 { 346 if (this->toDirection!= NULL) 347 { 348 delete this->toDirection; 349 this->toDirection = NULL; 350 } 351 329 352 if (likely(this->parent != NULL)) 330 353 this->relDirection = absDir / this->parent->getAbsDir(); -
trunk/src/lib/graphics/render2D/element_2d.cc
r5107 r5108 214 214 void Element2D::setRelCoor2D (const Vector& relCoord) 215 215 { 216 if (this->toCoordinate!= NULL) 217 { 218 delete this->toCoordinate; 219 this->toCoordinate = NULL; 220 } 216 221 this->relCoordinate = relCoord; 217 222 this->bRelCoorChanged = true; … … 227 232 void Element2D::setRelCoor2D (float x, float y, float z) 228 233 { 229 this->set AbsCoor2D(Vector(x,y,z));234 this->setRelCoor2D(Vector(x,y,z)); 230 235 } 231 236 … … 288 293 void Element2D::setAbsCoor2D (const Vector& absCoord) 289 294 { 295 if (this->toCoordinate!= NULL) 296 { 297 delete this->toCoordinate; 298 this->toCoordinate = NULL; 299 } 300 290 301 if( likely(this->parentMode & E2D_PARENT_MOVEMENT)) 291 302 { … … 362 373 void Element2D::setRelDir2D (float relDir) 363 374 { 375 if (this->toDirection!= NULL) 376 { 377 delete this->toDirection; 378 this->toDirection = NULL; 379 } 380 364 381 this->relDirection = relDir; 365 382 this->bRelDirChanged = true; … … 386 403 void Element2D::setAbsDir2D (float absDir) 387 404 { 405 if (this->toDirection!= NULL) 406 { 407 delete this->toDirection; 408 this->toDirection = NULL; 409 } 410 388 411 if (likely(this->parent != NULL)) 389 412 this->relDirection = absDir - this->parent->getAbsDir2D(); -
trunk/src/lib/graphics/render2D/element_2d.h
r5089 r5108 108 108 /** @returns the relative position */ 109 109 inline const Vector& getRelCoor2D () const { return this->prevRelCoordinate; }; 110 /** @returns the Relative Coordinate Destination */ 111 inline const Vector& getRelCoorSoft2D() const { return (this->toCoordinate)?*this->toCoordinate:this->relCoordinate; }; 110 112 const Vector& getRelCoor2Dpx() const; 111 113 void setAbsCoor2D (const Vector& absCoord); -
trunk/src/util/shell.cc
r5107 r5108 252 252 { 253 253 Text* lastText = this->bufferText[this->bufferDisplaySize-1]; 254 Vector firstCoord = this->bufferText[0]->getRelCoor 2D();254 Vector firstCoord = this->bufferText[0]->getRelCoorSoft2D(); 255 255 256 256 Text* swapText; 257 257 Text* moveText = this->bufferText[0]; 258 this->bufferText[0]->setRelCoor 2D(this->bufferText[1]->getRelCoor2D());258 this->bufferText[0]->setRelCoorSoft2D(this->bufferText[1]->getRelCoorSoft2D(), 5); 259 259 for (unsigned int i = 1; i < this->bufferDisplaySize; i++) 260 260 { 261 261 if ( i < this->bufferDisplaySize-1) 262 this->bufferText[i]->setRelCoor 2D(this->bufferText[i+1]->getRelCoor2D());262 this->bufferText[i]->setRelCoorSoft2D(this->bufferText[i+1]->getRelCoorSoft2D(),5); 263 263 swapText = this->bufferText[i]; 264 264 this->bufferText[i] = moveText;
Note: See TracChangeset
for help on using the changeset viewer.