git-svn-id: https://reactphysics3d.googlecode.com/svn/trunk@84 92aac97c-a6ce-11dd-a772-7fcde58d38e6

This commit is contained in:
chappuis.daniel 2009-02-10 16:05:23 +00:00
parent 314ccc4f9d
commit 85b1e36914
3 changed files with 12 additions and 4 deletions

View File

@ -63,3 +63,8 @@ void BodyState::recalculate() {
// Compute the spin quaternion // Compute the spin quaternion
spin = Quaternion(0, angularVelocity.getX(), angularVelocity.getY(), angularVelocity.getZ()) * orientation * 0.5; spin = Quaternion(0, angularVelocity.getX(), angularVelocity.getY(), angularVelocity.getZ()) * orientation * 0.5;
} }
// Overloaded operator for the multiplication with a number
BodyState BodyState::operator*(double number) const {
// TODO : Implement this method
}

View File

@ -68,6 +68,9 @@ class BodyState {
void setInertiaTensorInverse(const Matrix3x3& inertiaTensorInverse); // Set the inverse of the inertia tensor void setInertiaTensorInverse(const Matrix3x3& inertiaTensorInverse); // Set the inverse of the inertia tensor
void recalculate(); // Recalculate the secondary values of the BodyState void recalculate(); // Recalculate the secondary values of the BodyState
// Overloaded operators
BodyState operator*(double number) const; // Overloaded operator for the multiplication with a number
}; };
// --- Inlines functions --- // // --- Inlines functions --- //

View File

@ -60,22 +60,22 @@ class RigidBody : public Body {
// --- Inline functions --- // // --- Inline functions --- //
// Return the inertia tensor of the body // Return the inertia tensor of the body
Matrix3x3 RigidBody::getInertiaTensor() const { inline Matrix3x3 RigidBody::getInertiaTensor() const {
return inertiaTensor; return inertiaTensor;
} }
// Set the inertia tensor of the body // Set the inertia tensor of the body
void RigidBody::setInertiaTensor(const Matrix3x3& inertiaTensor) { inline void RigidBody::setInertiaTensor(const Matrix3x3& inertiaTensor) {
this->inertiaTensor = inertiaTensor; this->inertiaTensor = inertiaTensor;
} }
// Return the current state of the body // Return the current state of the body
BodyState RigidBody::getCurrentBodyState() const { inline BodyState RigidBody::getCurrentBodyState() const {
return currentBodyState; return currentBodyState;
} }
// Return the previous state of the body // Return the previous state of the body
BodyState RigidBody::getPreviousBodyState() const { inline BodyState RigidBody::getPreviousBodyState() const {
return previousBodyState; return previousBodyState;
} }