Sirikata
|
#include <Location.hpp>
Public Member Functions | |
Location () | |
Location (const Vector3< float64 > &position, const Quaternion &orientation, const Vector3< float32 > &velocity, const Vector3< float32 > angularVelocityAxis, float32 angularVelocityRadians) | |
bool | operator== (const Location &other) const |
const Vector3< float32 > & | getVelocity () const |
void | setVelocity (const Vector3< float32 > velocity) |
const Transform & | getTransform () const |
const Vector3< float32 > & | getAxisOfRotation () const |
void | setAxisOfRotation (const Vector3< float32 > &axis) |
float32 | getAngularSpeed () const |
void | setAngularSpeed (float32 radianspersecond) |
void | addAngularRotation (const Vector3< float32 > &axis, float32 radianspersecond) |
Location | blend (const Location &newLocation, float32 percentNew) const |
Location | toWorld (const Location &reference) const |
Location | toLocal (const Location &reference) const |
template<class TimeDuration > | |
Location | extrapolate (const TimeDuration &dt) const |
Private Member Functions | |
void | changeToWorld (const Location &reference) |
void | changeToLocal (const Location &reference) |
Private Attributes | |
Vector3< float32 > | mVelocity |
Vector3< float32 > | mAxisOfRotation |
float32 | mAngularSpeed |
Sirikata::Location::Location | ( | ) | [inline] |
Referenced by blend(), and extrapolate().
Sirikata::Location::Location | ( | const Vector3< float64 > & | position, |
const Quaternion & | orientation, | ||
const Vector3< float32 > & | velocity, | ||
const Vector3< float32 > | angularVelocityAxis, | ||
float32 | angularVelocityRadians | ||
) | [inline] |
void Sirikata::Location::addAngularRotation | ( | const Vector3< float32 > & | axis, |
float32 | radianspersecond | ||
) | [inline] |
References Sirikata::Vector3< scalar >::length(), mAngularSpeed, and mAxisOfRotation.
Referenced by changeToLocal(), and changeToWorld().
void Sirikata::Location::changeToLocal | ( | const Location & | reference | ) | [inline, private] |
References addAngularRotation(), Sirikata::Vector3< scalar >::cross(), getAngularSpeed(), getAxisOfRotation(), Sirikata::Transform::getOrientation(), Sirikata::Transform::getPosition(), getVelocity(), Sirikata::Quaternion::inverse(), Sirikata::Transform::setOrientation(), Sirikata::Transform::setPosition(), setVelocity(), and toLocal().
Referenced by toLocal().
void Sirikata::Location::changeToWorld | ( | const Location & | reference | ) | [inline, private] |
References addAngularRotation(), Sirikata::Vector3< scalar >::cross(), getAngularSpeed(), getAxisOfRotation(), Sirikata::Transform::getOrientation(), Sirikata::Transform::getPosition(), getVelocity(), Sirikata::Transform::setOrientation(), Sirikata::Transform::setPosition(), setVelocity(), and toWorld().
Referenced by toWorld().
Location Sirikata::Location::extrapolate | ( | const TimeDuration & | dt | ) | const [inline] |
float32 Sirikata::Location::getAngularSpeed | ( | ) | const [inline] |
References mAngularSpeed.
Referenced by blend(), changeToLocal(), changeToWorld(), extrapolate(), Sirikata::HostedObject::objectHostConnect(), and Sirikata::operator<<().
const Vector3<float32>& Sirikata::Location::getAxisOfRotation | ( | ) | const [inline] |
References mAxisOfRotation.
Referenced by blend(), changeToLocal(), changeToWorld(), extrapolate(), Sirikata::HostedObject::objectHostConnect(), and Sirikata::operator<<().
const Transform& Sirikata::Location::getTransform | ( | ) | const [inline] |
Referenced by Sirikata::operator<<().
const Vector3<float32>& Sirikata::Location::getVelocity | ( | ) | const [inline] |
References mVelocity.
Referenced by blend(), changeToLocal(), changeToWorld(), extrapolate(), Sirikata::HostedObject::objectHostConnect(), and Sirikata::operator<<().
bool Sirikata::Location::operator== | ( | const Location & | other | ) | const [inline] |
void Sirikata::Location::setAngularSpeed | ( | float32 | radianspersecond | ) | [inline] |
References mAngularSpeed.
void Sirikata::Location::setAxisOfRotation | ( | const Vector3< float32 > & | axis | ) | [inline] |
References mAxisOfRotation.
void Sirikata::Location::setVelocity | ( | const Vector3< float32 > | velocity | ) | [inline] |
References mVelocity.
Referenced by changeToLocal(), and changeToWorld().
References changeToLocal().
Referenced by changeToLocal().
References changeToWorld().
Referenced by changeToWorld().
float32 Sirikata::Location::mAngularSpeed [private] |
Referenced by addAngularRotation(), blend(), getAngularSpeed(), operator==(), and setAngularSpeed().
Vector3<float32> Sirikata::Location::mAxisOfRotation [private] |
Referenced by addAngularRotation(), blend(), getAxisOfRotation(), operator==(), and setAxisOfRotation().
Vector3<float32> Sirikata::Location::mVelocity [private] |
Referenced by getVelocity(), operator==(), and setVelocity().