Class controlling a position sub tree for GraphInstanceObjects usage.
MyLogic.h
#include "murl_logic_graph_instance_objects.h"
#include "murl_logic_graph_position_instance.h"
...
Logic::GraphInstanceObjects<Logic::GraphPositionInstance> mMyInstances;
MyLogic.cpp
Bool App::MyLogic::OnInit(
const Logic::IState* state)
{
const Graph::IRoot* root = state->GetGraphRoot();
if (!mMyInstances.Init(root, "/MY_LOCATION", "/MY_INSTANCE_NODE", "/MY_INSTANCE"))
{
return false;
}
return true;
}
Bool App::MyLogic::OnDeInit(
const Logic::IState* state)
{
if (!mMyInstances.DeInit())
{
ret = false;
}
return ret;
}
MyGraph.xml
<Namespace id="MY_LOCATION">
<Instance id="MY_INSTANCE_NODE" graphResourceId="MyInstanceXml" replications="10"
</Namespace>
MyInstance.xml
<Graph>
<Namespace id="MY_INSTANCE{replication}" activeAndVisible="no">
<Transform id="position">
<!-- my nodes -->
</Transform>
</Namespace>
</Graph>
Alternatively a replication with anonymous namespace can be accessed as follows.
Bool App::MyLogic::OnInit(
const Logic::IState* state)
{
if (!mMyInstances.Init(root->GetRootNamespace(), "/MY_LOCATION/MY_INSTANCE_NODE"))
{
return false;
}
return true;
}
MyInstance.xml
<Graph>
<Namespace activeAndVisible="no">
<Transform id="position">
<!-- my nodes -->
</Transform>
</Namespace>
</Graph>
|
| | GraphPositionInstance (SInt32 baseDepth=0) |
| | The default constructor. More...
|
| |
|
| ~GraphPositionInstance () override |
| | The destructor.
|
| |
| Bool | Init (INodeObserver *nodeObserver, const Graph::IRoot *root, const String &replicationIdPath, SInt32 baseDepth) override |
| | Initialize the object. More...
|
| |
| Bool | Init (INodeObserver *nodeObserver, Graph::INode *replicationNode, SInt32 baseDepth) override |
| | Initialize the object. More...
|
| |
| Bool | DeInit () override |
| | Deinitialize the object. More...
|
| |
| void | SetObtained (Bool isObtained) override |
| | Set the obtained state. More...
|
| |
| 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...
|
| |
| | BaseStepable () |
| | The default constructor. More...
|
| |
| | ~BaseStepable () override |
| | The destructor. More...
|
| |
| | operator IStepablePtr () |
| | Conversion operator. More...
|
| |
|
| ~Stepable () override |
| | The destructor.
|
| |
| Bool | SetAppStepable (IAppStepablePtr appStepable) override |
| | Implementation of IStepable::SetAppStepable() method. More...
|
| |
| void | SetEnabled (Bool isEnabled) override |
| | Implementation of IStepable::SetEnabled() method. More...
|
| |
| Bool | IsEnabled () const override |
| | Implementation of IStepable::IsEnabled() method. More...
|
| |
|
void | Reset () override |
| | Implementation of IStepable::Reset() method.
|
| |
| void | ProcessTick (const Logic::IState *state) override |
| | Implementation of IStepable::ProcessTick() method. More...
|
| |
| void | FinishTick (const Logic::IState *state) override |
| | Implementation of IStepable::FinishTick() method. More...
|
| |
| | GraphPositionObject (SInt32 baseDepth=0) |
| | The default constructor. More...
|
| |
|
virtual | ~GraphPositionObject () |
| | The destructor.
|
| |
| virtual Bool | Init (INodeObserver *nodeObserver, Graph::INamespace *namespaceNode, const String &nodeIdPath, SInt32 baseDepth) |
| | Initialize the object. More...
|
| |
| virtual const Vector & | GetPosition () 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...
|
| |