NTRT Simulator
Version: Master
|
#include <tgSpringCableAnchor.h>
Public Member Functions | |
tgSpringCableAnchor (btVector3 pos, btVector3 cn=btVector3(0.0, 0.0, 0.0), bool perm=true, bool slide=false) | |
virtual | ~tgSpringCableAnchor () |
virtual btVector3 | getWorldPosition () const =0 |
virtual bool | setWorldPosition (btVector3 &newPos)=0 |
virtual btVector3 | getRelativePosition () const =0 |
virtual btVector3 | getContactNormal () const =0 |
const btVector3 & | getForce () const |
Public Attributes | |
const bool | permanent |
const bool | sliding |
Protected Attributes | |
btVector3 | force |
A class that allows attaches tgSpringCables to rigid bodies. Only dependency on Bullet is btScalar and btVector3 (linear algebra)
Definition at line 42 of file tgSpringCableAnchor.h.
|
inline |
The only constructor. At a minimum requires a body and a position on that body to track. Sliding anchors require additional data
[in] | pos | - The position in world coordinates where this attaches |
[in] | cn | - A btVector3 that specifies the direction of contact Only requried for sliding anchors |
[in] | perm | - Whether or not this anchor can be deleted in the middle of a simulation |
[in] | slide | - Whether this represents a pin joint or a sliding contact |
Definition at line 57 of file tgSpringCableAnchor.h.
|
inlinevirtual |
Virtual destructor, nothing to delete
Definition at line 73 of file tgSpringCableAnchor.h.
|
pure virtual |
Return an up to date contact normal based on the rigid body's btTransform
Implemented in tgBulletSpringCableAnchor.
|
inline |
Definition at line 107 of file tgSpringCableAnchor.h.
|
pure virtual |
Get the position of the point in body coordinaates
Implemented in tgBulletSpringCableAnchor.
|
pure virtual |
Return the current position of the anchor in world coordinates
Implemented in tgBulletSpringCableAnchor.
|
pure virtual |
Update attachedRelativeOriginalPosition based on the sliding of the string. This also checks if the new sliding position is still on the body.
Implemented in tgBulletSpringCableAnchor.
|
protected |
Store force so we can normalize it appropreately. Set and accessed directly by MuscleNP
Definition at line 132 of file tgSpringCableAnchor.h.
const bool tgSpringCableAnchor::permanent |
A boolean value indicating whether this a temporary or permanent contact if permanent do not delete it until teardown!!
Definition at line 116 of file tgSpringCableAnchor.h.
const bool tgSpringCableAnchor::sliding |
How the force is applied to the rigid body. True applies along the contact normal, false is applied towards the next anchor. Application depends on other classes
Definition at line 124 of file tgSpringCableAnchor.h.