The IJoint graph node interface. More...
#include "murl_graph_i_joint.h"
Public Member Functions | |
virtual INode * | GetNodeInterface ()=0 |
Get the mutable Graph::INode interface. More... | |
virtual const INode * | GetNodeInterface () const =0 |
Get the constant Graph::INode interface. More... | |
virtual ITransform * | GetTransformInterface ()=0 |
Get the mutable Graph::ITransform interface. More... | |
virtual const ITransform * | GetTransformInterface () const =0 |
Get the constant Graph::ITransform interface. More... | |
virtual IBodyNodeTarget * | GetBodyNodeTarget ()=0 |
Get the mutable Graph::IBodyNodeTarget container. More... | |
virtual const IBodyNodeTarget * | GetBodyNodeTarget () const =0 |
Get the constant Graph::IBodyNodeTarget container. More... | |
virtual Bool | SetBodyPosition (UInt32 index, const Vector &position)=0 |
Set the anchor position at a given index. More... | |
virtual const Vector & | GetBodyPosition (UInt32 index) const =0 |
Get the anchor position at a given index. More... | |
virtual Bool | SetBodyInfluence (UInt32 index, Bool enabled)=0 |
Enable/disable the joint's influence on an attached body. More... | |
virtual Bool | GetBodyInfluence (UInt32 index) const =0 |
Check if the joint is influencing an attached body. More... | |
virtual Bool | SetSpringConstant (Real springConstant)=0 |
Set the joint's spring constant. More... | |
virtual Real | GetSpringConstant () const =0 |
Get the joint's spring constant. More... | |
virtual Bool | SetDampingConstant (Real dampingConstant)=0 |
Set the joint's damping constant. More... | |
virtual Real | GetDampingConstant () const =0 |
Get the joint's damping constant. More... | |
Detailed Description
The IJoint graph node interface.
Joint nodes are used in the framework's physics simulator to connect two Graph::IBody nodes, or to connect a single Graph::IBody node to a specific point in world space. There exist different joint types (e.g. Graph::IBallJoint or Graph::IHingeJoint), each of which enforces different constraints on the connection.
Member Function Documentation
◆ GetNodeInterface() [1/2]
|
pure virtual |
Get the mutable Graph::INode interface.
This method returns a mutable pointer to the node's Graph::INode interface, to be able to query or modify common node properties such as active state, visibility or ID.
- Returns
- The mutable Graph::INode interface, or null if not available
◆ GetNodeInterface() [2/2]
|
pure virtual |
Get the constant Graph::INode interface.
This method returns a constant pointer to the node's Graph::INode interface, to be able to query common node properties such as active state, visibility or ID.
- Returns
- The constant Graph::INode interface, or null if not available
◆ GetTransformInterface() [1/2]
|
pure virtual |
Get the mutable Graph::ITransform interface.
This method returns a mutable pointer to the node's Graph::ITransform interface, to be able to query or modify the node's transformation matrix and depth order.
- Returns
- The mutable Graph::ITransform interface, or null if not available
◆ GetTransformInterface() [2/2]
|
pure virtual |
Get the constant Graph::ITransform interface.
This method returns a constant pointer to the node's Graph::ITransform interface, to be able to query the node's transformation matrix and depth order.
- Returns
- The constant Graph::ITransform interface, or null if not available
◆ GetBodyNodeTarget() [1/2]
|
pure virtual |
Get the mutable Graph::IBodyNodeTarget container.
This method returns a mutable pointer to the node's Graph::IBodyNodeTarget container, which allows to set or query the bodies to be connected.
- Returns
- The mutable Graph::IBodyNodeTarget container.
◆ GetBodyNodeTarget() [2/2]
|
pure virtual |
Get the constant Graph::IBodyNodeTarget container.
This method returns a constant pointer to the node's Graph::IBodyNodeTarget container, which allows to query the connected bodies.
- Returns
- The constant Graph::IBodyNodeTarget container.
◆ SetBodyPosition()
|
pure virtual |
Set the anchor position at a given index.
If a body is present at the given index (in the range from 0 to 1), the given position represents the anchor position relative to that body's local coordinate system. If no body is present, the position is interpreted relative to the joint itself, which can be set using the joint's ITransformable interface obtained from GetTransformInterface().
- Parameters
-
index The anchor index, either 0 or 1. position The anchor position.
- Returns
- true if successful.
◆ GetBodyPosition()
Get the anchor position at a given index.
See SetBodyPosition().
- Parameters
-
index The anchor index, either 0 or 1.
- Returns
- The anchor position.
◆ SetBodyInfluence()
Enable/disable the joint's influence on an attached body.
- Parameters
-
index The body index, either 0 or 1. enabled If true, the attached body gets influenced by the joint.
- Returns
- true if successful.
◆ GetBodyInfluence()
Check if the joint is influencing an attached body.
- Parameters
-
index The body index, either 0 or 1.
- Returns
- true if influence is enabled.
◆ SetSpringConstant()
Set the joint's spring constant.
- Parameters
-
springConstant The spring constant.
- Returns
- true if successful.
◆ GetSpringConstant()
|
pure virtual |
Get the joint's spring constant.
- Returns
- The spring constant.
◆ SetDampingConstant()
Set the joint's damping constant.
- Parameters
-
dampingConstant The damping constant.
- Returns
- true if successful.
◆ GetDampingConstant()
|
pure virtual |
Get the joint's damping constant.
- Returns
- The damping constant.
The documentation for this interface was generated from the following file:
- murl_graph_i_joint.h