newspeoplefor developersdocumentationdownloads

nSkinShapeNode Class Reference
[Scene System]

#include <nskinshapenode.h>

Inheritance diagram for nSkinShapeNode:

nShapeNode nMaterialNode nAbstractShaderNode nTransformNode nSceneNode nRoot nObject nNode nReferenced nSignalEmitter List of all members.

Detailed Description

A smooth skinned shape node.

Requires that a nSkinAnimator is attached as an animator which is called back by the skin shape before rendering to provide a valid joint palette.

See also nSkinShapeNode Script Interface

(C) 2003 RadonLabs GmbH

Definition at line 27 of file nskinshapenode.h.


Public Member Functions

 nSkinShapeNode ()
 constructor
virtual ~nSkinShapeNode ()
 destructor
virtual bool SaveCmds (nPersistServer *ps)
 object persistency
virtual bool ApplyGeometry (nSceneServer *sceneServer)
 perform pre-instance geometry setup
virtual bool RenderGeometry (nSceneServer *sceneServer, nRenderContext *renderContext)
 render per-instance geometry
virtual void RenderDebug (nSceneServer *sceneServer, nRenderContext *renderContext, const matrix44 &modelMatrix)
 render debug information
virtual int GetMeshUsage () const
 get the mesh usage flags required by this shape node
void SetSkinAnimator (const char *path)
 set the skin animator
const char * GetSkinAnimator () const
 get the skin animator
void SetCharSkeleton (const nCharSkeleton *charSkeleton)
 set pointer to an uptodate character skeleton object (called exclusively by nSkinAnimator)
const nCharSkeletonGetCharSkeleton () const
 get pointer to an uptodate character skeleton object
void BeginFragments (int num)
 begin defining mesh fragments
void SetFragGroupIndex (int fragIndex, int meshGroupIndex)
 set mesh group index of a skin fragment
int GetFragGroupIndex (int fragIndex) const
 get mesh group index of a skin fragment
void BeginJointPalette (int fragIndex, int numJoints)
 begin defining the joint palette of a fragment
void SetJointIndices (int fragIndex, int paletteIndex, int ji0, int ji1, int ji2, int ji3, int ji4, int ji5, int ji6, int ji7)
 add up to 8 joint indices to the fragments joint palette
void SetJointIndex (int fragIndex, int paletteIndex, int jointIndex)
 add a single joint index to the fragments joint palette
void EndJointPalette (int fragIndex)
 finish adding joints to the joint palette
void EndFragments ()
 finish defining fragments
int GetNumFragments () const
 get number of fragments
int GetJointPaletteSize (int fragIndex) const
 get number of joints in a fragment's joint palette
int GetJointIndex (int fragIndex, int paletteIndex) const
 get a joint index from a fragment's joint palette
void SetChar3VariationFlag (bool value)
 set a marker that this is a skin that is bound to a variation
bool GetChar3VariationFlag () const
 get a marker if this is a skin that is bound to a variation

Classes

class  Fragment
 a private skin fragment class

Constructor & Destructor Documentation

nSkinShapeNode::nSkinShapeNode  ) 
 

constructor

Definition at line 13 of file nskinshapenode_main.cc.

nSkinShapeNode::~nSkinShapeNode  )  [virtual]
 

destructor

Definition at line 23 of file nskinshapenode_main.cc.


Member Function Documentation

virtual bool nSkinShapeNode::SaveCmds nPersistServer ps  )  [virtual]
 

object persistency

Reimplemented from nShapeNode.

bool nSkinShapeNode::ApplyGeometry nSceneServer sceneServer  )  [virtual]
 

perform pre-instance geometry setup

Reimplemented from nShapeNode.

Definition at line 56 of file nskinshapenode_main.cc.

bool nSkinShapeNode::RenderGeometry nSceneServer sceneServer,
nRenderContext renderContext
[virtual]
 

render per-instance geometry

This overrides the standard nShapeNode geometry rendering. Instead of setting the mesh directly in the gfx server, the embedded nCharSkinRenderer is asked to do the rendering for us.

Reimplemented from nShapeNode.

Definition at line 75 of file nskinshapenode_main.cc.

void nSkinShapeNode::RenderDebug nSceneServer sceneServer,
nRenderContext renderContext,
const matrix44 modelMatrix
[virtual]
 

render debug information

Render debugging information for this mesh (the joints)

Reimplemented from nShapeNode.

Definition at line 107 of file nskinshapenode_main.cc.

int nSkinShapeNode::GetMeshUsage  )  const [virtual]
 

