Panda3D
Public Types | Public Member Functions

GeomVertexAnimationSpec Class Reference

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

Inheritance diagram for GeomVertexAnimationSpec:
GeomEnums

List of all members.

Public Types

enum  AnimationType { ATNone = 0, ATPanda = 1, ATHardware = 2 }
enum  Contents {
  COther = 0, CPoint = 1, CClipPoint = 2, CVector = 3,
  CTexcoord = 4, CColor = 5, CIndex = 6, CMorphDelta = 7
}
enum  GeomRendering {
  GRIndexedPoint = 1, GRIndexedOther = 65536, GRIndexedBits = 65537, GRPoint = 2,
  GRPointUniformSize = 4, GRPerPointSize = 8, GRPointPerspective = 16, GRPointAspectRatio = 32,
  GRPointScale = 64, GRPointRotate = 128, GRPointSprite = 256, GRPointSpriteTexMatrix = 512,
  GRPointBits = 1022, GRTriangleStrip = 1024, GRTriangleFan = 2048, GRLineStrip = 4096,
  GRCompositeBits = 7168, GRFlatFirstVertex = 8192, GRFlatLastVertex = 16384, GRShadeModelBits = 24576,
  GRTexcoordLightVector = 32768
}
enum  NumericType {
  NTUint8 = 0, NTUint16 = 1, NTUint32 = 2, NTPackedDcba = 3,
  NTPackedDabc = 4, NTFloat32 = 5
}
enum  PrimitiveType { PTNone = 0, PTPolygons = 1, PTLines = 2, PTPoints = 3 }
enum  ShadeModel { SMUniform = 0, SMSmooth = 1, SMFlatFirstVertex = 2, SMFlatLastVertex = 3 }
enum  UsageHint {
  UHClient = 0, UHStream = 1, UHDynamic = 2, UHStatic = 3,
  UHUnspecified = 4
}

Public Member Functions

 GeomVertexAnimationSpec ()
 GeomVertexAnimationSpec (GeomVertexAnimationSpec const other)
AnimationType getAnimationType ()
 Returns the type of animation represented by this spec.
bool getIndexedTransforms ()
 This is only meaningful for animation_type AT_hardware.
int getNumTransforms ()
 This is only meaningful for animation_type AT_hardware.
GeomVertexAnimationSpec operator= (GeomVertexAnimationSpec const other)
 output (ostream out)
 setHardware (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).
 setNone ()
 Specifies that no vertex animation is represented by this spec.
 setPanda ()
 Specifies that vertex animation is to be performed by Panda.

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.


Member Enumeration Documentation

enum AnimationType [inherited]
Enumerator:
ATNone 
ATPanda 
ATHardware 
enum Contents [inherited]
Enumerator:
COther 
CPoint 
CClipPoint 
CVector 
CTexcoord 
CColor 
CIndex 
CMorphDelta 
enum GeomRendering [inherited]
Enumerator:
GRIndexedPoint 
GRIndexedOther 
GRIndexedBits 
GRPoint 
GRPointUniformSize 
GRPerPointSize 
GRPointPerspective 
GRPointAspectRatio 
GRPointScale 
GRPointRotate 
GRPointSprite 
GRPointSpriteTexMatrix 
GRPointBits 
GRTriangleStrip 
GRTriangleFan 
GRLineStrip 
GRCompositeBits 
GRFlatFirstVertex 
GRFlatLastVertex 
GRShadeModelBits 
GRTexcoordLightVector 
enum NumericType [inherited]
Enumerator:
NTUint8 
NTUint16 
NTUint32 
NTPackedDcba 
NTPackedDabc 
NTFloat32 
enum PrimitiveType [inherited]
Enumerator:
PTNone 
PTPolygons 
PTLines 
PTPoints 
enum ShadeModel [inherited]
Enumerator:
SMUniform 
SMSmooth 
SMFlatFirstVertex 
SMFlatLastVertex 
enum UsageHint [inherited]
Enumerator:
UHClient 
UHStream 
UHDynamic 
UHStatic 
UHUnspecified 

Constructor & Destructor Documentation


Member Function Documentation

AnimationType getAnimationType ( )

Returns the type of animation represented by this spec.

bool getIndexedTransforms ( )

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.

int getNumTransforms ( )

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.

output ( ostream  out)
setHardware ( 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).

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.

setNone ( )

Specifies that no vertex animation is represented by this spec.

setPanda ( )

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.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties