TDME2 1.9.121
Public Member Functions | Private Attributes | List of all members
Capsule Class Referencefinal

Capsule physics primitive. More...

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

Inheritance diagram for Capsule:
Inheritance graph
Collaboration diagram for Capsule:
Collaboration graph

Public Member Functions

 Capsule (const Vector3 &a, const Vector3 &b, float radius, const Vector3 &scale=Vector3(1.0f, 1.0f, 1.0f))
 Public constructor. More...
 
float getRadius () const
 
const Vector3getA () const
 
const Vector3getB () const
 
void setScale (const Vector3 &scale) override
 Set local scale. More...
 
BoundingVolumeclone () const override
 Clones this bounding volume. More...
 
- Public Member Functions inherited from BoundingVolume
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...
 

Private Attributes

Vector3 a
 
Vector3 b
 
float radius
 

Additional Inherited Members

- Protected Member Functions inherited from BoundingVolume
void computeBoundingBox ()
 Compute bounding box. More...
 
- Protected Attributes inherited from BoundingVolume
Vector3 scale
 
Vector3 center
 
Vector3 collisionShapeLocalTranslation
 
reactphysics3d::CollisionShape * collisionShape { nullptr }
 
reactphysics3d::Transform collisionShapeLocalTransform
 
reactphysics3d::Transform collisionShapeTransform
 
reactphysics3d::AABB collisionShapeAABB
 
BoundingBox boundingBoxTransformed
 
Vector3 centerTransformed
 

Detailed Description

Capsule physics primitive.

Author
Andreas Drewke
Version
$Id$

Definition at line 16 of file Capsule.h.

Constructor & Destructor Documentation

◆ Capsule()

Capsule ( const Vector3 a,
const Vector3 b,
float  radius,
const Vector3 scale = Vector3(1.0f, 1.0f, 1.0f) 
)

Public constructor.

Parameters
aa
bb
radiusradius
scalescale

Definition at line 20 of file Capsule.cpp.

Member Function Documentation

◆ clone()

BoundingVolume * clone ( ) const
overridevirtual

Clones this bounding volume.

Returns
cloned bounding volume

Implements BoundingVolume.

Definition at line 101 of file Capsule.cpp.

◆ getA()

const Vector3 & getA ( ) const
Returns
line segment point a

Definition at line 34 of file Capsule.cpp.

◆ getB()

const Vector3 & getB ( ) const
Returns
line segment point b

Definition at line 39 of file Capsule.cpp.

◆ getRadius()

float getRadius ( ) const
Returns
radius

Definition at line 29 of file Capsule.cpp.

◆ setScale()

void setScale ( const Vector3 scale)
overridevirtual

Set local scale.

Returns
if collision shape had been recreated

Implements BoundingVolume.

Definition at line 44 of file Capsule.cpp.

Member Data Documentation

◆ a

Vector3 a
private

Definition at line 51 of file Capsule.h.

◆ b

Vector3 b
private

Definition at line 52 of file Capsule.h.

◆ radius

float radius
private

Definition at line 53 of file Capsule.h.


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