# 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:

NL3D::CPSLocatedBindable NLMISC::IStreamable NLMISC::IClassable NL3D::CPSForce NL3D::CPSZone NL3D::CIsotropicForceT NL3D::CIsotropicForceT< CPSFluidFrictionFunctor > NL3D::CIsotropicForceT< CPSTurbulForceFunc > NL3D::CPSForceIntensityHelper NL3D::CPSZoneCylinder NL3D::CPSZoneDisc NL3D::CPSZonePlane NL3D::CPSZoneRectangle NL3D::CPSZoneSphere List of all members.

Public Methods

virtual void attachTarget (CPSLocated *ptr)
 =============================================================================. More...

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

virtual void releaseRefTo (const CParticleSystemProcess *other)
 =============================================================================. More...

virtual void releaseAllRef ()
 =============================================================================. 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) NOTE : as objects are no polymorphic while being destroyed, this class can't call your releaseTargetRsc override in its destructor, it does it in its finalize method, which is called by the particle system. More...

void serial (NLMISC::IStream &f) throw (NLMISC::EStream)
 =============================================================================. More...

virtual void finalize (void)
 =============================================================================. More...

virtual ~CPSTargetLocatedBindable ()
 =============================================================================. More...


Protected Types

typedef std::vector< CPSLocated * > TTargetCont

Protected Methods

virtual void notifyTargetRemoved (CPSLocated *ptr)
 =============================================================================. More...


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 1012 of file ps_located.h.


Member Typedef Documentation

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

Definition at line 1069 of file ps_located.h.


Constructor & Destructor Documentation

NL3D::CPSTargetLocatedBindable::~CPSTargetLocatedBindable   [virtual]
 

=============================================================================.

We can't do it in the dtor, as calls to releaseTargetRsc wouldn't be polymorphics for derived class! And the behaviour of releaseTergetRsc is implemented in derived class

Definition at line 1791 of file ps_located.cpp.

References _Targets.


Member Function Documentation

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

=============================================================================.

nlassert if already present. You should only call this if this object and the target are already inserted in a system. By overriding this and calling the CPSTargetLocatedBindable version, you can also send some notificiation to the object that's being attached.

Reimplemented in NL3D::CPSForce.

Definition at line 1743 of file ps_located.cpp.

References NL3D::CPSLocatedBindable::_Owner, _Targets, and nlassert.

void NL3D::CPSTargetLocatedBindable::detachTarget CPSLocated   ptr [inline]
 

remove a target.

See also:
attachTarget

Definition at line 1024 of file ps_located.h.

References NL3D::CPSLocatedBindable::CPSLocated, and notifyTargetRemoved.

void NL3D::CPSTargetLocatedBindable::finalize void    [virtual]
 

=============================================================================.

Reimplemented from NL3D::CPSLocatedBindable.

Definition at line 1779 of file ps_located.cpp.

References _Targets, and releaseTargetRsc.

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

return the number of targets.

Definition at line 1039 of file ps_located.h.

References _Targets.

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

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

Definition at line 1047 of file ps_located.h.

References _Targets, NL3D::CPSLocatedBindable::CPSLocated, index, and nlassert.

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

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

Definition at line 1041 of file ps_located.h.

References _Targets, NL3D::CPSLocatedBindable::CPSLocated, index, and nlassert.

void NL3D::CPSTargetLocatedBindable::notifyTargetRemoved CPSLocated   ptr [protected, virtual]
 

=============================================================================.

A target has been remove If not present -> assert This also call releaseTargetRsc for clean up

Reimplemented from NL3D::CPSLocatedBindable.

Definition at line 1764 of file ps_located.cpp.

References _Targets, nlassert, and releaseTargetRsc.

Referenced by detachTarget.

void NL3D::CPSTargetLocatedBindable::releaseAllRef   [virtual]
 

=============================================================================.

Reimplemented from NL3D::CPSLocatedBindable.

Definition at line 1812 of file ps_located.cpp.

References _Targets, and releaseTargetRsc.

void NL3D::CPSTargetLocatedBindable::releaseRefTo const CParticleSystemProcess   other [virtual]
 

=============================================================================.

Release any reference this obj may have on the given process. For example, this is used when detaching a located of a system.

Reimplemented from NL3D::CPSLocatedBindable.

Definition at line 1801 of file ps_located.cpp.

References _Targets, nlassert, and releaseTargetRsc.

virtual 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) NOTE : as objects are no polymorphic while being destroyed, this class can't call your releaseTargetRsc override in its destructor, it does it in its finalize method, which is called by the particle system.

Reimplemented in NL3D::CPSForce.

Definition at line 1058 of file ps_located.h.

References NL3D::CPSLocatedBindable::CPSLocated.

Referenced by finalize, notifyTargetRemoved, releaseAllRef, and releaseRefTo.

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

=============================================================================.

Reimplemented from NL3D::CPSLocatedBindable.

Reimplemented in NL3D::CPSForce.

Definition at line 1724 of file ps_located.cpp.


Member Data Documentation

TTargetCont NL3D::CPSTargetLocatedBindable::_Targets [protected]
 

Definition at line 1070 of file ps_located.h.

Referenced by attachTarget, NL3D::CPSForce::basisChanged, NL3D::CPSForce::cancelIntegrable, finalize, getNbTargets, getTarget, notifyTargetRemoved, NL3D::CIsotropicForceT::performDynamic, NL3D::CPSBrownianForce::performDynamic, NL3D::CPSMagneticForce::performDynamic, NL3D::CPSCylindricVortex::performDynamic, NL3D::CPSSpring::performDynamic, NL3D::CPSCentralGravity::performDynamic, NL3D::CPSGravity::performDynamic, NL3D::CPSDirectionnalForce::performDynamic, NL3D::CPSZoneRectangle::performMotion, NL3D::CPSZoneCylinder::performMotion, NL3D::CPSZoneDisc::performMotion, NL3D::CPSZoneSphere::performMotion, NL3D::CPSZonePlane::performMotion, NL3D::CPSForce::registerToTargets, releaseAllRef, releaseRefTo, NL3D::CPSForce::renewIntegrable, and ~CPSTargetLocatedBindable.


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