newspeoplefor developersdocumentationdownloads

nAnimBuilder::Curve Class Reference

#include <nanimbuilder.h>

List of all members.


Detailed Description

an animation curve

Definition at line 53 of file nanimbuilder.h.


Public Types

enum  IpolType {
  NONE,
  STEP,
  LINEAR,
  QUAT
}
 interpolation types More...

Public Member Functions

 Curve ()
 default constructor
 Curve (int numKeys, const Key &fillKey)
 fixed size constructor
void SetKey (int index, const Key &key)
 add a key to the end of the array
int GetNumKeys () const
 get number of keys
KeyGetKeyAt (int index)
 get key at index
void SetIpolType (IpolType t)
 set the interpolation type of the curve
IpolType GetIpolType () const
 get the interpolation type of the curve
void SetFirstKeyIndex (int i)
 set the first key index
int GetFirstKeyIndex () const
 get the first key index
bool Optimize ()
 optimize the curve
void SetCollapsed (bool b)
 set collapsed flag
bool IsCollapsed () const
 check whether the curve has been collapsed by Optimize()
void SetCollapsedKey (const vector4 &key)
 set the collapsed key
const vector4GetCollapsedKey () const
 get the collapsed key
void SetIsAnimated (int isAnim)
 flag = true, if curve belongs to an animated joint
int IsAnimated () const
 returns isAnimated flag

Static Public Member Functions

static const char * IpolType2String (IpolType t)
 convert ipol type to string
static IpolType String2IpolType (const char *str)
 convert string to ipol type

Public Attributes

nArray< KeykeyArray
IpolType ipolType
bool isCollapsed
int firstKeyIndex
vector4 collapsedKey
int isAnimated

Member Enumeration Documentation

enum nAnimBuilder::Curve::IpolType
 

interpolation types

Enumerator:
NONE 
STEP 
LINEAR 
QUAT 

Definition at line 57 of file nanimbuilder.h.


Constructor & Destructor Documentation

nAnimBuilder::Curve::Curve  )  [inline]
 

default constructor

Definition at line 299 of file nanimbuilder.h.

nAnimBuilder::Curve::Curve int  numKeys,
const Key fillKey
[inline]
 

fixed size constructor

Definition at line 313 of file nanimbuilder.h.


Member Function Documentation

void nAnimBuilder::Curve::SetKey int  index,
const Key key
[inline]
 

add a key to the end of the array

Definition at line 328 of file nanimbuilder.h.

int nAnimBuilder::Curve::GetNumKeys  )  const [inline]
 

get number of keys

Definition at line 338 of file nanimbuilder.h.

nAnimBuilder::Key & nAnimBuilder::Curve::GetKeyAt int  index  )  [inline]
 

get key at index

Definition at line 348 of file nanimbuilder.h.

void nAnimBuilder::Curve::SetIpolType IpolType  t  )  [inline]
 

set the interpolation type of the curve

Definition at line 358 of file nanimbuilder.h.

nAnimBuilder::Curve::IpolType nAnimBuilder::Curve::GetIpolType  )  const [inline]
 

get the interpolation type of the curve

Definition at line 368 of file nanimbuilder.h.

void nAnimBuilder::Curve::SetFirstKeyIndex int  i  )  [inline]
 

set the first key index

Definition at line 378 of file nanimbuilder.h.

int nAnimBuilder::Curve::GetFirstKeyIndex  )  const [inline]
 

get the first key index

Definition at line 388 of file nanimbuilder.h.

bool nAnimBuilder::Curve::Optimize  )  [inline]
 

optimize the curve

This checks whether all keys in the curve are identical. If yes, the Collapsed flag will be set, and the collapsed key is set to the first key in the curve.

  • 18-Oct-2004 floh optimized curves have ipolType no longer set to NONE!

Definition at line 403 of file nanimbuilder.h.

void nAnimBuilder::Curve::SetCollapsed bool  b  )  [inline]
 

set collapsed flag

Definition at line 432 of file nanimbuilder.h.

bool nAnimBuilder::Curve::IsCollapsed  )  const [inline]
 

check whether the curve has been collapsed by Optimize()

Definition at line 442 of file nanimbuilder.h.

void nAnimBuilder::Curve::SetCollapsedKey const vector4 key  )  [inline]
 

set the collapsed key

Definition at line 452 of file nanimbuilder.h.

const vector4 & nAnimBuilder::Curve::GetCollapsedKey  )  const [inline]
 

get the collapsed key

Definition at line 462 of file nanimbuilder.h.

const char * nAnimBuilder::Curve::IpolType2String IpolType  t  )  [inline, static]
 

convert ipol type to string

Definition at line 472 of file nanimbuilder.h.

nAnimBuilder::Curve::IpolType nAnimBuilder::Curve::String2IpolType const char *  str  )  [inline, static]
 

convert string to ipol type

Definition at line 490 of file nanimbuilder.h.

void nAnimBuilder::Curve::SetIsAnimated int  isAnim  )  [inline]
 

flag = true, if curve belongs to an animated joint

Definition at line 767 of file nanimbuilder.h.

int nAnimBuilder::Curve::IsAnimated  )  const [inline]
 

returns isAnimated flag

Definition at line 777 of file nanimbuilder.h.


Member Data Documentation

nArray<Key> nAnimBuilder::Curve::keyArray
 

Definition at line 102 of file nanimbuilder.h.

IpolType nAnimBuilder::Curve::ipolType
 

Definition at line 103 of file nanimbuilder.h.

bool nAnimBuilder::Curve::isCollapsed
 

Definition at line 104 of file nanimbuilder.h.

int nAnimBuilder::Curve::firstKeyIndex
 

Definition at line 105 of file nanimbuilder.h.

vector4 nAnimBuilder::Curve::collapsedKey
 

Definition at line 106 of file nanimbuilder.h.

int nAnimBuilder::Curve::isAnimated
 

Definition at line 107 of file nanimbuilder.h.


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

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