TDME2
1.9.121
src
tdme
engine
primitives
Sphere.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
* Sphere physics primitive
13
* @author Andreas Drewke
14
* @version $Id$
15
*/
16
class
tdme::engine::primitives::Sphere
final
17
:
public
BoundingVolume
18
{
19
private
:
20
float
radius
;
21
22
public
:
23
/**
24
* Public constructor
25
*/
26
Sphere
();
27
28
/**
29
* Public constructor
30
* @param center center
31
* @param radius radius
32
* @param scale scale
33
*/
34
Sphere
(
const
Vector3
&
center
,
float
radius
,
const
Vector3
&
scale
=
Vector3
(1.0f, 1.0f, 1.0f));
35
36
/**
37
* @return float radius
38
*/
39
float
getRadius
()
const
;
40
41
// overrides
42
void
setScale
(
const
Vector3
&
scale
)
override
;
43
BoundingVolume
*
clone
()
const override
;
44
45
};
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::center
Vector3 center
Definition:
BoundingVolume.h:38
tdme::engine::primitives::Sphere
Sphere physics primitive.
Definition:
Sphere.h:18
tdme::engine::primitives::Sphere::Sphere
Sphere()
Public constructor.
Definition:
Sphere.cpp:15
tdme::engine::primitives::Sphere::getRadius
float getRadius() const
Definition:
Sphere.cpp:28
tdme::engine::primitives::Sphere::radius
float radius
Definition:
Sphere.h:20
tdme::engine::primitives::Sphere::setScale
void setScale(const Vector3 &scale) override
Set local scale.
Definition:
Sphere.cpp:33
tdme::engine::primitives::Sphere::clone
BoundingVolume * clone() const override
Clones this bounding volume.
Definition:
Sphere.cpp:49
tdme::math::Vector3
3D vector 3 class
Definition:
Vector3.h:22
fwd-tdme.h
tdme.h
Generated by
1.9.3