- Cal3D 0.11 API Reference -

model.h
1//****************************************************************************//
2// model.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_MODEL_H
12#define CAL_MODEL_H
13
14
15#include "cal3d/global.h"
16#include "cal3d/vector.h"
17
18
19 class CalCoreModel;
20 class CalSkeleton;
21 class CalAbstractMixer;
22 class CalMixer;
23 class CalMorphTargetMixer;
24 class CalPhysique;
25 class CalSpringSystem;
26 class CalRenderer;
27 class CalMesh;
28
29
30 class CAL3D_API CalModel : cal3d::noncopyable
31{
32 public:
33 CalModel(CalCoreModel* pCoreModel);
34 ~CalModel();
35
36 bool attachMesh(int coreMeshId);
37 bool detachMesh(int coreMeshId);
38 CalCoreModel *getCoreModel() const;
39 CalMesh *getMesh(int coreMeshId) const;
40 CalMixer *getMixer() const;
41 CalAbstractMixer *getAbstractMixer() const;
42 void setAbstractMixer(CalAbstractMixer* pMixer);
43 CalMorphTargetMixer *getMorphTargetMixer() const;
44 CalPhysique *getPhysique() const;
45 CalRenderer *getRenderer() const;
46 CalSkeleton *getSkeleton() const;
47 CalSpringSystem *getSpringSystem() const;
48 CalBoundingBox & getBoundingBox(bool precision = false);
49 Cal::UserData getUserData() const;
50 std::vector<CalMesh *>& getVectorMesh();
51 void setLodLevel(float lodLevel);
52 void setMaterialSet(int setId);
53 void setUserData(Cal::UserData userData);
54 void update(float deltaTime);
55 void disableInternalData();
56
57 private:
58 CalCoreModel *m_pCoreModel;
59 CalSkeleton *m_pSkeleton;
60 CalAbstractMixer *m_pMixer;
61 CalMorphTargetMixer *m_pMorphTargetMixer;
62 CalPhysique *m_pPhysique;
63 CalSpringSystem *m_pSpringSystem;
64 CalRenderer *m_pRenderer;
65 Cal::UserData m_userData;
66 std::vector<CalMesh *> m_vectorMesh;
67 CalBoundingBox m_boundingBox;
68};
69
70#endif
71
72//****************************************************************************//
CalAbstractMixer
CalAbstractMixer defines the API that CalModel relies on for blending and scheduling animations.
Definition mixer.h:98
CalBoundingBox
The bounding box class.
Definition vector.h:221
CalCoreModel
Definition coremodel.h:26
CalMesh
Definition mesh.h:24
CalMixer
Definition mixer.h:153
CalModel::getAbstractMixer
CalAbstractMixer * getAbstractMixer() const
Returns the mixer.
Definition model.cpp:272
CalModel::setAbstractMixer
void setAbstractMixer(CalAbstractMixer *pMixer)
Sets the mixer to a CalAbstractMixer subclass instance.
Definition model.cpp:300
CalModel::getUserData
Cal::UserData getUserData() const
Provides access to the user data.
Definition model.cpp:465
CalModel::disableInternalData
void disableInternalData()
Disable internal data (and thus springs system).
Definition model.cpp:558
CalModel::setMaterialSet
void setMaterialSet(int setId)
Sets the material set.
Definition model.cpp:511
CalModel::getMixer
CalMixer * getMixer() const
Returns the mixer.
Definition model.cpp:252
CalModel::update
void update(float deltaTime)
Updates the model instance.
Definition model.cpp:543
CalModel::getMorphTargetMixer
CalMorphTargetMixer * getMorphTargetMixer() const
Provides access to the morph target mixer.
Definition model.cpp:315
CalModel::getSpringSystem
CalSpringSystem * getSpringSystem() const
Provides access to the spring system.
Definition model.cpp:375
CalModel::detachMesh
bool detachMesh(int coreMeshId)
Detaches a mesh.
Definition model.cpp:151
CalModel::attachMesh
bool attachMesh(int coreMeshId)
Attachs a mesh.
Definition model.cpp:96
CalModel::CalModel
CalModel(CalCoreModel *pCoreModel)
Constructs the model instance.
Definition model.cpp:40
CalModel::getPhysique
CalPhysique * getPhysique() const
Provides access to the physique.
Definition model.cpp:330
CalModel::getCoreModel
CalCoreModel * getCoreModel() const
Provides access to the core model.
Definition model.cpp:199
CalModel::getBoundingBox
CalBoundingBox & getBoundingBox(bool precision=false)
Returns the global bounding box of the model.
Definition model.cpp:392
CalModel::getRenderer
CalRenderer * getRenderer() const
Provides access to the renderer.
Definition model.cpp:345
CalModel::getMesh
CalMesh * getMesh(int coreMeshId) const
Provides access to an attached mesh.
Definition model.cpp:216
CalModel::getSkeleton
CalSkeleton * getSkeleton() const
Provides access to the skeleton.
Definition model.cpp:360
CalModel::setUserData
void setUserData(Cal::UserData userData)
Stores user data.
Definition model.cpp:530
CalModel::getVectorMesh
std::vector< CalMesh * > & getVectorMesh()
Returns the mesh vector.
Definition model.cpp:479
CalModel::setLodLevel
void setLodLevel(float lodLevel)
Sets the LOD level.
Definition model.cpp:492
CalMorphTargetMixer
Definition morphtargetmixer.h:22
CalPhysique
Definition physique.h:23
CalRenderer
Definition renderer.h:23
CalSkeleton
Definition skeleton.h:21
CalSpringSystem
The spring system class.
Definition springsystem.h:37
cal3d::noncopyable
Derive from noncopyable to mark your class as not having a copy constructor or operator=.
Definition global.h:73

Generated by The Cal3D Team with Doxygen 1.15.0