Panda3D
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Friends
JointVertexTransform Class Reference

This is a specialization on VertexTransform that returns the transform necessary to move vertices as if they were assigned to the indicated joint. More...

#include "jointVertexTransform.h"

Inheritance diagram for JointVertexTransform:
VertexTransform TypedWritableReferenceCount TypedWritable ReferenceCount TypedObject MemoryBase MemoryBase

List of all members.

Public Member Functions

 JointVertexTransform (CharacterJoint *joint)
 Constructs a new object that converts vertices from the indicated joint's coordinate space, into the other indicated joint's space.
virtual void accumulate_matrix (LMatrix4 &accum, PN_stdfloat weight) const
 Adds the value of this transform's matrix, modified by the indicated weight, into the indicated accumulation matrix.
virtual int complete_pointers (TypedWritable **plist, BamReader *manager)
 Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
virtual TypeHandle force_init_type ()
const CharacterJointget_joint () const
 Returns the joint for which this object returns the transform.
virtual void get_matrix (LMatrix4 &matrix) const
 Stores the transform's matrix in the indicated object.
virtual TypeHandle get_type () const
virtual void mult_matrix (LMatrix4 &result, const LMatrix4 &previous) const
 Premultiplies this transform's matrix with the indicated previous matrix, so that the result is the net composition of the given transform with this transform.
virtual void output (ostream &out) const
virtual void write_datagram (BamWriter *manager, Datagram &dg)
 Writes the contents of this object to the datagram for shipping out to a Bam file.

Static Public Member Functions

static TypeHandle get_class_type ()
static void init_type ()
static void register_with_read_factory ()
 Tells the BamReader how to create objects of type JointVertexTransform.

Protected Member Functions

void fillin (DatagramIterator &scan, BamReader *manager)
 This internal function is called by make_from_bam to read in all of the relevant data from the BamFile for the new JointVertexTransform.

Static Protected Member Functions

static TypedWritablemake_from_bam (const FactoryParams &params)
 This function is called by the BamReader's factory when a new object of type JointVertexTransform is encountered in the Bam file.

Friends

class CharacterJoint

Detailed Description

This is a specialization on VertexTransform that returns the transform necessary to move vertices as if they were assigned to the indicated joint.

The geometry itself should be parented to the scene graph at the level of the character's root joint; that is, it should not be parented under a node directly animated by any joints.

Multiple combinations of these with different weights are used to implement soft-skinned vertices for an animated character.

Definition at line 38 of file jointVertexTransform.h.


Constructor & Destructor Documentation

JointVertexTransform::JointVertexTransform ( CharacterJoint joint)

Constructs a new object that converts vertices from the indicated joint's coordinate space, into the other indicated joint's space.

Definition at line 44 of file jointVertexTransform.cxx.

References Thread::get_current_thread(), and VertexTransform::mark_modified().


Member Function Documentation

void JointVertexTransform::accumulate_matrix ( LMatrix4 accum,
PN_stdfloat  weight 
) const [virtual]

Adds the value of this transform's matrix, modified by the indicated weight, into the indicated accumulation matrix.

This is used to compute the result of several blended transforms.

Reimplemented from VertexTransform.

Definition at line 100 of file jointVertexTransform.cxx.

References LMatrix4f::accumulate().

int JointVertexTransform::complete_pointers ( TypedWritable **  p_list,
BamReader manager 
) [virtual]

Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().

Returns the number of pointers processed.

Reimplemented from TypedWritable.

Definition at line 163 of file jointVertexTransform.cxx.

void JointVertexTransform::fillin ( DatagramIterator scan,
BamReader manager 
) [protected, virtual]

This internal function is called by make_from_bam to read in all of the relevant data from the BamFile for the new JointVertexTransform.

Reimplemented from VertexTransform.

Definition at line 200 of file jointVertexTransform.cxx.

References Thread::get_current_thread(), VertexTransform::mark_modified(), and BamReader::read_pointer().

const CharacterJoint * JointVertexTransform::get_joint ( ) const [inline]

Returns the joint for which this object returns the transform.

Definition at line 23 of file jointVertexTransform.I.

void JointVertexTransform::get_matrix ( LMatrix4 matrix) const [virtual]

Stores the transform's matrix in the indicated object.

Implements VertexTransform.

Definition at line 70 of file jointVertexTransform.cxx.

TypedWritable * JointVertexTransform::make_from_bam ( const FactoryParams params) [static, protected]

This function is called by the BamReader's factory when a new object of type JointVertexTransform is encountered in the Bam file.

It should create the JointVertexTransform and extract its information from the file.

Definition at line 181 of file jointVertexTransform.cxx.

Referenced by register_with_read_factory().

void JointVertexTransform::mult_matrix ( LMatrix4 result,
const LMatrix4 previous 
) const [virtual]

Premultiplies this transform's matrix with the indicated previous matrix, so that the result is the net composition of the given transform with this transform.

The result is stored in the parameter "result", which should not be the same matrix as previous.

Reimplemented from VertexTransform.

Definition at line 86 of file jointVertexTransform.cxx.

Tells the BamReader how to create objects of type JointVertexTransform.

Definition at line 138 of file jointVertexTransform.cxx.

References BamReader::get_factory(), make_from_bam(), and Factory< Type >::register_factory().

void JointVertexTransform::write_datagram ( BamWriter manager,
Datagram dg 
) [virtual]

Writes the contents of this object to the datagram for shipping out to a Bam file.

Reimplemented from VertexTransform.

Definition at line 149 of file jointVertexTransform.cxx.

References BamWriter::write_pointer().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations