Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <unit_generic.h>
Public Member Functions | |
MeshAnimation (Unit *_unitDst) | |
bool | Init (const char *filename, int faction, Flightgroup *flightgrp=NULL, const char *animationExt=NULL) |
void | AnimationStep () |
void | clear () |
~MeshAnimation () | |
string | getAnimationName (unsigned int animationNumber) const |
unsigned int | getAnimationNumber (const char *name) const |
void | ChangeAnimation (const char *name) |
void | ChangeAnimation (unsigned int AnimNumber) |
void | StartAnimation (unsigned int how_many_times=0, int numAnimation=0) |
void | StopAnimation () |
bool | isAnimatedMesh () const |
bool | animationRuns () const |
unsigned int | numAnimations () |
bool | isContinuousLoop () const |
void | addAnimation (std::vector< Mesh * > *meshes, const char *name) |
double | framesPerSecond () const |
double | timePerFrame () const |
void | ToggleAnimatedMesh (bool on) |
void | SetAniSpeed (float speed) |
Static Public Member Functions | |
static void | UpdateFrames () |
Public Attributes | |
double | curtime |
Static Public Attributes | |
static unsigned int | unitCount = 0 |
static std::map< string, Unit * > | Units |
Protected Attributes | |
std::vector< std::vector< Mesh * > * > | vecAnimations |
std::vector< string > | vecAnimationNames |
bool | animatedMesh |
unsigned int | activeAnimation |
double | timeperframe |
bool | done |
unsigned int | activeMesh |
unsigned int | nextactiveMesh |
bool | infiniteLoop |
unsigned int | loopCount |
string | uniqueUnitName |
Unit * | unitDst |
Definition at line 1627 of file unit_generic.h.
MeshAnimation::MeshAnimation | ( | Unit * | _unitDst) |
Definition at line 8973 of file unit_generic.cpp.
|
inline |
Definition at line 1662 of file unit_generic.h.
void MeshAnimation::addAnimation | ( | std::vector< Mesh * > * | meshes, |
const char * | name | ||
) |
Definition at line 9147 of file unit_generic.cpp.
References animatedMesh, vecAnimationNames, and vecAnimations.
Referenced by Init().
bool MeshAnimation::animationRuns | ( | ) | const |
void MeshAnimation::AnimationStep | ( | ) |
Definition at line 9099 of file unit_generic.cpp.
References activeAnimation, activeMesh, Unit::Draw(), isContinuousLoop(), loopCount, Unit::meshdata, nextactiveMesh, uniqueUnitName, unitDst, and vecAnimations.
void MeshAnimation::ChangeAnimation | ( | const char * | name) |
Definition at line 9189 of file unit_generic.cpp.
References activeAnimation, getAnimationNumber(), isAnimatedMesh(), and numAnimations().
void MeshAnimation::ChangeAnimation | ( | unsigned int | AnimNumber) |
Definition at line 9196 of file unit_generic.cpp.
References activeAnimation, isAnimatedMesh(), and numAnimations().
void MeshAnimation::clear | ( | ) |
Definition at line 9237 of file unit_generic.cpp.
References j, StopAnimation(), uniqueUnitName, Units, vecAnimationNames, and vecAnimations.
double MeshAnimation::framesPerSecond | ( | ) | const |
Definition at line 9207 of file unit_generic.cpp.
References timeperframe.
string MeshAnimation::getAnimationName | ( | unsigned int | animationNumber) | const |
Definition at line 9174 of file unit_generic.cpp.
References vecAnimationNames.
unsigned int MeshAnimation::getAnimationNumber | ( | const char * | name) | const |
Definition at line 9179 of file unit_generic.cpp.
References vecAnimationNames.
Referenced by ChangeAnimation().
bool MeshAnimation::Init | ( | const char * | filename, |
int | faction, | ||
Flightgroup * | flightgrp = NULL , |
||
const char * | animationExt = NULL |
||
) |
Definition at line 9030 of file unit_generic.cpp.
References addAnimation(), StarSystemGent::faction, VSFileSystem::FileExistsData(), GFXVertexList::GetNumVertices(), Mesh::getVertexList(), Mesh::LoadMesh(), VSFileSystem::MeshFile, Unit::name, toLowerCase(), uniqueUnitName, unitCount, unitDst, Units, and Vector.
bool MeshAnimation::isAnimatedMesh | ( | ) | const |
Definition at line 9202 of file unit_generic.cpp.
References animatedMesh.
Referenced by ChangeAnimation().
bool MeshAnimation::isContinuousLoop | ( | ) | const |
Definition at line 9227 of file unit_generic.cpp.
References infiniteLoop.
Referenced by AnimationStep().
unsigned int MeshAnimation::numAnimations | ( | ) |
Definition at line 9217 of file unit_generic.cpp.
References vecAnimations.
Referenced by ChangeAnimation().
void MeshAnimation::SetAniSpeed | ( | float | speed) |
Definition at line 9232 of file unit_generic.cpp.
References speed, and timeperframe.
Definition at line 9155 of file unit_generic.cpp.
References animationRuns(), done, infiniteLoop, and StopAnimation().
void MeshAnimation::StopAnimation | ( | ) |
Definition at line 9169 of file unit_generic.cpp.
References done.
Referenced by clear(), and StartAnimation().
double MeshAnimation::timePerFrame | ( | ) | const |
Definition at line 9212 of file unit_generic.cpp.
References timeperframe.
void MeshAnimation::ToggleAnimatedMesh | ( | bool | on) |
Definition at line 9222 of file unit_generic.cpp.
References animatedMesh.
|
static |
Definition at line 9134 of file unit_generic.cpp.
References GetElapsedTime(), and Units.
Referenced by GameStarSystem::Draw().
|
protected |
Definition at line 1634 of file unit_generic.h.
Referenced by AnimationStep(), and ChangeAnimation().
|
protected |
Definition at line 1637 of file unit_generic.h.
Referenced by AnimationStep().
|
protected |
Definition at line 1633 of file unit_generic.h.
Referenced by addAnimation(), isAnimatedMesh(), and ToggleAnimatedMesh().
double MeshAnimation::curtime |
Definition at line 1646 of file unit_generic.h.
|
protected |
Definition at line 1636 of file unit_generic.h.
Referenced by animationRuns(), StartAnimation(), and StopAnimation().
|
protected |
Definition at line 1639 of file unit_generic.h.
Referenced by isContinuousLoop(), and StartAnimation().
|
protected |
Definition at line 1640 of file unit_generic.h.
Referenced by AnimationStep().
|
protected |
Definition at line 1638 of file unit_generic.h.
Referenced by AnimationStep().
|
protected |
Definition at line 1635 of file unit_generic.h.
Referenced by framesPerSecond(), SetAniSpeed(), and timePerFrame().
|
protected |
Definition at line 1642 of file unit_generic.h.
Referenced by AnimationStep(), clear(), and Init().
|
static |
Definition at line 1648 of file unit_generic.h.
Referenced by Init().
|
protected |
Definition at line 1643 of file unit_generic.h.
Referenced by AnimationStep(), and Init().
|
static |
Definition at line 1650 of file unit_generic.h.
Referenced by clear(), Init(), and UpdateFrames().
|
protected |
Definition at line 1631 of file unit_generic.h.
Referenced by addAnimation(), clear(), getAnimationName(), and getAnimationNumber().
|
protected |
Definition at line 1630 of file unit_generic.h.
Referenced by addAnimation(), AnimationStep(), clear(), and numAnimations().