14#ifndef CHARACTERJOINT_H
15#define CHARACTERJOINT_H
32class EXPCL_PANDA_CHAR CharacterJoint :
public MovingPartMatrix {
35 CharacterJoint(
const CharacterJoint ©);
38 explicit CharacterJoint(Character *character,
PartBundle *root,
39 PartGroup *parent,
const std::string &name,
40 const LMatrix4 &default_value);
41 virtual ~CharacterJoint();
48 bool self_changed,
bool parent_changed,
50 virtual void do_xform(
const LMatrix4 &mat,
const LMatrix4 &inv_mat);
69 void get_net_transform(LMatrix4 &transform)
const;
71 Character *get_character()
const;
74 void set_character(Character *character);
78 Character *_character;
81 NodeList _net_transform_nodes;
82 NodeList _local_transform_nodes;
85 VertexTransforms _vertex_transforms;
99 int _num_net_nodes, _num_local_nodes;
108 LMatrix4 _net_transform;
109 LMatrix4 _initial_net_transform_inverse;
115 LMatrix4 _skinning_matrix;
119 return get_class_type();
121 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
125 static void init_type() {
126 MovingPartMatrix::init_type();
128 MovingPartMatrix::get_class_type());
134 friend class Character;
135 friend class CharacterJointBundle;
136 friend class JointVertexTransform;
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
bool has_net_transform(PandaNode *node) const
Returns true if the node is on the list of nodes that will be updated each frame with the joint's net...
NodePathCollection get_local_transforms()
Returns a list of the local transforms set for this node.
bool add_net_transform(PandaNode *node)
Adds the indicated node to the list of nodes that will be updated each frame with the joint's net tra...
bool has_local_transform(PandaNode *node) const
Returns true if the node is on the list of nodes that will be updated each frame with the joint's loc...
static TypedWritable * make_CharacterJoint(const FactoryParams ¶ms)
Factory method to generate a CharacterJoint object.
bool remove_local_transform(PandaNode *node)
Removes the indicated node from the list of nodes that will be updated each frame with the joint's lo...
void clear_net_transforms()
Removes all nodes from the list of nodes that will be updated each frame with the joint's net transfo...
bool add_local_transform(PandaNode *node)
Adds the indicated node to the list of nodes that will be updated each frame with the joint's local t...
bool remove_net_transform(PandaNode *node)
Removes the indicated node from the list of nodes that will be updated each frame with the joint's ne...
NodePathCollection get_net_transforms()
Returns a list of the net transforms set for this node.
void clear_local_transforms()
Removes all nodes from the list of nodes that will be updated each frame with the joint's local trans...
void get_transform(LMatrix4 &transform) const
Copies the joint's current transform into the indicated matrix.
An animated character, with skeleton-morph animation and either soft- skinned or hard-skinned vertice...
A class to retrieve the individual data elements previously stored in a Datagram.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
An instance of this class is passed to the Factory when requesting it to do its business and construc...
virtual bool update_internals(PartBundle *root, PartGroup *parent, bool self_changed, bool parent_changed, Thread *current_thread)
This is called by do_update() whenever the part or some ancestor has changed values.
virtual int complete_pointers(TypedWritable **plist, BamReader *manager)
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
static void register_with_read_factory()
Factory method to generate a MovingPartMatrix object.
virtual void write_datagram(BamWriter *manager, Datagram &me)
This is a set of zero or more NodePaths.
A basic node of the scene graph or data graph.
This is the root of a MovingPart hierarchy.
This is the base class for PartRoot and MovingPart.
virtual PartGroup * make_copy() const
Allocates and returns a new copy of the node.
virtual bool is_character_joint() const
Returns true if this part is a CharacterJoint, false otherwise.
virtual void do_xform(const LMatrix4 &mat, const LMatrix4 &inv_mat)
Called by PartBundle::xform(), this indicates the indicated transform is being applied to the root jo...
A thread; that is, a lightweight process.
TypeHandle is the identifier used to differentiate C++ class types.
Base class for objects that can be written to and read from Bam files.
A specialization of ordered_vector that emulates a standard STL set: one copy of each element is allo...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...