1/*
2 * Copyright 2009, Haiku Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 *
5 * Authors:
6 * 		Alexandre Deckner <alex@zappotek.com>
7 */
8
9#ifndef _MESH_INSTANCE_H
10#define _MESH_INSTANCE_H
11
12#include "Mesh.h"
13#include "Texture.h"
14#include "Vector3.h"
15#include "Quaternion.h"
16
17
18class MeshInstance {
19public:
20				MeshInstance(Mesh* mesh, Texture* texture,
21					const Vector3& position, const Quaternion& orientation,
22					float animOffset);
23				~MeshInstance();
24
25	void		Update(float dt);
26	void		Render();
27
28protected:
29	BReference<Mesh>	fMeshReference;
30	BReference<Texture>	fTextureReference;
31
32	Vector3		fPosition;
33	Quaternion	fOrientation;
34	float		fScale;
35
36	// TODO: manage the animation externally
37	float		fTime;
38	float		fAnimOffset;
39
40	bool		fDoubleSided;
41	bool		fDrawNormals;
42};
43
44#endif /* _MESH_INSTANCE_H */
45