The IField graph node interface. More...

#include "murl_graph_i_field.h"

Inheritance diagram for Murl::Graph::IField:

Public Member Functions

virtual INodeGetNodeInterface ()=0
 Get the mutable Graph::INode interface. More...
 
virtual const INodeGetNodeInterface () const =0
 Get the constant Graph::INode interface. More...
 
virtual ITransformGetTransformInterface ()=0
 Get the mutable Graph::ITransform interface. More...
 
virtual const ITransformGetTransformInterface () 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...
 

Detailed Description

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.

Member Function Documentation

◆ GetNodeInterface() [1/2]

virtual INode* Murl::Graph::IField::GetNodeInterface ( )
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.

Returns
The mutable Graph::INode interface, or null if not available

◆ GetNodeInterface() [2/2]

virtual const INode* Murl::Graph::IField::GetNodeInterface ( ) const
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.

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

◆ GetTransformInterface() [1/2]

virtual ITransform* Murl::Graph::IField::GetTransformInterface ( )
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.

Returns
The mutable Graph::ITransform interface, or null if not available

◆ GetTransformInterface() [2/2]

virtual const ITransform* Murl::Graph::IField::GetTransformInterface ( ) const
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.

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

◆ SetInfluenceGroupMask()

virtual Bool Murl::Graph::IField::SetInfluenceGroupMask ( UInt32  mask)
pure virtual

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.

Parameters
maskThe group influence bit mask.
Returns
true if successful.

◆ GetInfluenceGroupMask()

virtual UInt32 Murl::Graph::IField::GetInfluenceGroupMask ( ) const
pure virtual

Get the individual body groups this field is influencing.

Returns
The bit mask specifying the group influence.

◆ SetConstantFactor()

virtual Bool Murl::Graph::IField::SetConstantFactor ( Real  factor)
pure virtual

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.

Parameters
factorThe field's constant influence factor.
Returns
true if successful.

◆ GetConstantFactor()

virtual Real Murl::Graph::IField::GetConstantFactor ( ) const
pure virtual

Get the field's constant influence factor.

Returns
The field's constant influence factor.

◆ SetLinearFactor()

virtual Bool Murl::Graph::IField::SetLinearFactor ( Real  factor)
pure virtual

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.

Parameters
factorThe field's linear influence factor.
Returns
true if successful.

◆ GetLinearFactor()

virtual Real Murl::Graph::IField::GetLinearFactor ( ) const
pure virtual

Get the field's linear influence factor.

Returns
The field's linear influence factor.

◆ SetQuadraticFactor()

virtual Bool Murl::Graph::IField::SetQuadraticFactor ( Real  factor)
pure virtual

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.

Parameters
factorThe field's quadratic influence factor.
Returns
true if successful.

◆ GetQuadraticFactor()

virtual Real Murl::Graph::IField::GetQuadraticFactor ( ) const
pure virtual

Get the field's quadratic influence factor.

Returns
The field's quadratic influence factor.

◆ SetType()

virtual Bool Murl::Graph::IField::SetType ( IEnums::FieldType  type)
pure virtual

Set the field type.

Parameters
typeThe field type.
Returns
true if successful.

◆ GetType()

virtual IEnums::FieldType Murl::Graph::IField::GetType ( ) const
pure virtual

Get the field type.

Returns
The field type.

◆ SetShape()

virtual Bool Murl::Graph::IField::SetShape ( IEnums::FieldShape  shape)
pure virtual

Set the field shape.

Parameters
shapeThe field shape.
Returns
true if successful.

◆ GetShape()

virtual IEnums::FieldShape Murl::Graph::IField::GetShape ( ) const
pure virtual

Get the field shape.

Returns
The field shape.

The documentation for this interface was generated from the following file:
  • murl_graph_i_field.h


Copyright © 2011-2024 Spraylight GmbH.