# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NL3D::CPSZone Class Reference

This class hold any entity that has an effect over located : a sink , a bouncing zone etc This is a kind a specialized force, and it has an attached list of the targets Not sharable accross systems. More...

#include <ps_zone.h>

Inheritance diagram for NL3D::CPSZone:

NL3D::CPSTargetLocatedBindable NL3D::CPSLocatedBindable NLMISC::IStreamable NLMISC::IClassable NL3D::CPSZoneCylinder NL3D::CPSZoneDisc NL3D::CPSZonePlane NL3D::CPSZoneRectangle NL3D::CPSZoneSphere List of all members.

Public Types

enum  TCollisionBehaviour { bounce = 0, destroy = 1 }
 behaviour when a collision occurs. More...


Public Methods

 CPSZone ()
 Constructor. More...

virtual uint32 getType (void) const
 Gives the type for this bindable. More...

virtual uint32 getPriority (void) const
 Get the priority of the bindable The more high it is, the earlier it is dealt with. More...

virtual void step (TPSProcessPass pass, TAnimationTime ellapsedTime, TAnimationTime realEt)
 Process one pass for the zone The default behaviour call performMotion or show depending on the pass being processed. More...

virtual void performMotion (TAnimationTime ellapsedTime)=0
 This is usually called by the step method for the pass dedicated to zone. More...

virtual void show (TAnimationTime ellapsedTime)=0
 Show the zone (edition mode). More...

virtual void attachTarget (CPSLocated *ptr)
 Add a new type of located for this zone to apply on. More...

virtual void serial (NLMISC::IStream &f) throw (NLMISC::EStream)
 serialization, DERIVER must override this, and call the parent version. More...

virtual void releaseTargetRsc (CPSLocated *target)
 inherit from CPSTargetLocatedBindable. Its called when one of the targets has been detroyed. More...

void setBounceFactor (float bounceFactor)
 set the bounce factor. It has meaning only if the behaviour is set to bounce... More...

float getBounceFactor (void) const
 get the bounce factor. It has meaning only if the behaviour is set to bounce... More...

void setCollisionBehaviour (TCollisionBehaviour behaviour)
TCollisionBehaviour getCollisionBehaviour (void) const

Protected Attributes

float _BounceFactor
TCollisionBehaviour _CollisionBehaviour

Detailed Description

This class hold any entity that has an effect over located : a sink , a bouncing zone etc This is a kind a specialized force, and it has an attached list of the targets Not sharable accross systems.

Author:
Nicolas Vizerie , Nevrax France
Date:
2001

Definition at line 55 of file ps_zone.h.


Member Enumeration Documentation

enum NL3D::CPSZone::TCollisionBehaviour
 

behaviour when a collision occurs.

Enumeration values:
bounce 
destroy 

Definition at line 61 of file ps_zone.h.

Referenced by getCollisionBehaviour, and setCollisionBehaviour.


Constructor & Destructor Documentation

NL3D::CPSZone::CPSZone  
 

Constructor.

Definition at line 46 of file ps_zone.cpp.


Member Function Documentation

void NL3D::CPSZone::attachTarget CPSLocated   ptr [virtual]
 

Add a new type of located for this zone to apply on.

We override this to queery the target to allocate the CollisionInfo attribute

Reimplemented from NL3D::CPSTargetLocatedBindable.

Definition at line 69 of file ps_zone.cpp.

float NL3D::CPSZone::getBounceFactor void    const [inline]
 

get the bounce factor. It has meaning only if the behaviour is set to bounce...

Definition at line 110 of file ps_zone.h.

References _BounceFactor.

TCollisionBehaviour NL3D::CPSZone::getCollisionBehaviour void    const [inline]
 

Definition at line 115 of file ps_zone.h.

References _CollisionBehaviour, and TCollisionBehaviour.

virtual uint32 NL3D::CPSZone::getPriority void    const [inline, virtual]
 

Get the priority of the bindable The more high it is, the earlier it is dealt with.

Implements NL3D::CPSLocatedBindable.

Definition at line 75 of file ps_zone.h.

virtual uint32 NL3D::CPSZone::getType void    const [inline, virtual]
 

Gives the type for this bindable.

Implements NL3D::CPSLocatedBindable.

Definition at line 69 of file ps_zone.h.

References NL3D::PSZone.

virtual void NL3D::CPSZone::performMotion TAnimationTime    ellapsedTime [pure virtual]
 

This is usually called by the step method for the pass dedicated to zone.

Implemented in NL3D::CPSZonePlane.

Referenced by step.

void NL3D::CPSZone::releaseTargetRsc CPSLocated   target [virtual]
 

inherit from CPSTargetLocatedBindable. Its called when one of the targets has been detroyed.

It's called when one of the targets has been detroyed or detached The default behaviour, release collision infos from the located

Reimplemented from NL3D::CPSTargetLocatedBindable.

Definition at line 82 of file ps_zone.cpp.

void NL3D::CPSZone::serial NLMISC::IStream   f throw (NLMISC::EStream) [virtual]
 

serialization, DERIVER must override this, and call the parent version.

Reimplemented from NL3D::CPSTargetLocatedBindable.

Reimplemented in NL3D::CPSZonePlane.

Definition at line 50 of file ps_zone.cpp.

void NL3D::CPSZone::setBounceFactor float    bounceFactor [inline]
 

set the bounce factor. It has meaning only if the behaviour is set to bounce...

Definition at line 107 of file ps_zone.h.

References _BounceFactor.

void NL3D::CPSZone::setCollisionBehaviour TCollisionBehaviour    behaviour [inline]
 

Definition at line 113 of file ps_zone.h.

References _CollisionBehaviour, and TCollisionBehaviour.

virtual void NL3D::CPSZone::show TAnimationTime    ellapsedTime [pure virtual]
 

Show the zone (edition mode).

Implemented in NL3D::CPSZonePlane.

Referenced by step.

void NL3D::CPSZone::step TPSProcessPass    pass,
TAnimationTime    ellapsedTime,
TAnimationTime    realEt
[virtual]
 

Process one pass for the zone The default behaviour call performMotion or show depending on the pass being processed.

Implements NL3D::CPSLocatedBindable.

Definition at line 91 of file ps_zone.cpp.

References performMotion, NL3D::PSCollision, NL3D::PSToolRender, show, NL3D::TAnimationTime, and NL3D::TPSProcessPass.


Member Data Documentation

float NL3D::CPSZone::_BounceFactor [protected]
 

Definition at line 122 of file ps_zone.h.

Referenced by getBounceFactor, NL3D::CPSZoneRectangle::performMotion, NL3D::CPSZoneDisc::performMotion, NL3D::CPSZoneSphere::performMotion, NL3D::CPSZonePlane::performMotion, and setBounceFactor.

TCollisionBehaviour NL3D::CPSZone::_CollisionBehaviour [protected]
 

Definition at line 125 of file ps_zone.h.

Referenced by getCollisionBehaviour, and setCollisionBehaviour.


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