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

The IContact graph node interface.

Contact nodes define the actual physical properties of a possible collision in the physics simulator, such as bounciness or friction. Every possible (or desired) combination of Graph::ISurface pairs must be defined via a contact.

See Graph::ISurface for defining a collision surface. See Graph::ISurfaceSlot for activating a surface for collision handling. See Graph::ICollidable for assigning a surface to a given collider.


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

GetSurfaceNodeTarget()

Get the constant Graph::ISurfaceNodeTarget container. This method returns a constant pointer to the node's Graph::ISurfaceNodeTarget container, which allows to query the surface this state node refers to.

Murl.Graph.IGenericNodeTarget.GraphISurface GetSurfaceNodeTarget()

Returns
Murl.Graph.IGenericNodeTarget.GraphISurface The mutable Graph::ISurfaceNodeTarget container, or null if not available.

SetStaticFrictionConstant(value)

Set the contact's static friction coefficient.

Boolean SetStaticFrictionConstant(Number value)

Parameters
valueThe static friction coefficient.
Returns
Boolean true if successful.

GetStaticFrictionConstant()

Get the contact's static friction coefficient.

Number GetStaticFrictionConstant()

Returns
Number The contact's static friction coefficient.

SetDynamicFrictionConstant(value)

Set the contact's dynamic (kinetic) friction coefficient.

Boolean SetDynamicFrictionConstant(Number value)

Parameters
valueThe contact's dynamic friction coefficient.
Returns
Boolean true if successful.

GetDynamicFrictionConstant()

Get the contact's dynamic friction coefficient.

Number GetDynamicFrictionConstant()

Returns
Number The contact's dynamic friction coefficient.

SetRollingFrictionConstant(value)

Set the contact's rolling friction coefficient. TODO: More detailed description.

Boolean SetRollingFrictionConstant(Number value)

Parameters
valueThe contact's rolling friction coefficient.
Returns
Boolean true if successful.

GetRollingFrictionConstant()

Get the contact's rolling friction coefficient.

Number GetRollingFrictionConstant()

Returns
Number The contact's rolling friction coefficient.

SetSpringConstant(value)

Set the contact's spring constant. TODO: More detailed description.

Boolean SetSpringConstant(Number value)

Parameters
valueThe contact's spring constant.
Returns
Boolean true if successful.

GetSpringConstant()

Get the contact's spring constant.

Number GetSpringConstant()

Returns
Number The contact's spring constant.

SetDampingConstant(value)

Set the contact's damping constant. TODO: More detailed description.

Boolean SetDampingConstant(Number value)

Parameters
valueThe contact's damping constant.
Returns
Boolean true if successful.

GetDampingConstant()

Get the contact's damping constant.

Number GetDampingConstant()

Returns
Number The contact's damping constant.

SetBounceFactor(value)

Set the contact's bounce factor. TODO: More detailed description.

Boolean SetBounceFactor(Number value)

Parameters
valueThe contact's bounce factor.
Returns
Boolean true if successful.

GetBounceFactor()

Get the contact's bounce factor.

Number GetBounceFactor()

Returns
Number The contact's bounce factor.

SetBounceThreshold(value)

Set the contact's bounce velocity threshold. TODO: More detailed description.

Boolean SetBounceThreshold(Number value)

Parameters
valueThe contact's bounce velocity threshold.
Returns
Boolean true if successful.

GetBounceThreshold()

Get the contact's bounce velocity threshold.

Number GetBounceThreshold()

Returns
Number The contact's bounce velocity threshold.

SetSlip(slip)

Set the contact's surface slip value. TODO: More detailed description.

Boolean SetSlip(Number slip)

Parameters
slipThe contact's surface slip value.
Returns
Boolean true if successful.

GetSlip()

Get the contact's surface slip value.

Number GetSlip()

Returns
Number The contact's surface slip value.