![]() |
Murl Engine Lua Addon API
Version 1.0 beta
|
The IField graph node interface.
This interface represents a generic field object in the framework's physics simulator, that permanently acts on any Graph::IBody nodes that are present in the field's defined influence groups.
Fields come in different shapes (planar, spherical, ...) and can be controlled to apply either a force or an acceleration to the bodies within its range. There is also a nuber of factors (constant, linear and quadratic) that can be set to control the actual field strength acting on a body depending on its distance to the field.
See Graph::IBody to define a body to act on.
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()
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()
Set the individual body groups this field is influencing. This method sets the field's influence on a number of individual body groups. Each bit in the given mask represents one of 32 possible groups; see Graph::IBody::SetResponseGroupMask() for assigning a body to any of these groups.
Boolean SetInfluenceGroupMask(Integer mask)
mask | The group influence bit mask. |
Get the individual body groups this field is influencing.
Integer GetInfluenceGroupMask()
Set the field's constant influence factor. The given value represents the constant field influence factor, i.e. the amount of influence on any body independent of its distance.
Boolean SetConstantFactor(Number factor)
factor | The field's constant influence factor. |
Get the field's constant influence factor.
Number GetConstantFactor()
Set the field's linear influence factor. The given value represents the linear field influence factor, i.e. the amount of influence on any body degrading linearly in proportion to that body's distance to the field.
Boolean SetLinearFactor(Number factor)
factor | The field's linear influence factor. |
Get the field's linear influence factor.
Number GetLinearFactor()
Set the field's quadratic influence factor. The given value represents the quadratic field influence factor, i.e. the amount of influence on any body degrading in a quadratic curve in a proportion to that body's distance to the field.
Boolean SetQuadraticFactor(Number factor)
factor | The field's quadratic influence factor. |
Get the field's quadratic influence factor.
Number GetQuadraticFactor()
Set the field type.
Boolean SetType(Murl.IEnums.FieldType type)
type | The field type. |
Get the field type.
Murl.IEnums.FieldType GetType()
Set the field shape.
Boolean SetShape(Murl.IEnums.FieldShape shape)
shape | The field shape. |
Get the field shape.
Murl.IEnums.FieldShape GetShape()