git-svn-id: https://reactphysics3d.googlecode.com/svn/trunk@84 92aac97c-a6ce-11dd-a772-7fcde58d38e6
This commit is contained in:
parent
314ccc4f9d
commit
85b1e36914
|
@ -63,3 +63,8 @@ void BodyState::recalculate() {
|
|||
// Compute the spin quaternion
|
||||
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
|
||||
}
|
||||
|
|
|
@ -68,6 +68,9 @@ class BodyState {
|
|||
void setInertiaTensorInverse(const Matrix3x3& inertiaTensorInverse); // Set the inverse of the inertia tensor
|
||||
|
||||
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 --- //
|
||||
|
|
|
@ -60,22 +60,22 @@ class RigidBody : public Body {
|
|||
// --- Inline functions --- //
|
||||
|
||||
// Return the inertia tensor of the body
|
||||
Matrix3x3 RigidBody::getInertiaTensor() const {
|
||||
inline Matrix3x3 RigidBody::getInertiaTensor() const {
|
||||
return inertiaTensor;
|
||||
}
|
||||
|
||||
// Set the inertia tensor of the body
|
||||
void RigidBody::setInertiaTensor(const Matrix3x3& inertiaTensor) {
|
||||
inline void RigidBody::setInertiaTensor(const Matrix3x3& inertiaTensor) {
|
||||
this->inertiaTensor = inertiaTensor;
|
||||
}
|
||||
|
||||
// Return the current state of the body
|
||||
BodyState RigidBody::getCurrentBodyState() const {
|
||||
inline BodyState RigidBody::getCurrentBodyState() const {
|
||||
return currentBodyState;
|
||||
}
|
||||
|
||||
// Return the previous state of the body
|
||||
BodyState RigidBody::getPreviousBodyState() const {
|
||||
inline BodyState RigidBody::getPreviousBodyState() const {
|
||||
return previousBodyState;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user