mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
add useful inspection funcs
This commit is contained in:
parent
9d91854f33
commit
d7ec81bcea
@ -272,6 +272,29 @@ clear_net_transforms() {
|
||||
_net_transform_nodes.clear();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: CharacterJoint::get_net_transforms
|
||||
// Access: Published
|
||||
// Description: Returns a list of the net transforms set for this
|
||||
// node. Note that this returns a list of NodePaths,
|
||||
// even though the net transforms are actually a list of
|
||||
// PandaNodes.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
NodePathCollection CharacterJoint::
|
||||
get_net_transforms() {
|
||||
NodePathCollection npc;
|
||||
|
||||
NodeList::iterator ai;
|
||||
for (ai = _net_transform_nodes.begin();
|
||||
ai != _net_transform_nodes.end();
|
||||
++ai) {
|
||||
PandaNode *node = *ai;
|
||||
npc.add_path(NodePath::any_path(node));
|
||||
}
|
||||
|
||||
return npc;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: CharacterJoint::add_local_transform
|
||||
// Access: Published
|
||||
@ -357,6 +380,29 @@ clear_local_transforms() {
|
||||
_local_transform_nodes.clear();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: CharacterJoint::get_local_transforms
|
||||
// Access: Published
|
||||
// Description: Returns a list of the local transforms set for this
|
||||
// node. Note that this returns a list of NodePaths,
|
||||
// even though the local transforms are actually a list of
|
||||
// PandaNodes.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
NodePathCollection CharacterJoint::
|
||||
get_local_transforms() {
|
||||
NodePathCollection npc;
|
||||
|
||||
NodeList::iterator ai;
|
||||
for (ai = _local_transform_nodes.begin();
|
||||
ai != _local_transform_nodes.end();
|
||||
++ai) {
|
||||
PandaNode *node = *ai;
|
||||
npc.add_path(NodePath::any_path(node));
|
||||
}
|
||||
|
||||
return npc;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: CharacterJoint::get_transform
|
||||
// Access: Published
|
||||
|
@ -23,6 +23,7 @@
|
||||
|
||||
#include "movingPartMatrix.h"
|
||||
#include "pandaNode.h"
|
||||
#include "nodePathCollection.h"
|
||||
|
||||
class JointVertexTransform;
|
||||
class Character;
|
||||
@ -55,11 +56,13 @@ PUBLISHED:
|
||||
bool remove_net_transform(PandaNode *node);
|
||||
bool has_net_transform(PandaNode *node) const;
|
||||
void clear_net_transforms();
|
||||
NodePathCollection get_net_transforms();
|
||||
|
||||
bool add_local_transform(PandaNode *node);
|
||||
bool remove_local_transform(PandaNode *node);
|
||||
bool has_local_transform(PandaNode *node) const;
|
||||
void clear_local_transforms();
|
||||
NodePathCollection get_local_transforms();
|
||||
|
||||
void get_transform(LMatrix4f &transform) const;
|
||||
void get_net_transform(LMatrix4f &transform) const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user