get the mesh usage flags required by this shape node

This method must return the mesh usage flag combination required by this shape node class. Subclasses should override this method based on their requirements.

Returns:
a combination on nMesh2::Usage flags

Reimplemented from nShapeNode.

Definition at line 47 of file nskinshapenode_main.cc.

void nSkinShapeNode::SetSkinAnimator const char *  path  ) 
 

set the skin animator

Set relative path to the skin animator object.

Definition at line 163 of file nskinshapenode_main.cc.

const char * nSkinShapeNode::GetSkinAnimator  )  const
 

get the skin animator

Get relative path to the skin animator object

Definition at line 174 of file nskinshapenode_main.cc.

void nSkinShapeNode::SetCharSkeleton const nCharSkeleton charSkeleton  ) 
 

set pointer to an uptodate character skeleton object (called exclusively by nSkinAnimator)

Update the pointer to an uptodate nCharSkeleton object. This pointer is provided by the nSkinAnimator object and is routed to the nCharSkinRenderer so that the mesh can be properly deformed.

Definition at line 186 of file nskinshapenode_main.cc.

const nCharSkeleton * nSkinShapeNode::GetCharSkeleton  )  const
 

get pointer to an uptodate character skeleton object

Returns the character skeleton object

Definition at line 33 of file nskinshapenode_main.cc.

void nSkinShapeNode::BeginFragments int  num  ) 
 

begin defining mesh fragments

Begin defining mesh fragment. A skin mesh may be divided into several fragments to account for gfx hardware which an only render a skinned mesh with a limited number of influence objects (joints).

Definition at line 199 of file nskinshapenode_main.cc.

void nSkinShapeNode::SetFragGroupIndex int  fragIndex,
int  meshGroupIndex
 

set mesh group index of a skin fragment

Set the mesh group index for a skin fragment.

Definition at line 210 of file nskinshapenode_main.cc.

int nSkinShapeNode::GetFragGroupIndex int  fragIndex  )  const
 

get mesh group index of a skin fragment

Get the mesh group index for a skin fragment.

Definition at line 220 of file nskinshapenode_main.cc.

void nSkinShapeNode::BeginJointPalette int  fragIndex,
int  numJoints
 

begin defining the joint palette of a fragment

Begin defining the joint palette of a skin fragment.

Definition at line 230 of file nskinshapenode_main.cc.

void nSkinShapeNode::SetJointIndices int  fragIndex,
int  paletteIndex,
int  ji0,
int  ji1,
int  ji2,
int  ji3,
int  ji4,
int  ji5,
int  ji6,
int  ji7
 

add up to 8 joint indices to the fragments joint palette

Add up to 8 joints to a fragments joint palette starting at a given palette index.

Definition at line 241 of file nskinshapenode_main.cc.

void nSkinShapeNode::SetJointIndex int  fragIndex,
int  paletteIndex,
int  jointIndex
 

add a single joint index to the fragments joint palette

Definition at line 259 of file nskinshapenode_main.cc.

void nSkinShapeNode::EndJointPalette int  fragIndex  ) 
 

finish adding joints to the joint palette

Finish defining the joint palette of a skin fragment.

Definition at line 270 of file nskinshapenode_main.cc.

void nSkinShapeNode::EndFragments  ) 
 

finish defining fragments

Finish defining fragments.

Definition at line 280 of file nskinshapenode_main.cc.

int nSkinShapeNode::GetNumFragments  )  const
 

get number of fragments

Get number of fragments.

Definition at line 290 of file nskinshapenode_main.cc.

int nSkinShapeNode::GetJointPaletteSize int  fragIndex  )  const
 

get number of joints in a fragment's joint palette

Get joint palette size of a skin fragment.

Definition at line 300 of file nskinshapenode_main.cc.

int nSkinShapeNode::GetJointIndex int  fragIndex,
int  paletteIndex
const
 

get a joint index from a fragment's joint palette

Get a joint index from a fragment's joint index.

Definition at line 310 of file nskinshapenode_main.cc.

void nSkinShapeNode::SetChar3VariationFlag bool  value  )  [inline]
 

set a marker that this is a skin that is bound to a variation

Definition at line 151 of file nskinshapenode.h.

bool nSkinShapeNode::GetChar3VariationFlag  )  const [inline]
 

get a marker if this is a skin that is bound to a variation

Definition at line 162 of file nskinshapenode.h.


The documentation for this class was generated from the following files:

Copyright © 1999-2005 by the contributing authors. Ideas, requests, problems: Send feedback.