PixelLightAPI  .
Public Member Functions | Protected Member Functions | Protected Attributes
PLPhysics::BodyConvexHull Class Reference

Abstract PL physics convex hull body. More...

#include <BodyConvexHull.h>

Inheritance diagram for PLPhysics::BodyConvexHull:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual PLPHYSICS_API ~BodyConvexHull ()
 Destructor.
PLPHYSICS_API PLCore::String GetMesh () const
 Returns the collision mesh.
PLPHYSICS_API const
PLMath::Vector3
GetMeshScale () const
 Returns the mesh scale.

Protected Member Functions

PLPHYSICS_API BodyConvexHull (World &cWorld, BodyImpl &cBodyImpl, const PLCore::String &sMesh, const PLMath::Vector3 &vMeshScale)
 Constructor.

Protected Attributes

PLCore::String m_sMesh
PLMath::Vector3 m_vMeshScale

Detailed Description

Abstract PL physics convex hull body.

Remarks:
Convex hulls are the solution to collision primitive that can not be easily represented by and implicit solid. The implicit solid primitives (spheres, cubes, cylinders, capsules, cones, etc.), have constant time complexity for contact calculation and are also extremely efficient on memory usage, therefore the application get perfect smooth behavior. However for cases where the shape is too difficult or a polygonal representation is desired convex hulls are the ultimate solution. For example it is a mistake to model a 10000 point sphere as a convex hull, when the perfect sphere is available.
There is not upper limit as to how many vertices the application can pass to make a hull shape, however for performance and memory usage concern it is the application responsibility to keep the max vertex at the possible minimum. The minimum number of vertices should be equal or larger than 4 and it is the application responsibility that the points are part of a solid geometry. Unpredictable results will occur if all points happen to be collinear or coplanar.

Constructor & Destructor Documentation

virtual PLPHYSICS_API PLPhysics::BodyConvexHull::~BodyConvexHull ( ) [virtual]

Destructor.

PLPHYSICS_API PLPhysics::BodyConvexHull::BodyConvexHull ( World cWorld,
BodyImpl &  cBodyImpl,
const PLCore::String sMesh,
const PLMath::Vector3 vMeshScale 
) [protected]

Constructor.

Parameters:
[in]cWorldWorld this body is in
[in]cBodyImplReference to the physics API specific body implementation
[in]sMeshCollision mesh
[in]vMeshScaleMesh scale

Member Function Documentation

Returns the collision mesh.

Returns:
The collision mesh

Returns the mesh scale.

Returns:
The mesh scale

Member Data Documentation

Collision mesh

Mesh scale


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


PixelLight PixelLight 0.9.11-R1
Copyright (C) 2002-2012 by The PixelLight Team
Last modified Thu Feb 23 2012 14:09:37
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported