- Cal3D 0.11 API Reference -

coreskeleton.h
1//****************************************************************************//
2// coreskeleton.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_CORESKELETON_H
12#define CAL_CORESKELETON_H
13
14#include "cal3d/global.h"
15#include "cal3d/vector.h"
16#include "cal3d/refcounted.h"
17#include "cal3d/refptr.h"
18
19
20class CalCoreBone;
21class CalCoreModel;
22
23
24class CAL3D_API CalCoreSkeleton : public cal3d::RefCounted
25{
26protected:
27 ~CalCoreSkeleton();
28
29public:
30 CalCoreSkeleton();
31
32 int addCoreBone(CalCoreBone *pCoreBone);
33 void calculateState();
34 CalCoreBone *getCoreBone(int coreBoneId);
35 const CalCoreBone *getCoreBone(int coreBoneId) const;
36 CalCoreBone *getCoreBone(const std::string& strName);
37 const CalCoreBone *getCoreBone(const std::string& strName) const;
38 int getCoreBoneId(const std::string& strName) const;
39 bool mapCoreBoneName(int coreBoneId, const std::string& strName);
40 std::vector<int>& getVectorRootCoreBoneId();
41 const std::vector<int>& getVectorRootCoreBoneId() const;
42 std::vector<CalCoreBone *>& getVectorCoreBone();
43 const std::vector<CalCoreBone *>& getVectorCoreBone() const;
44 void calculateBoundingBoxes(CalCoreModel *pCoreModel);
45 void scale(float factor);
46 unsigned int getNumCoreBones() const { return ( unsigned int ) m_vectorCoreBone.size(); }
47 void setSceneAmbientColor( CalVector const & color );
48 void getSceneAmbientColor( CalVector & color ) const;
49 void setName(const std::string& name);
50 const std::string& getName(void) const;
51
52private:
53 std::vector<CalCoreBone *> m_vectorCoreBone;
54 std::map< std::string, int > m_mapCoreBoneNames;
55 std::vector<int> m_vectorRootCoreBoneId;
56 CalVector m_sceneAmbientColor;
57 std::string m_name;
58};
59typedef cal3d::RefPtr<CalCoreSkeleton> CalCoreSkeletonPtr;
60
61#endif
62
63//****************************************************************************//
Definition corebone.h:35
Definition coremodel.h:26
int getCoreBoneId(const std::string &strName) const
Returns the ID of a specified core bone.
Definition coreskeleton.cpp:184
void setName(const std::string &name)
Set the symbolic name of the core skeleton.
Definition coreskeleton.cpp:428
void calculateBoundingBoxes(CalCoreModel *pCoreModel)
Calculates bounding boxes.
Definition coreskeleton.cpp:318
int addCoreBone(CalCoreBone *pCoreBone)
Adds a core bone.
Definition coreskeleton.cpp:55
const std::string & getName(void) const
Get the symbolic name the core skeleton.
Definition coreskeleton.cpp:443
std::vector< CalCoreBone * > & getVectorCoreBone()
Returns the core bone vector.
Definition coreskeleton.cpp:290
CalCoreBone * getCoreBone(int coreBoneId)
Provides access to a core bone.
Definition coreskeleton.cpp:104
bool mapCoreBoneName(int coreBoneId, const std::string &strName)
Maps the name of a bone to a specific bone id.
Definition coreskeleton.cpp:239
void calculateState()
Calculates the current state.
Definition coreskeleton.cpp:82
std::vector< int > & getVectorRootCoreBoneId()
Returns the root core bone id list.
Definition coreskeleton.cpp:262
void scale(float factor)
Scale the core skeleton.
Definition coreskeleton.cpp:396
The vector class.
Definition vector.h:37
Derive from RefCounted to make your class have reference-counted lifetime semantics.
Definition refcounted.h:29
A container-safe smart pointer used for refcounted classes.
Definition refptr.h:11

Generated by The Cal3D Team with Doxygen 1.13.1