mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-27 15:25:54 -04:00
pgraph: Allow moving a NodePath into a WorkingNodePath efficiently
This commit is contained in:
parent
4d2a13537a
commit
a44d26bfbf
@ -21,7 +21,20 @@ WorkingNodePath(const NodePath &start) {
|
||||
nassertv(!start.is_empty());
|
||||
_next = nullptr;
|
||||
_start = start._head;
|
||||
_node = start.node();
|
||||
_node = _start->get_node();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a WorkingNodePath that is the same as the indicated NodePath. This
|
||||
* is generally used to begin the traversal of a scene graph with the root
|
||||
* NodePath.
|
||||
*/
|
||||
INLINE WorkingNodePath::
|
||||
WorkingNodePath(NodePath &&start) {
|
||||
nassertv(!start.is_empty());
|
||||
_next = nullptr;
|
||||
_start = std::move(start._head);
|
||||
_node = _start->get_node();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -39,6 +39,7 @@
|
||||
class EXPCL_PANDA_PGRAPH WorkingNodePath {
|
||||
public:
|
||||
INLINE WorkingNodePath(const NodePath &start);
|
||||
INLINE WorkingNodePath(NodePath &&start);
|
||||
INLINE WorkingNodePath(const WorkingNodePath ©);
|
||||
INLINE WorkingNodePath(const WorkingNodePath &parent, PandaNode *child);
|
||||
INLINE ~WorkingNodePath();
|
||||
|
Loading…
x
Reference in New Issue
Block a user