The IJoint graph node interface. More...

#include "murl_graph_i_joint.h"

Inheritance diagram for Murl::Graph::IJoint:

Public Member Functions

virtual INodeGetNodeInterface ()=0
 Get the mutable Graph::INode interface. More...
 
virtual const INodeGetNodeInterface () const =0
 Get the constant Graph::INode interface. More...
 
virtual ITransformGetTransformInterface ()=0
 Get the mutable Graph::ITransform interface. More...
 
virtual const ITransformGetTransformInterface () const =0
 Get the constant Graph::ITransform interface. More...
 
virtual IBodyNodeTargetGetBodyNodeTarget ()=0
 Get the mutable Graph::IBodyNodeTarget container. More...
 
virtual const IBodyNodeTargetGetBodyNodeTarget () 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 VectorGetBodyPosition (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]

virtual INode* Murl::Graph::IJoint::GetNodeInterface ( )
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]

virtual const INode* Murl::Graph::IJoint::GetNodeInterface ( ) const
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]

virtual ITransform* Murl::Graph::IJoint::GetTransformInterface ( )
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]

virtual const ITransform* Murl::Graph::IJoint::GetTransformInterface ( ) const
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]

virtual IBodyNodeTarget* Murl::Graph::IJoint::GetBodyNodeTarget ( )
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]

virtual const IBodyNodeTarget* Murl::Graph::IJoint::GetBodyNodeTarget ( ) const
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()

virtual Bool Murl::Graph::IJoint::SetBodyPosition ( UInt32  index,
const Vector position 
)
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
indexThe anchor index, either 0 or 1.
positionThe anchor position.
Returns
true if successful.

◆ GetBodyPosition()

virtual const Vector& Murl::Graph::IJoint::GetBodyPosition ( UInt32  index) const
pure virtual

Get the anchor position at a given index.

See SetBodyPosition().

Parameters
indexThe anchor index, either 0 or 1.
Returns
The anchor position.

◆ SetBodyInfluence()

virtual Bool Murl::Graph::IJoint::SetBodyInfluence ( UInt32  index,
Bool  enabled 
)
pure virtual

Enable/disable the joint's influence on an attached body.

Parameters
indexThe body index, either 0 or 1.
enabledIf true, the attached body gets influenced by the joint.
Returns
true if successful.

◆ GetBodyInfluence()

virtual Bool Murl::Graph::IJoint::GetBodyInfluence ( UInt32  index) const
pure virtual

Check if the joint is influencing an attached body.

Parameters
indexThe body index, either 0 or 1.
Returns
true if influence is enabled.

◆ SetSpringConstant()

virtual Bool Murl::Graph::IJoint::SetSpringConstant ( Real  springConstant)
pure virtual

Set the joint's spring constant.

Parameters
springConstantThe spring constant.
Returns
true if successful.

◆ GetSpringConstant()

virtual Real Murl::Graph::IJoint::GetSpringConstant ( ) const
pure virtual

Get the joint's spring constant.

Returns
The spring constant.

◆ SetDampingConstant()

virtual Bool Murl::Graph::IJoint::SetDampingConstant ( Real  dampingConstant)
pure virtual

Set the joint's damping constant.

Parameters
dampingConstantThe damping constant.
Returns
true if successful.

◆ GetDampingConstant()

virtual Real Murl::Graph::IJoint::GetDampingConstant ( ) const
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


Copyright © 2011-2018 Spraylight GmbH.