NTRT Simulator  Version: Master
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
tgPair Class Reference

#include <tgPair.h>

Inheritance diagram for tgPair:
Collaboration diagram for tgPair:

Public Member Functions

 tgPair (btVector3 from, btVector3 to)
 
 tgPair (btVector3 from, btVector3 to, std::string tags)
 
btVector3 & getFrom ()
 
const btVector3 & getFrom () const
 
void setFrom (btVector3 from)
 
btVector3 & getTo ()
 
const btVector3 & getTo () const
 
void setTo (btVector3 to)
 
void addRotation (const btVector3 &fixedPoint, const btVector3 &axis, double angle)
 
void addRotation (const btVector3 &fixedPoint, const btVector3 &fromOrientation, const btVector3 &toOrientation)
 
void addRotation (const btVector3 &fixedPoint, const btQuaternion &rotation)
 
bool operator== (const tgPair &other) const
 
void move (const btVector3 &offset)
 
void scale (const btVector3 &referencePoint, double scaleFactor)
 
void addTags (const std::string &space_separated_tags)
 
void addTags (const tgTags &tags)
 
bool hasTag (const std::string tag) const
 
bool hasAllTags (std::string tags)
 
bool hasAnyTags (const std::string tags)
 
bool hasNoTags ()
 
tgTagsgetTags ()
 
const tgTagsgetTags () const
 
void setTags (tgTags tags)
 
std::string getTagStr (std::string delim=" ") const
 

Protected Attributes

std::pair< btVector3, btVector3 > m_pair
 

Detailed Description

Change the API to std::pair<btVector3*, btVector3*>. This renames "first" to "from" and "second" to "to". The client uses non-const references.

Note
: this maintains references to btVector3& since we can have a std::pair of references in c++03
See Also
http://stackoverflow.com/questions/3769781/stdpair-of-references
Todo:
Replace with "typedef tgPair std::pair<btVector3*, btVector3*>;"

Definition at line 48 of file tgPair.h.

Constructor & Destructor Documentation

tgPair::tgPair ( btVector3  from,
btVector3  to 
)

Create a pair from two btVector3 objects.

Parameters
[in]froma btVector3
[in]toa btVector3
Todo:
Is it OK for from == to, either the same object or the same value?

Create a pair from two btVector3 objects.

Parameters
[in]froma btVector3
[in]toa btVector3
Todo:
Is it OK for from == to, either the same object or the same value?

Definition at line 40 of file tgPair.cpp.

Member Function Documentation

btVector3 & tgPair::getFrom ( )

Return the from (first) member of the pair.

Returns
the from (first) member of the pair
Warning
This will fail if the default constructor is used and setFrom() is not called first.

Definition at line 52 of file tgPair.cpp.

btVector3 & tgPair::getTo ( )

Return the to (second) member of the pair.

Returns
the to (second) member of the pair
Warning
This will fail if the default constructor is used and setTo() is not called first.

Definition at line 76 of file tgPair.cpp.

void tgPair::setFrom ( btVector3  from)

Set the from (first) member of the pair.

Parameters
[in]fromthe to (first) member of the pair

Definition at line 68 of file tgPair.cpp.

void tgPair::setTo ( btVector3  to)

Set the to (second) member of the pair.

Parameters
[in]tothe to (second) member of the pair

Definition at line 92 of file tgPair.cpp.

Member Data Documentation

std::pair<btVector3, btVector3> tgPair::m_pair
protected

The underlying representation of the pair of btVector3 objects.

Definition at line 127 of file tgPair.h.


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