29 typedef std::map<ObjectId, std::shared_ptr<Node>>
NodeMap;
54 void reset(std::shared_ptr<Node> node);
66 virtual bool load(std::string name);
68 virtual void invoke(
unsigned char type,
unsigned char key,
int x,
int y) {};
70 template<
class TNode,
class ...Args>
81 template<
class TNode,
class ...Args>
82 std::shared_ptr<TNode>
addNode(Args&& ... args)
90 std::shared_ptr<TNode>
addNode(std::shared_ptr<TNode> tNode)
92 if (tNode ==
nullptr ||
99 tNode->setSceneGraph(
this);
170 template<
class Act,
class ... Args>
172 Act action(std::forward<Args>(args)...);
183 template<
class Act,
class ... Args>
185 Act action(std::forward<Args>(args)...);
197 template<
class Act,
class ... Args>
199 Act action(std::forward<Args>(args)...);
211 template<
class Act,
class ... Args>
213 Act action(std::forward<Args>(args)...);
std::shared_ptr< TNode > createNewScene(Args &&... args)
void setFrameNumber(int n)
bool mAsynchronousSimulation
bool isSimulationInfoPrintable()
void traverseForward(Args &&... args)
float getTimeCostPerFrame()
void deleteNode(std::shared_ptr< Node > node)
void markQueueUpdateRequired()
An interface to tell SceneGraph to update the execuation queue.
void setLowerBound(Vec3f lowerBound)
virtual void takeOneFrame()
bool isIntervalAdaptive()
SceneGraph & operator=(const SceneGraph &)=delete
void updateExecutionQueue()
NBoundingBox boundingBox()
void onMouseEvent(PMouseEvent event)
void printValidationInfo(bool enabled)
virtual void advanceInAsync()
SceneGraph(const SceneGraph &)=delete
void traverseBackward(Action *act)
Depth-first tree traversal.
bool isNodeInfoPrintable()
void traverseForward(Action *act)
Breadth-first tree traversal.
void propagateNode(std::shared_ptr< Node > node)
void printNodeInfo(bool enabled)
void setTotalTime(float t)
bool isValidationInfoPrintable()
void setAsynchronousSimulation(bool b)
void onKeyboardEvent(PKeyboardEvent event)
void setAdaptiveInterval(bool adaptive)
virtual void invoke(unsigned char type, unsigned char key, int x, int y)
void traverseForwardWithAutoSync(std::shared_ptr< Node > node, Action *act)
Breadth-first tree traversal starting from a specific node, only those whose mAutoSync turned-on will...
void printRenderingInfo(bool enabled)
void setUpperBound(Vec3f upperBound)
virtual bool load(std::string name)
void traverseForwardWithAutoSync(std::shared_ptr< Node > node, Args &&... args)
void printSimulationInfo(bool enabled)
std::shared_ptr< TNode > addNode(std::shared_ptr< TNode > tNode)
virtual void advance(float dt)
void traverseBackward(Args &&... args)
virtual void updateGraphicsContext()
void traverseForward(std::shared_ptr< Node > node, Args &&... args)
bool isRenderingInfoPrintable()
std::shared_ptr< TNode > addNode(Args &&... args)
void setFrameRate(float frameRate)
bool mQueueUpdateRequired
static SceneGraph & getInstance()
std::shared_ptr< T > New(Args &&... args)
This is an implementation of AdditiveCCD based on peridyno.
std::map< ObjectId, std::shared_ptr< Node > > NodeMap
std::list< Node * > NodeList