TDME2 1.9.121
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
BoundingVolume Class Referenceabstract

Bounding volume interface. More...

#include <tdme/engine/primitives/BoundingVolume.h>

Inheritance diagram for BoundingVolume:
Inheritance graph
Collaboration diagram for BoundingVolume:
Collaboration graph

Public Member Functions

virtual ~BoundingVolume ()
 Destructor. More...
 
virtual void fromTransformations (const Transformations &transformations)
 Transform bounding volume from given transformations. More...
 
const Vector3getScale ()
 Get local scale. More...
 
virtual void setScale (const Vector3 &scale)=0
 Set local scale. More...
 
const Vector3getCenter () const
 
const Vector3getCenterTransformed () const
 
BoundingBoxgetBoundingBoxTransformed ()
 Get bounding box transformed. More...
 
virtual BoundingVolumeclone () const =0
 Clones this bounding volume. More...
 

Protected Member Functions

void computeBoundingBox ()
 Compute bounding box. More...
 

Protected Attributes

Vector3 scale
 
Vector3 center
 
Vector3 collisionShapeLocalTranslation
 
reactphysics3d::CollisionShape * collisionShape { nullptr }
 
reactphysics3d::Transform collisionShapeLocalTransform
 
reactphysics3d::Transform collisionShapeTransform
 
reactphysics3d::AABB collisionShapeAABB
 
BoundingBox boundingBoxTransformed
 
Vector3 centerTransformed
 

Friends

class BoundingBox
 
class Capsule
 
class ConvexMesh
 
class OrientedBoundingBox
 
class Sphere
 
class tdme::engine::physics::Body
 
class tdme::engine::physics::World
 
class tdme::utilities::Primitives
 

Detailed Description

Bounding volume interface.

Author
Andreas Drewke
Version
$Id$

Definition at line 25 of file BoundingVolume.h.

Constructor & Destructor Documentation

◆ ~BoundingVolume()

~BoundingVolume ( )
virtual

Destructor.

Definition at line 29 of file BoundingVolume.cpp.

Member Function Documentation

◆ clone()

virtual BoundingVolume * clone ( ) const
pure virtual

Clones this bounding volume.

Returns
cloned bounding volume

Implemented in Capsule, ConvexMesh, HeightMap, OrientedBoundingBox, Sphere, and TerrainMesh.

◆ computeBoundingBox()

void computeBoundingBox ( )
protected

Compute bounding box.

Definition at line 33 of file BoundingVolume.cpp.

◆ fromTransformations()

void fromTransformations ( const Transformations transformations)
virtual

Transform bounding volume from given transformations.

Parameters
transformationstransformations

Reimplemented in TerrainMesh.

Definition at line 42 of file BoundingVolume.cpp.

◆ getBoundingBoxTransformed()

BoundingBox & getBoundingBoxTransformed ( )

Get bounding box transformed.

Returns
bounding box

Definition at line 79 of file BoundingVolume.cpp.

◆ getCenter()

const Vector3 & getCenter ( ) const
Returns
center

Definition at line 71 of file BoundingVolume.cpp.

◆ getCenterTransformed()

const Vector3 & getCenterTransformed ( ) const
Returns
transformed center

Definition at line 75 of file BoundingVolume.cpp.

◆ getScale()

const Vector3 & getScale ( )

Get local scale.

Returns
scale

Definition at line 67 of file BoundingVolume.cpp.

◆ setScale()

virtual void setScale ( const Vector3 scale)
pure virtual

Set local scale.

Returns
if collision shape had been recreated

Implemented in Capsule, ConvexMesh, HeightMap, OrientedBoundingBox, Sphere, and TerrainMesh.

Friends And Related Function Documentation

◆ BoundingBox

friend class BoundingBox
friend

Definition at line 27 of file BoundingVolume.h.

◆ Capsule

friend class Capsule
friend

Definition at line 28 of file BoundingVolume.h.

◆ ConvexMesh

friend class ConvexMesh
friend

Definition at line 29 of file BoundingVolume.h.

◆ OrientedBoundingBox

friend class OrientedBoundingBox
friend

Definition at line 30 of file BoundingVolume.h.

◆ Sphere

friend class Sphere
friend

Definition at line 31 of file BoundingVolume.h.

◆ tdme::engine::physics::Body

friend class tdme::engine::physics::Body
friend

Definition at line 32 of file BoundingVolume.h.

◆ tdme::engine::physics::World

friend class tdme::engine::physics::World
friend

Definition at line 33 of file BoundingVolume.h.

◆ tdme::utilities::Primitives

friend class tdme::utilities::Primitives
friend

Definition at line 34 of file BoundingVolume.h.

Member Data Documentation

◆ boundingBoxTransformed

BoundingBox boundingBoxTransformed
protected

Definition at line 44 of file BoundingVolume.h.

◆ center

Vector3 center
protected

Definition at line 38 of file BoundingVolume.h.

◆ centerTransformed

Vector3 centerTransformed
protected

Definition at line 45 of file BoundingVolume.h.

◆ collisionShape

reactphysics3d::CollisionShape* collisionShape { nullptr }
protected

Definition at line 40 of file BoundingVolume.h.

◆ collisionShapeAABB

reactphysics3d::AABB collisionShapeAABB
protected

Definition at line 43 of file BoundingVolume.h.

◆ collisionShapeLocalTransform

reactphysics3d::Transform collisionShapeLocalTransform
protected

Definition at line 41 of file BoundingVolume.h.

◆ collisionShapeLocalTranslation

Vector3 collisionShapeLocalTranslation
protected

Definition at line 39 of file BoundingVolume.h.

◆ collisionShapeTransform

reactphysics3d::Transform collisionShapeTransform
protected

Definition at line 42 of file BoundingVolume.h.

◆ scale

Vector3 scale
protected

Definition at line 37 of file BoundingVolume.h.


The documentation for this class was generated from the following files: