MezzanineEngine 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Mezzanine::Transform Class Reference

Stores information about relative location and rotation in 3d space. More...

#include <transform.h>

+ Collaboration diagram for Mezzanine::Transform:

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...
 
Transformoperator= (const Transform &rhs)
 Set the values of this Transform to match an existing Transform. More...
 
Transformoperator= (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.
 

Detailed Description

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.

Constructor & Destructor Documentation

Mezzanine::Transform::Transform ( const Vector3 Vec = Vector3(),
const Quaternion Quat = Quaternion() 
)

The multipurpose constructor.

Parameters
VecThe starting Vector#/Location you would like this transform to have. If not passed, a default Vector3 is used.
QuatThe 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.

Parameters
BttThe btTransform from bullet physics.

Definition at line 59 of file transform.cpp.

Mezzanine::Transform::Transform ( const Transform TheOther)

The copy constructor.

Parameters
TheOtherAnother Transform to be copied

Definition at line 62 of file transform.cpp.

Member Function Documentation

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.

Parameters
tempThe 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.

Transform Mezzanine::Transform::operator* ( Real  rhs) const

Multiply all the values of this by a single scalar.

Parameters
rhsThe Transform on the right hand side of the sign.
Returns
A Transform with

Definition at line 142 of file transform.cpp.

Transform Mezzanine::Transform::operator+ ( const Transform rhs) const

Create a Transform with the sum of this and another.

Parameters
rhsThe Transform on the right hand side of the sign.
Returns
A Transform with

Definition at line 139 of file transform.cpp.

Transform Mezzanine::Transform::operator- ( const Transform rhs) const

Create a Transform with the difference of this and another.

Parameters
rhsThe Transform on the right hand side of the sign.
Returns
A Transform with

Definition at line 136 of file transform.cpp.

Transform Mezzanine::Transform::operator/ ( Real  rhs) const

Divide all the values of this by a single scalar.

Parameters
rhsThe Transform on the right hand side of the sign.
Returns
A Transform with

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.

Parameters
rhsThe Transform on the right hand side of the sign.
Note
Used primarily for testing. This is not implemented for use with other kinds of Transform implementations as it is widely considered useless.

Definition at line 148 of file transform.cpp.

Transform & Mezzanine::Transform::operator= ( const Transform rhs)

Set the values of this Transform to match an existing Transform.

Parameters
rhsThe item storing the values to copy.
Returns
A reference to the freshly overwritten Transform.

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.

Parameters
rhsThe item storing the values to copy.
Returns
A reference to the freshly overwritten Transform.

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.

Parameters
rhsThe Transform on the right hand side of the sign.
Note
Used primarily for testing. This is not implemented for use with other kinds of Transform implementations as it is widely considered useless.

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.

Parameters
OneNodeand XML::Node containing the data.
Warning
A precondition of using this is that all of the actors intended for use must already be Deserialized.

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.

Parameters
CurrentRootThe point in the XML hierarchy that all this vectorw should be appended to.

Definition at line 102 of file transform.cpp.

String Mezzanine::Transform::SerializableName ( )
static

Get the name of the the XML tag this class will leave behind as its instances are serialized.

Returns
A string containing "Transform"

Definition at line 133 of file transform.cpp.


The documentation for this class was generated from the following files: