CrystalSpace

Public API Reference

CS::Collisions::iCollisionSector Struct Reference

This is the interface for the collision sector. More...

#include <ivaria/collisions.h>

Inheritance diagram for CS::Collisions::iCollisionSector:

List of all members.

Public Member Functions

Collision objects management



virtual void AddCollisionObject (iCollisionObject *object)=0
 Add a collision object into the sector.
virtual iCollisionObjectGetCollisionObject (size_t index)=0
 Get the collision object by index.
virtual size_t GetCollisionObjectCount ()=0
 Get the count of collision objects.
virtual void RemoveCollisionObject (iCollisionObject *object)=0
 Remove the given collision object from this sector.
Portals



virtual void AddPortal (iPortal *portal, const csOrthoTransform &meshTrans)=0
 Add a portal into the sector. Collision objects crossing a portal will be switched from iCollisionSector's.
virtual void DeleteAll ()=0
 Delete all objects in this collision sector.
virtual void RemovePortal (iPortal *portal)=0
 Remove the given portal from this sector.
Collision detection



virtual csPtr< iCollisionDataListCollisionTest (iCollisionObject *object)=0
 Perform a discrete collision test against all objects in this iCollisionSector, and return the list of all collisions with the given object.
virtual HitBeamResult HitBeam (const csVector3 &start, const csVector3 &end) const =0
 Follow a beam from start to end and return the first body that is hit.
virtual HitBeamResult HitBeamPortal (const csVector3 &start, const csVector3 &end) const =0
 Follow a beam from start to end and return the first body that is hit.
virtual HitBeamResult HitBeamPortals (const csVector3 &start, const csVector3 &end) const =0
 Follow a beam from start to end and return the first body that is hit.
General methods



virtual csVector3 GetGravity () const =0
 Get the global gravity.
virtual iSectorGetSector ()=0
 Get the engine iSector related to this collision sector.
virtual CollisionObjectType GetSectorType () const =0
 Return the type of this sector, that is either CS::Collisions::COLLISION_OBJECT_PHYSICAL For sectors that can be upcast to a iPhysicalSector, or CS::Collisions::COLLISION_OBJECT_SIMPLE for sectors that cannot be upcast to a iPhysicalSector.
virtual
CS::Collisions::iCollisionSystem
GetSystem () const =0
 Return the system that this sector belongs to.
virtual iObjectQueryObject (void) const =0
 Return the underlying object.
virtual
CS::Physics::iPhysicalSector
QueryPhysicalSector () const =0
 Return a reference to the physical interface of this sector if its type is CS::Collisions::COLLISION_OBJECT_PHYSICAL, or nullptr otherwise.
virtual void SetGravity (const csVector3 &v)=0
 Set the global gravity.
virtual void SetSector (iSector *sector)=0
 Set the engine iSector related to this collision sector.

Detailed Description

This is the interface for the collision sector.

It handles all collision detection of collision objects.

Main creators of instances implementing this interface:

Main ways to get pointers to this interface:

See also:
CS::Physics::iPhysicalSector CS::Physics::iPhysicalSector

Definition at line 573 of file collisions.h.


Member Function Documentation

virtual void CS::Collisions::iCollisionSector::AddCollisionObject ( iCollisionObject object  )  [pure virtual]

Add a collision object into the sector.

virtual void CS::Collisions::iCollisionSector::AddPortal ( iPortal portal,
const csOrthoTransform meshTrans 
) [pure virtual]

Add a portal into the sector. Collision objects crossing a portal will be switched from iCollisionSector's.

virtual csPtr<iCollisionDataList> CS::Collisions::iCollisionSector::CollisionTest ( iCollisionObject object  )  [pure virtual]

Perform a discrete collision test against all objects in this iCollisionSector, and return the list of all collisions with the given object.

virtual void CS::Collisions::iCollisionSector::DeleteAll (  )  [pure virtual]

Delete all objects in this collision sector.

virtual iCollisionObject* CS::Collisions::iCollisionSector::GetCollisionObject ( size_t  index  )  [pure virtual]

Get the collision object by index.

virtual size_t CS::Collisions::iCollisionSector::GetCollisionObjectCount (  )  [pure virtual]

Get the count of collision objects.

virtual csVector3 CS::Collisions::iCollisionSector::GetGravity (  )  const [pure virtual]

Get the global gravity.

virtual iSector* CS::Collisions::iCollisionSector::GetSector (  )  [pure virtual]

Get the engine iSector related to this collision sector.

virtual CollisionObjectType CS::Collisions::iCollisionSector::GetSectorType (  )  const [pure virtual]

Return the type of this sector, that is either CS::Collisions::COLLISION_OBJECT_PHYSICAL For sectors that can be upcast to a iPhysicalSector, or CS::Collisions::COLLISION_OBJECT_SIMPLE for sectors that cannot be upcast to a iPhysicalSector.

virtual CS::Collisions::iCollisionSystem* CS::Collisions::iCollisionSector::GetSystem (  )  const [pure virtual]

Return the system that this sector belongs to.

virtual HitBeamResult CS::Collisions::iCollisionSector::HitBeam ( const csVector3 start,
const csVector3 end 
) const [pure virtual]

Follow a beam from start to end and return the first body that is hit.

This version ignores the portals and won't therefore cross them to another sector.

Parameters:
start The start of the beam
end The end of the beam
virtual HitBeamResult CS::Collisions::iCollisionSector::HitBeamPortal ( const csVector3 start,
const csVector3 end 
) const [pure virtual]

Follow a beam from start to end and return the first body that is hit.

This version will cross any portal hit and continue the the hit test on the other side of it.

Parameters:
start The start of the beam
end The end of the beam
Deprecated:
Deprecated in 2.2. Use HitBeamPortals() instead
virtual HitBeamResult CS::Collisions::iCollisionSector::HitBeamPortals ( const csVector3 start,
const csVector3 end 
) const [pure virtual]

Follow a beam from start to end and return the first body that is hit.

This version will cross any portal hit and continue the the hit test on the other side of it.

Parameters:
start The start of the beam
end The end of the beam
virtual iObject* CS::Collisions::iCollisionSector::QueryObject ( void   )  const [pure virtual]

Return the underlying object.

virtual CS::Physics::iPhysicalSector* CS::Collisions::iCollisionSector::QueryPhysicalSector (  )  const [pure virtual]

Return a reference to the physical interface of this sector if its type is CS::Collisions::COLLISION_OBJECT_PHYSICAL, or nullptr otherwise.

virtual void CS::Collisions::iCollisionSector::RemoveCollisionObject ( iCollisionObject object  )  [pure virtual]

Remove the given collision object from this sector.

virtual void CS::Collisions::iCollisionSector::RemovePortal ( iPortal portal  )  [pure virtual]

Remove the given portal from this sector.

virtual void CS::Collisions::iCollisionSector::SetGravity ( const csVector3 v  )  [pure virtual]

Set the global gravity.

virtual void CS::Collisions::iCollisionSector::SetSector ( iSector sector  )  [pure virtual]

Set the engine iSector related to this collision sector.

The iMovable that are attached to a iCollisionObject present in this collision sector will be put automatically in the given engine sector. The portals in iSector will be added to this collision sector.


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

Generated for Crystal Space 2.1 by doxygen 1.6.1