![]() |
Murl Engine API
Version 2018.3
|
The IField graph node interface. More...
#include <murl_graph_i_field.h>
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.
Public Member Functions | |
virtual INode * | GetNodeInterface ()=0 |
Get the mutable Graph::INode interface. More... | |
virtual const INode * | GetNodeInterface () const =0 |
Get the constant Graph::INode interface. More... | |
virtual ITransform * | GetTransformInterface ()=0 |
Get the mutable Graph::ITransform interface. More... | |
virtual const ITransform * | GetTransformInterface () const =0 |
Get the constant Graph::ITransform interface. More... | |
virtual Bool | SetInfluenceGroupMask (UInt32 mask)=0 |
Set the individual body groups this field is influencing. More... | |
virtual UInt32 | GetInfluenceGroupMask () const =0 |
Get the individual body groups this field is influencing. More... | |
virtual Bool | SetConstantFactor (Real factor)=0 |
Set the field's constant influence factor. More... | |
virtual Real | GetConstantFactor () const =0 |
Get the field's constant influence factor. More... | |
virtual Bool | SetLinearFactor (Real factor)=0 |
Set the field's linear influence factor. More... | |
virtual Real | GetLinearFactor () const =0 |
Get the field's linear influence factor. More... | |
virtual Bool | SetQuadraticFactor (Real factor)=0 |
Set the field's quadratic influence factor. More... | |
virtual Real | GetQuadraticFactor () const =0 |
Get the field's quadratic influence factor. More... | |
virtual Bool | SetType (IEnums::FieldType type)=0 |
Set the field type. More... | |
virtual IEnums::FieldType | GetType () const =0 |
Get the field type. More... | |
virtual Bool | SetShape (IEnums::FieldShape shape)=0 |
Set the field shape. More... | |
virtual IEnums::FieldShape | GetShape () const =0 |
Get the field shape. More... | |
|
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.
|
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.
|
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.
|
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.
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.
mask | The group influence bit mask. |
|
pure virtual |
Get the individual body groups this field is influencing.
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.
factor | The field's constant influence factor. |
|
pure virtual |
Get the field's constant influence factor.
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.
factor | The field's linear influence factor. |
|
pure virtual |
Get the field's linear influence factor.
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.
factor | The field's quadratic influence factor. |
|
pure virtual |
Get the field's quadratic influence factor.
|
pure virtual |
Set the field type.
type | The field type. |
|
pure virtual |
Get the field type.
|
pure virtual |
Set the field shape.
shape | The field shape. |
|
pure virtual |
Get the field shape.