- 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/refcounted.h"
16#include "cal3d/refptr.h"
17
18
19 class CalCoreBone;
20 class CalCoreModel;
21
22
23 class CAL3D_API CalCoreSkeleton : public cal3d::RefCounted
24{
25 protected:
26 ~CalCoreSkeleton();
27
28 public:
29 CalCoreSkeleton();
30
31 int addCoreBone(CalCoreBone *pCoreBone);
32 void calculateState();
33 CalCoreBone* getCoreBone(int coreBoneId);
34 CalCoreBone* getCoreBone(const std::string& strName);
35 int getCoreBoneId(const std::string& strName);
36 bool mapCoreBoneName(int coreBoneId, const std::string& strName);
37 std::vector<int>& getVectorRootCoreBoneId();
38 std::vector<CalCoreBone *>& getVectorCoreBone();
39 void calculateBoundingBoxes(CalCoreModel * pCoreModel);
40 void scale(float factor);
41
42 private:
43 std::vector<CalCoreBone *> m_vectorCoreBone;
44 std::map< std::string, int > m_mapCoreBoneNames;
45 std::vector<int> m_vectorRootCoreBoneId;
46};
47 typedef cal3d::RefPtr<CalCoreSkeleton> CalCoreSkeletonPtr;
48
49#endif
50
51//****************************************************************************//
CalCoreBone
Definition corebone.h:26
CalCoreModel
Definition coremodel.h:26
CalCoreSkeleton::calculateBoundingBoxes
void calculateBoundingBoxes(CalCoreModel *pCoreModel)
Calculates bounding boxes.
Definition coreskeleton.cpp:217
CalCoreSkeleton::addCoreBone
int addCoreBone(CalCoreBone *pCoreBone)
Adds a core bone.
Definition coreskeleton.cpp:48
CalCoreSkeleton::getVectorCoreBone
std::vector< CalCoreBone * > & getVectorCoreBone()
Returns the core bone vector.
Definition coreskeleton.cpp:202
CalCoreSkeleton::getCoreBone
CalCoreBone * getCoreBone(int coreBoneId)
Provides access to a core bone.
Definition coreskeleton.cpp:97
CalCoreSkeleton::mapCoreBoneName
bool mapCoreBoneName(int coreBoneId, const std::string &strName)
Maps the name of a bone to a specific bone id.
Definition coreskeleton.cpp:165
CalCoreSkeleton::getCoreBoneId
int getCoreBoneId(const std::string &strName)
Returns the ID of a specified core bone.
Definition coreskeleton.cpp:137
CalCoreSkeleton::calculateState
void calculateState()
Calculates the current state.
Definition coreskeleton.cpp:75
CalCoreSkeleton::getVectorRootCoreBoneId
std::vector< int > & getVectorRootCoreBoneId()
Returns the root core bone id list.
Definition coreskeleton.cpp:188
CalCoreSkeleton::scale
void scale(float factor)
Scale the core skeleton.
Definition coreskeleton.cpp:236
cal3d::RefCounted
Derive from RefCounted to make your class have reference-counted lifetime semantics.
Definition refcounted.h:29
cal3d::RefPtr
A container-safe smart pointer used for refcounted classes.
Definition refptr.h:11

Generated by The Cal3D Team with Doxygen 1.15.0