TDME2 1.9.121
TerrainMesh.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
5#include <ext/reactphysics3d/src/collision/TriangleMesh.h>
6#include <ext/reactphysics3d/src/collision/TriangleVertexArray.h>
7
8#include <tdme/tdme.h>
13
14using std::vector;
15
20
21/**
22 * Terrain mesh physics primitive
23 * @author Andreas Drewke
24 * @version $Id$
25 */
27 : public BoundingVolume
28{
29private:
30 vector<float> vertices;
31 vector<int32_t> indices;
32 reactphysics3d::TriangleVertexArray* triangleVertexArray { nullptr };
33 reactphysics3d::TriangleMesh* triangleMesh { nullptr };
34public:
35 /**
36 * Public constructor
37 */
39
40 /**
41 * Public constructor
42 * @param model model
43 * @param transformations transformations
44 */
45 TerrainMesh(Object3DModel* model, const Transformations& transformations = Transformations());
46
47 /**
48 * Destructor
49 */
51
52 // overrides
53 void setScale(const Vector3& scale) override;
54 void fromTransformations(const Transformations& transformations) override;
55 BoundingVolume* clone() const override;
56};
Transformations which contain scale, rotations and translation.
Terrain mesh physics primitive.
Definition: TerrainMesh.h:28
reactphysics3d::TriangleVertexArray * triangleVertexArray
Definition: TerrainMesh.h:32
reactphysics3d::TriangleMesh * triangleMesh
Definition: TerrainMesh.h:33
BoundingVolume * clone() const override
Clones this bounding volume.
void fromTransformations(const Transformations &transformations) override
Transform bounding volume from given transformations.
void setScale(const Vector3 &scale) override
Set local scale.
Definition: TerrainMesh.cpp:61
Triangle entity, this is not directly connectable with physics engine.
Definition: Triangle.h:19
3D vector 3 class
Definition: Vector3.h:22