Base class handling position for Graph::ITransform node. More...

#include "murl_logic_graph_position_object.h"

Inheritance diagram for Murl::Logic::GraphPositionObject:

Public Member Functions

 GraphPositionObject (SInt32 baseDepth=0)
 The default constructor. More...
 
virtual ~GraphPositionObject ()
 The destructor.
 
virtual Bool Init (INodeObserver *nodeObserver, const Graph::IRoot *root, const String &nodeIdPath, SInt32 baseDepth)
 Initialize the object. More...
 
virtual Bool Init (INodeObserver *nodeObserver, Graph::INamespace *namespaceNode, const String &nodeIdPath, SInt32 baseDepth)
 Initialize the object. More...
 
virtual Bool DeInit ()
 Deinitialize the object. More...
 
virtual const VectorGetPosition () const
 Get the position vector. More...
 
virtual void SetPosition (const Vector &position)
 Set the position vector. More...
 
virtual void SetPosition (Real x, Real y)
 Set the x/y positionr. More...
 
virtual void SetPosition (Real x, Real y, Real z)
 Set the x/y/z positionr. More...
 
virtual void AddPosition (const Vector &position)
 Add a vector to the position. More...
 
virtual void SetSortDepth (SInt32 sortDepth)
 Set the current depth sort order. More...
 
virtual SInt32 GetSortDepth () const
 Get the current depth sort order. More...
 
virtual void SetBaseSortDepth (SInt32 sortDepth)
 Set the base depth sort order. More...
 
virtual SInt32 GetBaseSortDepth () const
 Get the base depth sort order. More...
 

Protected Member Functions

virtual void ApplySortDepth ()
 Apply the depth sort order to the transformation. More...
 
virtual void ApplyPosition ()
 Apply the position vector to the transformation. More...
 

Detailed Description

Base class handling position for Graph::ITransform node.

Constructor & Destructor Documentation

◆ GraphPositionObject()

Murl::Logic::GraphPositionObject::GraphPositionObject ( SInt32  baseDepth = 0)
inline

The default constructor.

Parameters
baseDepthThe base depth order.

Member Function Documentation

◆ Init() [1/2]

virtual Bool Murl::Logic::GraphPositionObject::Init ( INodeObserver nodeObserver,
const Graph::IRoot root,
const String nodeIdPath,
SInt32  baseDepth 
)
inlinevirtual

Initialize the object.

Parameters
nodeObserverThe INodeObserver object.
rootThe graph root node.
nodeIdPathThe full path to the graph transform node instance.
baseDepthThe base depth order.
Returns
true if successful.

Reimplemented in Murl::Logic::GraphPositionInstance.

References Murl::Graph::IRoot::GetRootNamespace().

Referenced by Murl::Logic::GraphPositionInstance::Init().

◆ Init() [2/2]

virtual Bool Murl::Logic::GraphPositionObject::Init ( INodeObserver nodeObserver,
Graph::INamespace namespaceNode,
const String nodeIdPath,
SInt32  baseDepth 
)
inlinevirtual

Initialize the object.

Parameters
nodeObserverThe INodeObserver object.
namespaceNodeThe graph namespace node.
nodeIdPathThe relative path to the graph transform node instance.
baseDepthThe base depth order.
Returns
true if successful.

References Murl::Logic::INodeObserver::Add(), ApplyPosition(), ApplySortDepth(), Murl::Graph::ITransformable::GetDepthOrder(), Murl::Graph::ITransformable::GetPosition(), and Murl::Logic::GraphNodeT< NodeType >::GetReference().

◆ DeInit()

virtual Bool Murl::Logic::GraphPositionObject::DeInit ( )
inlinevirtual

Deinitialize the object.

Returns
true if successful.

Reimplemented in Murl::Logic::GraphPositionInstance.

Referenced by Murl::Logic::GraphPositionInstance::DeInit().

◆ GetPosition()

virtual const Vector& Murl::Logic::GraphPositionObject::GetPosition ( ) const
inlinevirtual

Get the position vector.

Returns
The position vector.

◆ SetPosition() [1/3]

virtual void Murl::Logic::GraphPositionObject::SetPosition ( const Vector position)
inlinevirtual

Set the position vector.

Parameters
positionThe position vector.

References ApplyPosition().

Referenced by Murl::Logic::GraphPositionInstance::OnReset().

◆ SetPosition() [2/3]

virtual void Murl::Logic::GraphPositionObject::SetPosition ( Real  x,
Real  y 
)
inlinevirtual

Set the x/y positionr.

Parameters
xThe x-position.
yThe y-position.

References ApplyPosition(), Murl::Math::Vector< DataType >::x, and Murl::Math::Vector< DataType >::y.

◆ SetPosition() [3/3]

virtual void Murl::Logic::GraphPositionObject::SetPosition ( Real  x,
Real  y,
Real  z 
)
inlinevirtual

Set the x/y/z positionr.

Parameters
xThe x-position.
yThe y-position.
zThe z-position.

References ApplyPosition(), Murl::Math::Vector< DataType >::x, Murl::Math::Vector< DataType >::y, and Murl::Math::Vector< DataType >::z.

◆ AddPosition()

virtual void Murl::Logic::GraphPositionObject::AddPosition ( const Vector position)
inlinevirtual

Add a vector to the position.

Parameters
positionThe vector to add.

References ApplyPosition().

◆ SetSortDepth()

virtual void Murl::Logic::GraphPositionObject::SetSortDepth ( SInt32  sortDepth)
inlinevirtual

Set the current depth sort order.

Parameters
sortDepthThe current depth sort order.

References ApplySortDepth().

Referenced by Murl::Logic::GraphPositionInstance::OnReset().

◆ GetSortDepth()

virtual SInt32 Murl::Logic::GraphPositionObject::GetSortDepth ( ) const
inlinevirtual

Get the current depth sort order.

Returns
The current depth sort order.

◆ SetBaseSortDepth()

virtual void Murl::Logic::GraphPositionObject::SetBaseSortDepth ( SInt32  sortDepth)
inlinevirtual

Set the base depth sort order.

The base depth order is added to the current depht sort order when applying the depth sort order to the transformation.

Parameters
sortDepthThe base depth sort order.

References ApplySortDepth().

◆ GetBaseSortDepth()

virtual SInt32 Murl::Logic::GraphPositionObject::GetBaseSortDepth ( ) const
inlinevirtual

Get the base depth sort order.

Returns
The base depth sort order.

◆ ApplySortDepth()

virtual void Murl::Logic::GraphPositionObject::ApplySortDepth ( )
inlineprotectedvirtual

Apply the depth sort order to the transformation.

This method can be overwritten for custom behaviour.

References Murl::Graph::ITransformable::SetDepthOrder().

Referenced by Init(), SetBaseSortDepth(), and SetSortDepth().

◆ ApplyPosition()

virtual void Murl::Logic::GraphPositionObject::ApplyPosition ( )
inlineprotectedvirtual

Apply the position vector to the transformation.

This method can be overwritten for custom behaviour.

References Murl::Graph::ITransformable::SetPosition().

Referenced by AddPosition(), Init(), and SetPosition().


The documentation for this class was generated from the following file:
  • murl_logic_graph_position_object.h


Copyright © 2011-2024 Spraylight GmbH.