Renmaged getKartTransform to getAlignedTransform (which

describes better what this function does).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7652 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2011-02-07 11:28:46 +00:00
parent 700093eb4d
commit 3bf48d9567
5 changed files with 6 additions and 6 deletions

View File

@ -99,7 +99,7 @@ Cake::Cake (Kart *kart) : Flyable(kart, PowerupManager::POWERUP_CAKE)
m_target = NULL;
// kart is too far to be hit. so throw the projectile in a generic way,
// straight ahead, without trying to hit anything in particular
trans = kart->getKartTransform(pitch);
trans = kart->getAlignedTransform(pitch);
m_initial_velocity = Vec3(0.0f, up_velocity, m_speed);

View File

@ -157,7 +157,7 @@ void Flyable::createPhysics(float forw_offset, const Vec3 &velocity,
const btTransform* custom_direction)
{
// Get Kart heading direction
btTransform trans = ( !custom_direction ? m_owner->getKartTransform()
btTransform trans = ( !custom_direction ? m_owner->getAlignedTransform()
: *custom_direction );
// Apply offset

View File

@ -71,7 +71,7 @@ Plunger::Plunger(Kart *kart) : Flyable(kart, PowerupManager::POWERUP_PLUNGER)
getClosestKart(&closest_kart, &kart_dist_2, &direction,
kart /* search in front of this kart */, m_reverse_mode);
btTransform kart_transform = kart->getKartTransform();
btTransform kart_transform = kart->getAlignedTransform();
btMatrix3x3 kart_rotation = kart_transform.getBasis();
// The current forward vector is rotation*(0,0,1), or:
btVector3 forward(kart_rotation.getColumn(2));

View File

@ -178,7 +178,7 @@ void Kart::setController(Controller *controller)
* otherwise).
* \param customPitch Pitch value to overwrite the terrain pitch.
*/
btTransform Kart::getKartTransform(const float customPitch)
btTransform Kart::getAlignedTransform(const float customPitch)
{
btTransform trans = getTrans();
@ -189,7 +189,7 @@ btTransform Kart::getKartTransform(const float customPitch)
trans.setBasis(m);
return trans;
} // getKartTransform
} // getAlignedTransform
// ----------------------------------------------------------------------------
/** Creates the physical representation of this kart. Atm it uses the actual

View File

@ -304,7 +304,7 @@ public:
/** Returns a bullet transform object located at the kart's position
and oriented in the direction the kart is going. Can be useful
e.g. to calculate the starting point and direction of projectiles. */
btTransform getKartTransform(const float customPitch=-1);
btTransform getAlignedTransform(const float customPitch=-1);
// -------------------------------------------------------------------------
/** Returns the color used for this kart. */
const video::SColor &getColor() const