TDME2
1.9.121
src
tdme
engine
primitives
Triangle.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <vector>
4
5
#include <
tdme/tdme.h
>
6
#include <
tdme/engine/primitives/fwd-tdme.h
>
7
#include <
tdme/math/Vector3.h
>
8
9
using
std::vector;
10
11
using
tdme::math::Vector3
;
12
13
/**
14
* Triangle entity, this is not directly connectable with physics engine
15
* @author Andreas Drewke
16
* @version $Id$
17
*/
18
class
tdme::engine::primitives::Triangle
final
19
{
20
public
:
21
/**
22
* Public constructor
23
*/
24
Triangle
();
25
26
/**
27
* Public constructor
28
* @param vertex0 vertex 0
29
* @param vertex1 vertex 1
30
* @param vertex2 vertex 2
31
*/
32
Triangle
(
const
Vector3
& vertex0,
const
Vector3
& vertex1,
const
Vector3
& vertex2);
33
34
/**
35
* @return triangle vertices
36
*/
37
inline
vector<Vector3>&
getVertices
() {
38
return
vertices
;
39
}
40
41
/**
42
* Compute closest point on bounding volume
43
* @param point point
44
* @param closestPoint closest point
45
*/
46
void
computeClosestPointOnBoundingVolume
(
const
Vector3
& point,
Vector3
& closestPoint)
const
;
47
48
private
:
49
vector<Vector3>
vertices
;
50
};
Vector3.h
tdme::engine::primitives::Triangle
Triangle entity, this is not directly connectable with physics engine.
Definition:
Triangle.h:19
tdme::engine::primitives::Triangle::Triangle
Triangle()
Public constructor.
Definition:
Triangle.cpp:12
tdme::engine::primitives::Triangle::computeClosestPointOnBoundingVolume
void computeClosestPointOnBoundingVolume(const Vector3 &point, Vector3 &closestPoint) const
Compute closest point on bounding volume.
Definition:
Triangle.cpp:25
tdme::engine::primitives::Triangle::vertices
vector< Vector3 > vertices
Definition:
Triangle.h:49
tdme::engine::primitives::Triangle::getVertices
vector< Vector3 > & getVertices()
Definition:
Triangle.h:37
tdme::math::Vector3
3D vector 3 class
Definition:
Vector3.h:22
fwd-tdme.h
tdme.h
Generated by
1.9.3