MezzanineEngine March 18, 2012

Mezzanine::Transform Class Reference

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

#include <transform.h>

List of all members.

Public Member Functions

 Transform (const Vector3 &Vec=Vector3(), const Quaternion &Quat=Quaternion())
 The multipurpose constructor.
 Transform (const btTransform &Btt)
 The Conversion Constructor.
 Transform (const Transform &TheOther)
 The copy constructor.
void ExtractBulletTransform (const btTransform &temp)
 Copies an existing Bullet transform.
btTransform GetBulletTransform () const
 Gets a Bullet Transform.
Transformoperator= (const btTransform &rhs)
 Set the values of this Transform to match an existing btTransform.
Transformoperator= (const Transform &rhs)
 Set the values of this Transform to match an existing Transform.
virtual void ProtoDeSerialize (const xml::Node &OneNode)
 Take the data stored in an XML and overwrite this instance of this object with it.
virtual void ProtoSerialize (xml::Node &CurrentRoot) const
 Convert this class to an xml::Node ready for serialization.
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.

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 53 of file transform.cpp.

Mezzanine::Transform::Transform ( const btTransform &  Btt)

The Conversion Constructor.

Parameters:
BttThe btTransform from bullet physics.

Definition at line 58 of file transform.cpp.

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

The copy constructor.

Parameters:
TheOtherAnother Transform to be copied

Definition at line 61 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 77 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 70 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 84 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.

void Mezzanine::Transform::ProtoDeSerialize ( const xml::Node OneNode) [virtual]

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 118 of file transform.cpp.

void Mezzanine::Transform::ProtoSerialize ( xml::Node CurrentRoot) const [virtual]

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 103 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 134 of file transform.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines