- Cal3D 0.11 API Reference -

morphtargetmixer.h
1//****************************************************************************//
2// morphtargetmixer.h //
3// Copyright (C) 2001, 2002 Bruno 'Beosil' Heidelberger //
4//****************************************************************************//
5// This library is free software; you can redistribute it and/or modify it //
6// under the terms of the GNU Lesser General Public License as published by //
7// the Free Software Foundation; either version 2.1 of the License, or (at //
8// your option) any later version. //
9//****************************************************************************//
10
11#ifndef CAL_MORPHTARGETMIXER_H
12#define CAL_MORPHTARGETMIXER_H
13
14
15#include "cal3d/global.h"
16
17
18 class CalModel;
19
20
21 class CAL3D_API CalMorphTargetMixer
22{
23 public:
24 CalMorphTargetMixer(CalModel* model);
25 ~CalMorphTargetMixer() { }
26
27 bool blend(int id, float weight, float delay);
28 bool clear(int id, float delay);
29 float getCurrentWeight(int id);
30 float getCurrentWeightBase();
31 int getMorphTargetCount();
32 void update(float deltaTime);
33
34 private:
35 std::vector<float> m_vectorCurrentWeight;
36 std::vector<float> m_vectorEndWeight;
37 std::vector<float> m_vectorDuration;
38 CalModel *m_pModel;
39};
40
41#endif
42
43//****************************************************************************//
CalModel
Definition model.h:31
CalMorphTargetMixer::update
void update(float deltaTime)
Updates all morph targets.
Definition morphtargetmixer.cpp:158
CalMorphTargetMixer::CalMorphTargetMixer
CalMorphTargetMixer(CalModel *model)
Constructs the morph target mixer instance.
Definition morphtargetmixer.cpp:35
CalMorphTargetMixer::getCurrentWeightBase
float getCurrentWeightBase()
Get the weight of the base vertices.
Definition morphtargetmixer.cpp:137
CalMorphTargetMixer::blend
bool blend(int id, float weight, float delay)
Interpolates the weight of a morph target.
Definition morphtargetmixer.cpp:77
CalMorphTargetMixer::getCurrentWeight
float getCurrentWeight(int id)
Get the weight of a morph target.
Definition morphtargetmixer.cpp:122
CalMorphTargetMixer::getMorphTargetCount
int getMorphTargetCount()
Returns the number of morph targets this morph target mixer mixes.
Definition morphtargetmixer.cpp:211
CalMorphTargetMixer::clear
bool clear(int id, float delay)
Fades a morph target out.
Definition morphtargetmixer.cpp:103

Generated by The Cal3D Team with Doxygen 1.15.0