Stores information about relative location and rotation in 3d space. More...
#include <transform.h>
Public Member Functions | |
Transform (const Vector3 &Vec=Vector3(), const Quaternion &Quat=Quaternion()) | |
The multipurpose constructor. More... | |
Transform (const btTransform &Btt) | |
The Conversion Constructor. More... | |
Transform (const Transform &TheOther) | |
The copy constructor. More... | |
void | ExtractBulletTransform (const btTransform &temp) |
Copies an existing Bullet transform. More... | |
btTransform | GetBulletTransform () const |
Gets a Bullet Transform. More... | |
Transform | operator* (Real rhs) const |
Multiply all the values of this by a single scalar. More... | |
Transform | operator+ (const Transform &rhs) const |
Create a Transform with the sum of this and another. More... | |
Transform | operator- (const Transform &rhs) const |
Create a Transform with the difference of this and another. More... | |
Transform | operator/ (Real rhs) const |
Divide all the values of this by a single scalar. More... | |
bool | operator<= (const Transform &rhs) const |
Is every value in this Transform less than or equal to its corresponding value in another. More... | |
Transform & | operator= (const Transform &rhs) |
Set the values of this Transform to match an existing Transform. More... | |
Transform & | operator= (const btTransform &rhs) |
Set the values of this Transform to match an existing btTransform. More... | |
bool | operator>= (const Transform &rhs) const |
Is every value in this Transform greater than or equal to its corresponding value in another. More... | |
void | ProtoDeSerialize (const XML::Node &OneNode) |
Take the data stored in an XML and overwrite this instance of this object with it. More... | |
void | ProtoSerialize (XML::Node &CurrentRoot) const |
Convert this class to an XML::Node ready for serialization. More... | |
void | SetIdentity () |
Sets default construction values for all members. | |
Static Public Member Functions | |
static String | SerializableName () |
Get the name of the the XML tag this class will leave behind as its instances are serialized. More... | |
Public Attributes | |
Vector3 | Location |
The location or relative location is stored in a Vector3. | |
Quaternion | Rotation |
The Rotation or relative rotation is stored in a Quaternion. | |
Stores information about relative location and rotation in 3d space.
This is simple a pair of a vector 3 to store location and a quaternion to store rotation. This is communly used to interact with the physics system. This also has a few helper functions to make it more useful than an std::pair<Vector3,Quaternion>.
Definition at line 62 of file transform.h.
Mezzanine::Transform::Transform | ( | const Vector3 & | Vec = Vector3() , |
const Quaternion & | Quat = Quaternion() |
||
) |
The multipurpose constructor.
Vec | The starting Vector#/Location you would like this transform to have. If not passed, a default Vector3 is used. |
Quat | The starting Quaternion/Rotation you would like this transform to have. If not passed, a default Quaternion is used. |
Definition at line 54 of file transform.cpp.
Mezzanine::Transform::Transform | ( | const btTransform & | Btt) |
The Conversion Constructor.
Btt | The btTransform from bullet physics. |
Definition at line 59 of file transform.cpp.
Mezzanine::Transform::Transform | ( | const Transform & | TheOther) |
The copy constructor.
TheOther | Another Transform to be copied |
Definition at line 62 of file transform.cpp.
void Mezzanine::Transform::ExtractBulletTransform | ( | const btTransform & | temp) |
Copies an existing Bullet transform.
This function will copy the values stored in an existing Bullet transform and set the values of this class instance to be the same.
temp | The btTransfrom to have its values extracted. |
Definition at line 78 of file transform.cpp.
btTransform Mezzanine::Transform::GetBulletTransform | ( | ) | const |
Gets a Bullet Transform.
Creates a Bullet Transform with values equal to this class instance and returns it.
Definition at line 71 of file transform.cpp.
Multiply all the values of this by a single scalar.
rhs | The Transform on the right hand side of the sign. |
Definition at line 142 of file transform.cpp.
Create a Transform with the sum of this and another.
rhs | The Transform on the right hand side of the sign. |
Definition at line 139 of file transform.cpp.
Create a Transform with the difference of this and another.
rhs | The Transform on the right hand side of the sign. |
Definition at line 136 of file transform.cpp.
Divide all the values of this by a single scalar.
rhs | The Transform on the right hand side of the sign. |
Definition at line 145 of file transform.cpp.
bool Mezzanine::Transform::operator<= | ( | const Transform & | rhs) | const |
Is every value in this Transform less than or equal to its corresponding value in another.
rhs | The Transform on the right hand side of the sign. |
Definition at line 148 of file transform.cpp.
Set the values of this Transform to match an existing Transform.
rhs | The item storing the values to copy. |
Definition at line 85 of file transform.cpp.
Transform & Mezzanine::Transform::operator= | ( | const btTransform & | rhs) |
Set the values of this Transform to match an existing btTransform.
rhs | The item storing the values to copy. |
Definition at line 95 of file transform.cpp.
bool Mezzanine::Transform::operator>= | ( | const Transform & | rhs) | const |
Is every value in this Transform greater than or equal to its corresponding value in another.
rhs | The Transform on the right hand side of the sign. |
Definition at line 151 of file transform.cpp.
void Mezzanine::Transform::ProtoDeSerialize | ( | const XML::Node & | OneNode) |
Take the data stored in an XML and overwrite this instance of this object with it.
OneNode | and XML::Node containing the data. |
Definition at line 117 of file transform.cpp.
void Mezzanine::Transform::ProtoSerialize | ( | XML::Node & | CurrentRoot) | const |
Convert this class to an XML::Node ready for serialization.
CurrentRoot | The point in the XML hierarchy that all this vectorw should be appended to. |
Definition at line 102 of file transform.cpp.
|
static |
Get the name of the the XML tag this class will leave behind as its instances are serialized.
Definition at line 133 of file transform.cpp.