Public Member Functions

sp::scene::CollisionSphere Class Reference
[Collision System]

#include <spCollisionSphere.hpp>

Inheritance diagram for sp::scene::CollisionSphere:
sp::scene::CollisionNode sp::BaseObject

List of all members.

Public Member Functions

 CollisionSphere (CollisionMaterial *Material, SceneNode *Node, f32 Radius)
 ~CollisionSphere ()
s32 getSupportFlags () const
f32 getMaxMovement () const
bool checkIntersection (const dim::line3df &Line, SIntersectionContact &Contact) const
bool checkIntersection (const dim::line3df &Line, bool ExcludeCorners=false) const
void setRadius (f32 Radius)
 Sets the sphere's radius.
f32 getRadius () const
 Returns the sphere's radius.

Detailed Description

CollisionSphere is one of the collision models and represents a perfect sphere with only a position and a radius. Rotations and scaling does not effect the collision model.

Note:
This collision model can collide with any other collision model.

Constructor & Destructor Documentation

sp::scene::CollisionSphere::CollisionSphere ( CollisionMaterial Material,
SceneNode Node,
f32  Radius 
)
sp::scene::CollisionSphere::~CollisionSphere (  ) 

Member Function Documentation

bool sp::scene::CollisionSphere::checkIntersection ( const dim::line3df Line,
SIntersectionContact Contact 
) const [virtual]

Checks for an intersection between this collision object and the given line and stores the result in the specified contact structure.

Parameters:
Line,: Specifies the line which could intersect this object.
Contact,: Specifies the structure where the intersection result will be stored.
Note:
The implementations of this interface function normally only store the point and normal vector of an intersection.

Reimplemented from sp::scene::CollisionNode.

bool sp::scene::CollisionSphere::checkIntersection ( const dim::line3df Line,
bool  ExcludeCorners = false 
) const [virtual]

Returns true if an intersection between this collision object and the given line exists but does not return any further information.

Parameters:
Line,: Specifies the line which could intersect this object.
ExcludeCorners,: Specifies whether the line's corners should be ingored. This can be useful for ray-tracing or lightmapping to avoid self-shadowing.

Reimplemented from sp::scene::CollisionNode.

f32 sp::scene::CollisionSphere::getMaxMovement (  )  const [virtual]

Returns the maximal movement (e.g. for a sphere it's the radius). This is used internally. A collision node can still be moved faster than this value.

Implements sp::scene::CollisionNode.

f32 sp::scene::CollisionSphere::getRadius (  )  const [inline]

Returns the sphere's radius.

s32 sp::scene::CollisionSphere::getSupportFlags (  )  const [virtual]
void sp::scene::CollisionSphere::setRadius ( f32  Radius  )  [inline]

Sets the sphere's radius.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines