Panda3D
Public Member Functions

GeomVertexAnimationSpec Class Reference

This object describes how the vertex animation, if any, represented in a GeomVertexData is encoded. More...

#include "geomVertexAnimationSpec.h"

Inheritance diagram for GeomVertexAnimationSpec:
GeomEnums

List of all members.

Public Member Functions

 GeomVertexAnimationSpec (const GeomVertexAnimationSpec &other)
int compare_to (const GeomVertexAnimationSpec &other) const
 Provides an arbitrary ordering between different animation specs.
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 GeomVertexAnimationSpec.
AnimationType get_animation_type () const
 Returns the type of animation represented by this spec.
bool get_indexed_transforms () const
 This is only meaningful for animation_type AT_hardware.
int get_num_transforms () const
 This is only meaningful for animation_type AT_hardware.
bool operator!= (const GeomVertexAnimationSpec &other) const
bool operator< (const GeomVertexAnimationSpec &other) const
 Provides an arbitrary ordering between different animation specs.
void operator= (const GeomVertexAnimationSpec &other)
bool operator== (const GeomVertexAnimationSpec &other) const
void output (ostream &out) const
void set_hardware (int num_transforms, bool indexed_transforms)
 Specifies that vertex animation is to be performed by the graphics hardware (or at least by the graphics backend API, which is actually still free to animate the vertices on the CPU).
void set_none ()
 Specifies that no vertex animation is represented by this spec.
void set_panda ()
 Specifies that vertex animation is to be performed by Panda.
void write_datagram (BamWriter *manager, Datagram &dg)
 Writes the contents of this object to the datagram for shipping out to a Bam file.

Detailed Description

This object describes how the vertex animation, if any, represented in a GeomVertexData is encoded.

Vertex animation includes soft-skinned skeleton animation and morphs (blend shapes), and might be performed on the CPU by Panda, or passed down to the graphics backed to be performed on the hardware (depending on the hardware's advertised capabilities).

Changing this setting doesn't by itself change the way the animation is actually performed; this just specifies how the vertices are set up to be animated.

Definition at line 42 of file geomVertexAnimationSpec.h.


Member Function Documentation

int GeomVertexAnimationSpec::compare_to ( const GeomVertexAnimationSpec other) const [inline]

Provides an arbitrary ordering between different animation specs.

Definition at line 173 of file geomVertexAnimationSpec.I.

Referenced by operator<().

void GeomVertexAnimationSpec::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 GeomVertexAnimationSpec.

Definition at line 63 of file geomVertexAnimationSpec.cxx.

References DatagramIterator::get_bool(), DatagramIterator::get_uint16(), and DatagramIterator::get_uint8().

GeomVertexAnimationSpec::AnimationType GeomVertexAnimationSpec::get_animation_type ( ) const [inline]
bool GeomVertexAnimationSpec::get_indexed_transforms ( ) const [inline]

This is only meaningful for animation_type AT_hardware.

If true, it indicates that the format uses indexed animation tables. It is false if each vertex will reference the first _num_transforms table entries only.

Definition at line 88 of file geomVertexAnimationSpec.I.

Referenced by DXGraphicsStateGuardian9::begin_draw_primitives(), DXGraphicsStateGuardian8::begin_draw_primitives(), and GeomVertexData::copy_from().

int GeomVertexAnimationSpec::get_num_transforms ( ) const [inline]

This is only meaningful for animation_type AT_hardware.

It specifies the maximum number of transforms that might be simultaneously applied to any one vertex by the data in this format.

Definition at line 74 of file geomVertexAnimationSpec.I.

Referenced by DXGraphicsStateGuardian9::begin_draw_primitives(), and DXGraphicsStateGuardian8::begin_draw_primitives().

bool GeomVertexAnimationSpec::operator< ( const GeomVertexAnimationSpec other) const [inline]

Provides an arbitrary ordering between different animation specs.

Definition at line 142 of file geomVertexAnimationSpec.I.

References compare_to().

void GeomVertexAnimationSpec::set_hardware ( int  num_transforms,
bool  indexed_transforms 
) [inline]

Specifies that vertex animation is to be performed by the graphics hardware (or at least by the graphics backend API, which is actually still free to animate the vertices on the CPU).

This is only legal if the graphics hardware can support the specified limits on number of transforms and/or indexed transforms. Also, no current graphics API's support morphing.

Definition at line 129 of file geomVertexAnimationSpec.I.

void GeomVertexAnimationSpec::set_none ( ) [inline]

Specifies that no vertex animation is represented by this spec.

Definition at line 99 of file geomVertexAnimationSpec.I.

void GeomVertexAnimationSpec::set_panda ( ) [inline]

Specifies that vertex animation is to be performed by Panda.

This is the most general setting and can handle any kind of vertex animation represented.

Definition at line 111 of file geomVertexAnimationSpec.I.

void GeomVertexAnimationSpec::write_datagram ( BamWriter manager,
Datagram dg 
)

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

Definition at line 49 of file geomVertexAnimationSpec.cxx.

References Datagram::add_bool(), Datagram::add_uint16(), and Datagram::add_uint8().


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