| 373 | } |
| 374 | |
| 375 | MatrixF VPathObject::getTransform( void ) |
| 376 | { |
| 377 | MatrixF mat( true ); |
| 378 | switch ( mOrientationMode.Type ) |
| 379 | { |
| 380 | case k_OrientationInterpolate : |
| 381 | case k_OrientationToObject : |
| 382 | case k_OrientationToPoint : |
| 383 | case k_OrientationToPath : |
| 384 | { |
| 385 | // Y-Axis. |
| 386 | VectorF yVec = mOrientation; |
| 387 | yVec.normalize(); |
| 388 | |
| 389 | // X-Axis. |
| 390 | VectorF xVec = mCross( yVec, VPath::gBezierUp ); |
| 391 | xVec.normalize(); |
| 392 | |
| 393 | // Z-Axis. |
| 394 | VectorF zVec = mCross( xVec, yVec ); |
| 395 | zVec.normalize(); |
| 396 | |
| 397 | // Setup Object Transform. |
| 398 | mat.setColumn( 0, xVec ); |
| 399 | mat.setColumn( 1, yVec ); |
| 400 | mat.setColumn( 2, zVec ); |
| 401 | mat.setColumn( 3, getWorldPosition() ); |
| 402 | |
| 403 | } break; |
| 404 | |
| 405 | case k_OrientationFree : |
| 406 | { |
| 407 | // Fetch Current Transform. |
| 408 | mat = mObject->getTransform(); |
| 409 | mat.setPosition( getWorldPosition() ); |
| 410 | |
| 411 | } break; |
| 412 | } |
| 413 | |
| 414 | // Return. |
| 415 | return mat; |
| 416 | } |
| 417 | |
| 418 | MatrixF VPathObject::getRenderTransform( const F32 &pDelta ) |
| 419 | { |
no test coverage detected