# 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::CPSTargetLocatedBindable Class Reference

This class is a located bindable that can focus on several target Can be inherited by bindable like forces or collision zones. More...

#include <ps_located.h>

Inheritance diagram for NL3D::CPSTargetLocatedBindable

Inheritance graph
[legend]
Collaboration diagram for NL3D::CPSTargetLocatedBindable:

Collaboration graph
[legend]
List of all members.

Public Methods

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

void detachTarget (CPSLocated *ptr)
 Detach a target. More...

uint32 getNbTargets (void) const
 return the number of targets. More...

CPSLocatedgetTarget (uint32 index)
 Return a ptr on a target. Invalid range -> nlassert. More...

const CPSLocatedgetTarget (uint32 index) const
 Return a const ptr on a target. Invalid range -> nlassert. More...

virtual void releaseTargetRsc (CPSLocated *target)
 it is called when a target is destroyed or detached Override this if you allocated resources from the target (to release them) IMPORTANT : as objects are no polymorphic while being destroyed, this class can't call your releaseTargetRsc override in its destructor. More...

void serial (NLMISC::IStream &f) throw (NLMISC::EStream)
 Seralization, must be called by derivers. More...

virtual ~CPSTargetLocatedBindable ()

Protected Types

typedef std::vector< CPSLocated *> TTargetCont

Protected Attributes

TTargetCont _Targets

Detailed Description

This class is a located bindable that can focus on several target Can be inherited by bindable like forces or collision zones.

Definition at line 780 of file ps_located.h.


Member Typedef Documentation

typedef std::vector< CPSLocated *> NL3D::CPSTargetLocatedBindable::TTargetCont [protected]
 

Definition at line 832 of file ps_located.h.


Constructor & Destructor Documentation

NL3D::CPSTargetLocatedBindable::~CPSTargetLocatedBindable ( ) [virtual]
 

Definition at line 619 of file ps_located.cpp.


Member Function Documentation

void NL3D::CPSTargetLocatedBindable::attachTarget ( CPSLocated * ptr ) [virtual]
 

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

nlassert if present By overriding this and calling the CPSTargetLocatedBindable version, you can also send some notficiation to the object that's being attached

Reimplemented in NL3D::CPSZone.

Definition at line 590 of file ps_located.cpp.

void NL3D::CPSTargetLocatedBindable::detachTarget ( CPSLocated * ptr )
 

Detach a target.

If not present -> assert This also call releaseTargetRsc for clean up

Definition at line 609 of file ps_located.cpp.

uint32 NL3D::CPSTargetLocatedBindable::getNbTargets ( void ) const [inline]
 

return the number of targets.

Definition at line 797 of file ps_located.h.

const CPSLocated * NL3D::CPSTargetLocatedBindable::getTarget ( uint32 index ) const [inline]
 

Return a const ptr on a target. Invalid range -> nlassert.

Definition at line 807 of file ps_located.h.

CPSLocated * NL3D::CPSTargetLocatedBindable::getTarget ( uint32 index ) [inline]
 

Return a ptr on a target. Invalid range -> nlassert.

Definition at line 800 of file ps_located.h.

void NL3D::CPSTargetLocatedBindable::releaseTargetRsc ( CPSLocated * target ) [inline, virtual]
 

it is called when a target is destroyed or detached Override this if you allocated resources from the target (to release them) IMPORTANT : as objects are no polymorphic while being destroyed, this class can't call your releaseTargetRsc override in its destructor.

You must must redefine the destructor and call this method yourself for all target see ps_zone.cpp for an example

Reimplemented in NL3D::CPSZone.

Definition at line 822 of file ps_located.h.

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

Seralization, must be called by derivers.

Reimplemented from NL3D::CPSLocatedBindable.

Reimplemented in NL3D::CPSForce, NL3D::CPSGravity, NL3D::CPSSpring, NL3D::CPSZone, and NL3D::CPSZonePlane.

Definition at line 573 of file ps_located.cpp.


Member Data Documentation

TTargetCont NL3D::CPSTargetLocatedBindable::_Targets [protected]
 

Definition at line 833 of file ps_located.h.


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