Murl Engine Lua Addon API  Version 1.0 beta
Murl.Graph.IHingeJoint

The IHingeJoint graph node interface.

A hinge joint is a joint that connects two bodies by enforcing a translation constraint along each of the three axes in 3D space, as well as rotation constraints that allow rotation around a single axis only (1 degree of freedom). The rotation axis can be set using the SetAxis() method.


Table members

Methods


GetNodeInterface()

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.

Murl.Graph.INode GetNodeInterface()

Returns
Murl.Graph.INode The constant Graph::INode interface, or null if not available

GetTransformInterface()

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.

Murl.Graph.ITransform GetTransformInterface()

Returns
Murl.Graph.ITransform The constant Graph::ITransform interface, or null if not available

GetJointInterface()

Get the constant Graph::IJoint interface. This method returns a constant pointer to the node's Graph::IJoint interface, to be able to query common joint-related properties.

Murl.Graph.IJoint GetJointInterface()

Returns
Murl.Graph.IJoint The constant Graph::IJoint interface.

SetAxis(axis)

Set the hinge joint's rotation axis. This method sets the axis around which the connected bodies are allowed to rotate relative to each other, relative to the joint's local coordinate system.

Boolean SetAxis(Murl.Math.Vector axis)

Parameters
axisThe rotation axis.
Returns
Boolean true if successful.

GetAxis()

Get the hinge joint's rotation axis.

Murl.Math.Vector GetAxis()

Returns
Murl.Math.Vector The rotation axis.

SetMinAngle(angle)

Set the hinge joint's minimum angle limit.

Boolean SetMinAngle(Number angle)

Parameters
angleThe minimum angle.
Returns
Boolean true if successful.

GetMinAngle()

Get the hinge joint's minimum angle limit.

Number GetMinAngle()

Returns
Number The minimum angle.

SetMaxAngle(angle)

Set the hinge joint's maximum angle limit.

Boolean SetMaxAngle(Number angle)

Parameters
angleThe maximum angle.
Returns
Boolean true if successful.

GetMaxAngle()

Get the hinge joint's maximum angle limit.

Number GetMaxAngle()

Returns
Number The maximum angle.