TDME2
1.9.121
src
tdme
engine
primitives
Capsule.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
tdme/tdme.h
>
4
#include <
tdme/engine/primitives/fwd-tdme.h
>
5
#include <
tdme/engine/primitives/BoundingVolume.h
>
6
#include <
tdme/math/Vector3.h
>
7
8
using
tdme::engine::primitives::BoundingVolume
;
9
using
tdme::math::Vector3
;
10
11
/**
12
* Capsule physics primitive
13
* @author Andreas Drewke
14
* @version $Id$
15
*/
16
class
tdme::engine::primitives::Capsule
final
17
:
public
BoundingVolume
18
{
19
public
:
20
/**
21
* Public constructor
22
* @param a a
23
* @param b b
24
* @param radius radius
25
* @param scale scale
26
*/
27
Capsule
(
const
Vector3
&
a
,
const
Vector3
&
b
,
float
radius
,
const
Vector3
&
scale
=
Vector3
(1.0f, 1.0f, 1.0f));
28
29
/**
30
* @return radius
31
*/
32
float
getRadius
()
const
;
33
34
/**
35
* @return line segment point a
36
*/
37
const
Vector3
&
getA
()
const
;
38
39
/**
40
* @return line segment point b
41
*/
42
const
Vector3
&
getB
()
const
;
43
44
45
// overrides
46
void
setScale
(
const
Vector3
&
scale
)
override
;
47
BoundingVolume
*
clone
()
const override
;
48
49
private
:
50
//
51
Vector3
a
;
52
Vector3
b
;
53
float
radius
;
54
};
BoundingVolume.h
Vector3.h
tdme::engine::primitives::BoundingVolume
Bounding volume interface.
Definition:
BoundingVolume.h:26
tdme::engine::primitives::BoundingVolume::scale
Vector3 scale
Definition:
BoundingVolume.h:37
tdme::engine::primitives::BoundingVolume::Capsule
friend class Capsule
Definition:
BoundingVolume.h:28
tdme::engine::primitives::Capsule
Capsule physics primitive.
Definition:
Capsule.h:18
tdme::engine::primitives::Capsule::a
Vector3 a
Definition:
Capsule.h:51
tdme::engine::primitives::Capsule::getRadius
float getRadius() const
Definition:
Capsule.cpp:29
tdme::engine::primitives::Capsule::radius
float radius
Definition:
Capsule.h:53
tdme::engine::primitives::Capsule::getB
const Vector3 & getB() const
Definition:
Capsule.cpp:39
tdme::engine::primitives::Capsule::setScale
void setScale(const Vector3 &scale) override
Set local scale.
Definition:
Capsule.cpp:44
tdme::engine::primitives::Capsule::getA
const Vector3 & getA() const
Definition:
Capsule.cpp:34
tdme::engine::primitives::Capsule::clone
BoundingVolume * clone() const override
Clones this bounding volume.
Definition:
Capsule.cpp:101
tdme::engine::primitives::Capsule::b
Vector3 b
Definition:
Capsule.h:52
tdme::math::Vector3
3D vector 3 class
Definition:
Vector3.h:22
fwd-tdme.h
tdme.h
Generated by
1.9.3