NL3D::CSkeletonWeight Class Reference

#include <skeleton_weight.h>


Detailed Description

A skeleton template is a set of couple value_name / float.

The value name is used to find a channel in the CChannelMixer. The float is a weight used on a slot of the channel mixer by the channel.

Author:
Cyril 'Hulud' Corvazier

Nevrax France

Date:
2001

Definition at line 51 of file skeleton_weight.h.

Public Types

typedef std::vector< CNodeTNodeArray
 A vector of template elements.


Public Member Functions

void build (const TNodeArray &array)
 Build the template.

const std::string & getNodeName (uint node) const
 Get a node name.

float getNodeWeight (uint node) const
 Get a node weight.

uint getNumNode () const
 Get number of node in this template.

void serial (NLMISC::IStream &f)
 Serial the template.


Private Attributes

TNodeArray _Elements


Member Typedef Documentation

typedef std::vector<CNode> NL3D::CSkeletonWeight::TNodeArray
 

A vector of template elements.

Definition at line 69 of file skeleton_weight.h.

Referenced by build().


Member Function Documentation

void NL3D::CSkeletonWeight::build const TNodeArray array  ) 
 

Build the template.

Definition at line 61 of file skeleton_weight.cpp.

References TNodeArray.

00062 {
00063         // Copy the array
00064         _Elements=array;
00065 }

const std::string & NL3D::CSkeletonWeight::getNodeName uint  node  )  const
 

Get a node name.

Definition at line 45 of file skeleton_weight.cpp.

References uint.

Referenced by NL3D::CChannelMixer::applySkeletonWeight().

00046 {
00047         // Return the name of the n-th node
00048         return _Elements[node].Name;
00049 }

float NL3D::CSkeletonWeight::getNodeWeight uint  node  )  const
 

Get a node weight.

Definition at line 53 of file skeleton_weight.cpp.

References uint.

Referenced by NL3D::CChannelMixer::applySkeletonWeight().

00054 {
00055         // Return the name of the n-th node
00056         return _Elements[node].Weight;
00057 }

uint NL3D::CSkeletonWeight::getNumNode  )  const
 

Get number of node in this template.

Definition at line 38 of file skeleton_weight.cpp.

References uint.

Referenced by NL3D::CChannelMixer::applySkeletonWeight().

00039 {
00040         return _Elements.size();
00041 }

void NL3D::CSkeletonWeight::serial NLMISC::IStream f  ) 
 

Serial the template.

Definition at line 69 of file skeleton_weight.cpp.

References NLMISC::IStream::serialCheck(), NLMISC::IStream::serialCont(), NLMISC::IStream::serialVersion(), and uint32.

00070 {
00071         // Serial a header
00072         f.serialCheck ((uint32)'TWKS');
00073 
00074         // Serial a version number
00075         (void)f.serialVersion (0);
00076 
00077         // Serial the array
00078         f.serialCont (_Elements);
00079 }


Field Documentation

TNodeArray NL3D::CSkeletonWeight::_Elements [private]
 

Definition at line 87 of file skeleton_weight.h.


The documentation for this class was generated from the following files:
Generated on Tue Mar 16 07:47:02 2004 for NeL by doxygen 1.3.6