NTRT Simulator
Version: Master
|
#include <tgGhostInfo.h>
Public Member Functions | |
tgGhostInfo (const tgBox::Config &config) | |
tgGhostInfo (const tgBox::Config &config, tgTags tags) | |
tgGhostInfo (const tgBox::Config &config, const tgPair &pair) | |
tgGhostInfo (const tgBox::Config &config, tgTags tags, const tgPair &pair) | |
virtual | ~tgGhostInfo () |
tgRigidInfo * | createRigidInfo (const tgPair &pair) |
virtual void | initRigidBody (tgWorld &world) |
virtual tgModel * | createModel (tgWorld &world) |
virtual tgRigidInfo * | createRigidInfo (const tgNode &node) |
virtual tgRigidInfo * | createRigidInfo (const tgNode &node, const tgTagSearch &tagSearch) |
virtual tgRigidInfo * | createRigidInfo (const tgPair &pair, const tgTagSearch &tagSearch) |
const tgBox::Config & | getConfig () const |
const btVector3 & | getFrom () const |
const btVector3 & | getTo () const |
virtual btCollisionShape * | getCollisionShape (tgWorld &world) const |
virtual btTransform | getTransform () const |
virtual double | getMass () const |
virtual btVector3 | getCenterOfMass () const |
virtual btVector3 | getConnectionPoint (const btVector3 &referencePoint, const btVector3 &destinationPoint) const |
virtual btVector3 | getConnectionPoint (const btVector3 &referencePoint, const btVector3 &destinationPoint, const double rotation) const |
virtual tgCompoundRigidInfo * | getCompound () |
virtual const tgCompoundRigidInfo * | getCompound () const |
virtual std::set< tgRigidInfo * > | getLeafRigids () |
virtual bool | containsNode (const btVector3 &nodeVector) const |
virtual std::set< btVector3 > | getContainedNodes () const |
double | getLength () const |
virtual std::vector < tgRigidInfo * > | createRigidInfos (const tgNodes &nodes, const tgTagSearch &tagSearch) |
virtual std::vector < tgRigidInfo * > | createRigidInfos (const tgPairs &pairs, const tgTagSearch &tagSearch) |
void | setCollisionShape (btCollisionShape *p_btCollisionShape) |
virtual tgRigidInfo * | getRigidInfoGroup () |
virtual const tgRigidInfo * | getRigidInfoGroup () const |
virtual void | setRigidInfoGroup (tgRigidInfo *rigidInfoGroup) |
virtual btRigidBody * | getRigidBody () |
virtual const btRigidBody * | getRigidBody () const |
virtual void | setRigidBody (btRigidBody *rigidBody) |
virtual btCollisionObject * | getCollisionObject () |
virtual const btCollisionObject * | getCollisionObject () const |
virtual void | setCollisionObject (btCollisionObject *collisionObject) |
bool | isCompound () const |
virtual bool | sharesNodesWith (const tgRigidInfo &other) const |
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 () |
tgTags & | getTags () |
const tgTags & | getTags () const |
void | setTags (tgTags tags) |
std::string | getTagStr (std::string delim=" ") const |
Protected Attributes | |
btCollisionShape * | m_collisionShape |
tgRigidInfo * | m_rigidInfoGroup |
btCollisionObject * | m_collisionObject |
Builds off of tgRigidInfo and tgBoxInfo, but creates ghost objects instead of rigid bodies. Needs to be in its own seperate structure, so these don't get accidentally compounded with rigid objects. Used by MuscleNP and tgMultiPointStringInfo
Definition at line 60 of file tgGhostInfo.h.
tgGhostInfo::tgGhostInfo | ( | const tgBox::Config & | config | ) |
Construct a tgBoxInfo with just a config. The pair must be filled in later, or factory methods can be used to create instances with pairs.
Definition at line 47 of file tgGhostInfo.cpp.
tgGhostInfo::tgGhostInfo | ( | const tgBox::Config & | config, |
tgTags | tags | ||
) |
Construct a tgBoxInfo with just a config and tags. The pair must be filled in later, or factory methods can be used to create instances with pairs.
Definition at line 51 of file tgGhostInfo.cpp.
tgGhostInfo::tgGhostInfo | ( | const tgBox::Config & | config, |
const tgPair & | pair | ||
) |
Construct a tgBoxInfo from its endpoints, radius and density.
[in] | from | one endpoint |
[in] | to | the other endpoint |
[in] | config | contains the radius and density |
Definition at line 55 of file tgGhostInfo.cpp.
tgGhostInfo::tgGhostInfo | ( | const tgBox::Config & | config, |
tgTags | tags, | ||
const tgPair & | pair | ||
) |
Construct a tgBoxInfo from its endpoints, radius and density.
[in] | from | one endpoint |
[in] | to | the other endpoint |
[in] | config | contains the radius and density |
Definition at line 59 of file tgGhostInfo.cpp.
|
inlinevirtual |
World will destroy the rigid body
Definition at line 98 of file tgGhostInfo.h.
|
inlinevirtualinherited |
Is the given vector either of the endpoints?
true | if nodeVector is either endpoint |
false | if nodeVector is neither endpoint |
Implements tgRigidInfo.
Reimplemented in tgBoxMoreAnchorsInfo.
Definition at line 198 of file tgBoxInfo.h.
|
virtual |
Create a tgRigidInfo* from a tgPair
Reimplemented from tgRigidInfo.
Definition at line 63 of file tgGhostInfo.cpp.
|
inlinevirtualinherited |
Return the Box's center of mass. The center of mass is a point halfway between the endpoints.
Implements tgRigidInfo.
Definition at line 141 of file tgBoxInfo.h.
|
inlinevirtualinherited |
Return a pointer to the collisionObject without upcasting
Reimplemented in tgCompoundRigidInfo.
Definition at line 190 of file tgRigidInfo.h.
|
inlinevirtualinherited |
Return a pointer to the collisionObject without upcasting
Reimplemented in tgCompoundRigidInfo.
Definition at line 199 of file tgRigidInfo.h.
|
virtualinherited |
Return a pointer to the corresponding btCollisionShape, lazily creating it if it does not exist.
Implements tgRigidInfo.
Definition at line 100 of file tgBoxInfo.cpp.
|
inlinevirtualinherited |
Since a Box is not a compound shape, there is no compound shape object to return.
NULL |
Implements tgRigidInfo.
Definition at line 176 of file tgBoxInfo.h.
|
inlinevirtualinherited |
Since a Box is not a compound shape, there is no compound shape object to return.
NULL |
Implements tgRigidInfo.
Definition at line 183 of file tgBoxInfo.h.
|
inlineinherited |
Return a const reference to the container of the radius and density.
Definition at line 107 of file tgBoxInfo.h.
|
virtualinherited |
Return the surface point closest to the reference point in the direction of the destination point.
[in] | referencePoint | a btVector |
[in] | destinationPoint | a btVector |
Implements tgRigidInfo.
Definition at line 135 of file tgBoxInfo.cpp.
|
virtualinherited |
Return the surface point closest to the reference point in the direction of the destination point.
[in] | referencePoint | a btVector |
[in] | destinationPoint | a btVector |
Reimplemented from tgRigidInfo.
Definition at line 142 of file tgBoxInfo.cpp.
|
virtualinherited |
Return a set contiaining the two endpoints.
Implements tgRigidInfo.
Definition at line 195 of file tgBoxInfo.cpp.
|
inlineinherited |
Return a const reference to the first endpoint.
Definition at line 110 of file tgBoxInfo.h.
|
virtualinherited |
Return a set containing only a pointer to this Box.
a | set containing only a pointer to this Box |
Implements tgRigidInfo.
Reimplemented in tgBoxMoreAnchorsInfo.
Definition at line 188 of file tgBoxInfo.cpp.
|
inlineinherited |
Return the distance between the two endpoints.
Definition at line 213 of file tgBoxInfo.h.
|
virtualinherited |
Return the Box's mass. The mass is the volume times the density.
Implements tgRigidInfo.
Definition at line 119 of file tgBoxInfo.cpp.
|
virtualinherited |
Return a pointer to the corresponding btRigidBody.
Reimplemented in tgCompoundRigidInfo.
Definition at line 124 of file tgRigidInfo.cpp.
|
virtualinherited |
Return a const pointer to the corresponding btRigidBody.
Reimplemented in tgCompoundRigidInfo.
Definition at line 130 of file tgRigidInfo.cpp.
|
inlinevirtualinherited |
Get the tgRigidInfo that represents the compound rigid that this rigid belongs to. If it doesn't share nodes with any other rigids (determined during auto-compounding), it will point to itself.
Definition at line 149 of file tgRigidInfo.h.
|
inlineinherited |
Return a const reference to the second endpoint.
Definition at line 113 of file tgBoxInfo.h.
|
inlinevirtualinherited |
Return a btTransform that maps the from endpoint to the to endpoint
Implements tgRigidInfo.
Definition at line 125 of file tgBoxInfo.h.
|
virtual |
Reimplemented from tgBoxInfo.
Definition at line 70 of file tgGhostInfo.cpp.
|
inlineinherited |
Is this tgRigidInfo a compound?
true | if this tgRigidInfo is a compound |
false | if this tgRigidInfo is not a compound |
Definition at line 273 of file tgRigidInfo.h.
|
inlinevirtualinherited |
Set the collision object to a new collision object
Reimplemented in tgCompoundRigidInfo.
Definition at line 208 of file tgRigidInfo.h.
|
inlineinherited |
Set the corresponding btCollisionShape.
[in,out] | a | pointer to a btCollisionShape |
Definition at line 137 of file tgRigidInfo.h.
|
virtualinherited |
Set the corresponding btRigidBody.
[in,out] | a | pointer to a btRigidBody |
Reimplemented in tgCompoundRigidInfo.
Definition at line 135 of file tgRigidInfo.cpp.
|
inlinevirtualinherited |
Set the tgRigidInfo that represents the compound rigid that this may belong to. This will be set during auto-compounding.
Definition at line 163 of file tgRigidInfo.h.
|
virtualinherited |
Does this rigid have any nodes in common with the given tgRigidInfo object?
in] | other a reference to a tgRigidInfo object |
true | if any node in this sphere is also in other |
false | if no node in this sphere is also in other |
Reimplemented in tgCompoundRigidInfo.
Definition at line 141 of file tgRigidInfo.cpp.
|
mutableprotectedinherited |
A pointer to the corresponding btCollisionObject. Typically a btRigidBody, but can also be a btGhostObject
Definition at line 347 of file tgRigidInfo.h.
|
mutableprotectedinherited |
A pointer to the corresponding btCollisionShape.
Definition at line 332 of file tgRigidInfo.h.
|
mutableprotectedinherited |
A pointer to a group of rigids to which this rigid belongs. This is set during the rigid grouping step by a StructureInfo. If this is not set, getRigidGroup() will return a pointer to this (effectively, "I'm in my own group")
Definition at line 341 of file tgRigidInfo.h.