- Cal3D 0.11 API Reference -

coremesh.h
1//****************************************************************************//
2// coremesh.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_COREMESH_H
12#define CAL_COREMESH_H
13
14
15#include "cal3d/global.h"
16#include "cal3d/refcounted.h"
17#include "cal3d/refptr.h"
18
19
20class CalCoreSubmesh;
21
22
23class CAL3D_API CalCoreMesh : public cal3d::RefCounted
24{
25protected:
27
28public:
30
31 typedef std::vector<CalCoreSubmesh *> CalCoreSubmeshVector;
32 unsigned int size();
33 int addCoreSubmesh(CalCoreSubmesh *pCoreSubmesh);
34 CalCoreSubmesh *getCoreSubmesh(int id);
35 const CalCoreSubmesh *getCoreSubmesh(int id) const;
36 void removeCoreSubmesh( int submeshID );
37 int getCoreSubmeshCount() const;
38 void reserve(int submeshes) { m_vectorCoreSubmesh.reserve(submeshes); }
39 std::vector<CalCoreSubmesh *>& getVectorCoreSubmesh();
40 const std::vector<CalCoreSubmesh *>& getVectorCoreSubmesh() const;
42 int addAsMorphTarget(CalCoreMesh *pCoreMesh);//, std::string const & morphTargetName);
44 int getMorphTargetId(std::string const & morphTargetName);
46 inline bool hasMorphTargets(){return !m_morphTargets.empty();}
47 void scale(float factor);
48 void setFilename(const std::string& filename);
49 const std::string& getFilename(void) const;
50 void setName(const std::string& name);
51 const std::string& getName(void) const;
52
53
54private:
55 std::map<std::string,int> m_morphTargets;
56 std::vector<CalCoreSubmesh *> m_vectorCoreSubmesh;
57 std::string m_name;
58 std::string m_filename;
59};
61
62#endif
Definition coremesh.h:24
bool hasMorphTargets()
return true if submeshes have morphTargets
Definition coremesh.h:46
Definition coresubmesh.h:32
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.10.0