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

The ICollidable graph node interface.

Collidables are used in the framework's physics simulator to generate collisions between individual Graph::IBody nodes. There exist a number of derived interfaces that represent colliders of different shapes, such as planes, spheres or triangle meshes.

To attach a collider to a specific body, it must be defined within the sub graph of that body, not necessarily as a direct child. It is possible to apply a relative transform between the actual body and any of its colliders, to build a more complex collision object made up from a number of simple colliders.

The actual physical properties of an encountered collision with another collidable (such as bounciness or friction) are determined from a Graph::IContact node defining these properties for a Graph::ISurface pair, with the Graph::ISurface currently active at at the given slot (see SetSurfaceSlot()) and the collision partner's surface.

See Graph::ISurface for defining a collidable's phyiscal surface properties. See Graph::IBody for defining a body to attach to.


Table members

Methods


SetSurfaceSlot(slot)

Set the surface slot used for simulation.

Boolean SetSurfaceSlot(Integer slot)

Parameters
slotThe surface slot.
Returns
Boolean true if successful.

GetSurfaceSlot()

Get the surface slot used for simulation.

Integer GetSurfaceSlot()

Returns
Integer The surface slot.