Hi,
I'm trying to use the Action or NewAction framework to simply traverse a
graph and add a materialchunk to all nodes with applicable cores.
However, I can't really get my head around to what to write. I can't
find a really examples at least to what I find.
I just want to do some thing like this (somewhat simplified):
class MyActor : public SomeActorBase {
public:
ResultE onEnter(NodePtr &p) {
ChunkMaterial d = ChunkMaterialPtr::dcast(p.getCore());
if (d != nullfc) {
d->addChunk(m_chunk);
}
};
StateChunk m_chunk;
}
void f(NodePtr graph, StateChunkPtr chunk) {
MyActor actor;
actor.m_chunk = chunk
SomeAction action;
action.addActor(actor);
action.apply(graph)
}
How to achieve this in as few lines as possible?
Best regards,
/Marcus
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users