25 #include "engines/grim/object.h" 27 #include "math/matrix4.h" 28 #include "math/quat.h" 31 class SeekableReadStream;
48 void reload(
CMap *cmap);
50 Material *findMaterial(
const char *name,
CMap *cmap)
const;
57 int getNumNodes()
const {
return _numHierNodes; }
62 void changeMaterials(
Material *materials[]);
63 Geoset() : _numMeshes(0), _meshes(NULL) { }
71 void loadMaterial(
int index,
CMap *cmap);
79 char (*_materialNames)[32];
81 bool *_materialsShared;
82 Math::Vector3d _insertOffset;
88 Math::Vector3d _bboxPos;
89 Math::Vector3d _bboxSize;
99 void draw(
const Mesh *mesh)
const;
100 void changeMaterial(
Material *material);
102 bool hasTexture()
const {
return _texVertices !=
nullptr; }
104 const Math::Vector3d &getNormal()
const {
return _normal; }
105 void setNormal(
const Math::Vector3d &normal) { _normal = normal; }
106 const Material *getMaterial()
const {
return _material; }
107 int getNumVertices()
const {
return _numVertices; }
108 int getVertex(
int i)
const {
return _vertices[i]; }
109 int getTextureVertex(
int i)
const {
return _texVertices[i]; }
110 int getLight()
const {
return _light; }
114 int _type, _geo, _light, _tex;
117 int *_vertices, *_texVertices;
118 Math::Vector3d _normal;
128 void changeMaterials(
Material *materials[]);
130 void getBoundingBox(
int *x1,
int *y1,
int *x2,
int *y2)
const;
137 int _shadow, _geometryMode, _lightingMode, _textureMode;
145 int _numTextureVerts;
146 float *_textureVerts;
150 Math::Matrix4 _matrix;
164 void getBoundingBox(
int *x1,
int *y1,
int *x2,
int *y2)
const;
167 void setMatrix(
const Math::Matrix4 &matrix);
169 void addSprite(
Sprite *sprite);
170 void removeSprite(
const Sprite *sprite);
171 void translateViewpoint()
const;
172 void translateViewpointStart()
const;
173 void translateViewpointFinish()
const;
189 int _depth, _numChildren;
193 Math::Vector3d _pos, _pivot;
194 Math::Quaternion _rot;
196 Math::Vector3d _animPos;
197 Math::Quaternion _animRot;
198 bool _meshVisible, _hierVisible;
201 Math::Matrix4 _matrix;
202 Math::Matrix4 _localMatrix;
203 Math::Matrix4 _pivotMatrix;
Definition: material.h:63
Definition: algorithm.h:29
Definition: colormap.h:35
int _flags
Definition: model.h:182
Definition: textsplit.h:35
int _type
Definition: model.h:188