The same as a plane, but with a rectangle. More...
#include <ps_zone.h>
Inherits NL3D::CPSZone, and NL3D::IPSMover.
Public Member Functions | |
| virtual void | computeCollisions (CPSLocated &target, uint firstInstanceIndex, const NLMISC::CVector *posBefore, const NLMISC::CVector *posAfter) |
| Compute collisions for the given target. | |
| virtual void | show () |
| Show the zone (edition mode). | |
| CPSZoneRectangle () | |
| NLMISC_DECLARE_CLASS (CPSZoneRectangle) | |
| virtual void | serial (NLMISC::IStream &f) throw (NLMISC::EStream) |
| serialization, DERIVER must override this, and call the parent version | |
| virtual bool | supportUniformScaling (void) const |
| Send back true if uniform scaling can be applied If it sends false, uniform scaling leads to undefine results. | |
| virtual bool | supportNonUniformScaling (void) const |
| Send back true if non-uniform scaling can be applied If it sends false, non-uniform scaling leads to undefine results (default has no effect). | |
| virtual void | setMatrix (uint32 index, const NLMISC::CMatrix &m) |
| virtual NLMISC::CMatrix | getMatrix (uint32 index) const |
| virtual void | setScale (uint32 index, float scale) |
| virtual void | setScale (uint32 index, const NLMISC::CVector &s) |
| virtual NLMISC::CVector | getScale (uint32 index) const |
Protected Member Functions | |
| NLMISC::CMatrix | buildBasis (uint32 index) const |
| virtual void | resize (uint32 size) |
| Resize the bindable attributes containers should not be called directly. | |
| virtual void | newElement (const CPSEmitterInfo &info) |
| Generate a new element for this bindable. | |
| virtual void | deleteElement (uint32 index) |
Protected Attributes | |
| CPSAttrib< CPlaneBasis > | _Basis |
| TPSAttribFloat | _Width |
| TPSAttribFloat | _Height |
The same as a plane, but with a rectangle.
We don't encode the plane by its normal, however...
Definition at line 342 of file ps_zone.h.
| NL3D::CPSZoneRectangle::CPSZoneRectangle | ( | ) | [inline] |
Definition at line 348 of file ps_zone.h.
References NL3D::CPSLocatedBindable::_Name, and NL3D::CParticleSystem::getSerializeIdentifierFlag().
| NLMISC::CMatrix NL3D::CPSZoneRectangle::buildBasis | ( | uint32 | index | ) | const [protected] |
| void NL3D::CPSZoneRectangle::computeCollisions | ( | CPSLocated & | target, | |
| uint | firstInstanceIndex, | |||
| const NLMISC::CVector * | posBefore, | |||
| const NLMISC::CVector * | posAfter | |||
| ) | [virtual] |
Compute collisions for the given target.
This will update the collisions infos. The caller must provide pointer to arrays positions before and after time step.
Implements NL3D::CPSZone.
Definition at line 1133 of file ps_zone.cpp.
References _Basis, NL3D::CPSZone::_BounceFactor, NL3D::CPSLocated::_Collisions, _Height, NL3D::CPSLocatedBindable::_Owner, _Width, NL3D::CPSAttrib< T >::begin(), NL3D::CPSCollisionInfo::CollisionZone, NL3D::CPSCollisionInfo::Dist, NL3D::CPSAttrib< T >::end(), NL3D::CPSLocated::getConversionMatrix(), NLMISC::CPlane::getNormal(), NL3D::CPSLocated::getPos(), NL3D::CPSLocated::getSize(), NL3D::CPSLocated::getSpeed(), NLMISC::CPlane::make(), min, MINI_TIMER, NLMISC::CMatrix::mulVector(), NL3D::CPSCollisionInfo::NewPos, NL3D::CPSCollisionInfo::NewSpeed, NL_PS_FUNC, NLMISC::CVector::norm(), NL3D::PSCollideEpsilon, and NL3D::PSStatsZoneRectangle.
| void NL3D::CPSZoneRectangle::deleteElement | ( | uint32 | index | ) | [protected, virtual] |
Implements NL3D::CPSLocatedBindable.
Definition at line 1303 of file ps_zone.cpp.
References _Basis, _Height, _Width, NL_PS_FUNC, and NL3D::CPSAttrib< T >::remove().
Implements NL3D::IPSMover.
Definition at line 1245 of file ps_zone.cpp.
References _Basis, NL3D::CPSLocatedBindable::_Owner, NL3D::CPSLocated::getPos(), NL_PS_FUNC, nlassert, NLMISC::CMatrix::setPos(), and NLMISC::CMatrix::setRot().
Reimplemented from NL3D::IPSMover.
Definition at line 1267 of file ps_zone.cpp.
References _Height, _Width, and NL_PS_FUNC.
| void NL3D::CPSZoneRectangle::newElement | ( | const CPSEmitterInfo & | info | ) | [protected, virtual] |
Generate a new element for this bindable.
They are generated according to the propertie of the class
Implements NL3D::CPSLocatedBindable.
Definition at line 1295 of file ps_zone.cpp.
References _Basis, _Height, _Width, NL3D::CPSAttrib< T >::insert(), NLMISC::CVector::K, and NL_PS_FUNC.
| NL3D::CPSZoneRectangle::NLMISC_DECLARE_CLASS | ( | CPSZoneRectangle | ) |
| void NL3D::CPSZoneRectangle::resize | ( | uint32 | size | ) | [protected, virtual] |
Resize the bindable attributes containers should not be called directly.
Call CPSLocated::resize instead
Implements NL3D::CPSLocatedBindable.
Definition at line 1286 of file ps_zone.cpp.
References _Basis, _Height, _Width, NL_PS_FUNC, nlassert, and NL3D::CPSAttrib< T >::resize().
| void NL3D::CPSZoneRectangle::serial | ( | NLMISC::IStream & | f | ) | throw (NLMISC::EStream) [virtual] |
serialization, DERIVER must override this, and call the parent version
Reimplemented from NL3D::CPSZone.
Definition at line 1275 of file ps_zone.cpp.
References NL_PS_FUNC, and NL3D::CPSZone::serial().
| void NL3D::CPSZoneRectangle::setMatrix | ( | uint32 | index, | |
| const NLMISC::CMatrix & | m | |||
| ) | [virtual] |
Implements NL3D::IPSMover.
Definition at line 1234 of file ps_zone.cpp.
References _Basis, NL3D::CPSLocatedBindable::_Owner, NLMISC::CMatrix::getI(), NLMISC::CMatrix::getJ(), NLMISC::CMatrix::getPos(), NL3D::CPSLocated::getPos(), NL_PS_FUNC, and nlassert.
| void NL3D::CPSZoneRectangle::setScale | ( | uint32 | index, | |
| const NLMISC::CVector & | s | |||
| ) | [virtual] |
Reimplemented from NL3D::IPSMover.
Definition at line 1261 of file ps_zone.cpp.
References _Height, _Width, NL_PS_FUNC, NLMISC::CVector::x, and NLMISC::CVector::y.
Reimplemented from NL3D::IPSMover.
Definition at line 1255 of file ps_zone.cpp.
References _Height, _Width, and NL_PS_FUNC.
| void NL3D::CPSZoneRectangle::show | ( | ) | [virtual] |
Show the zone (edition mode).
Implements NL3D::CPSZone.
Definition at line 1199 of file ps_zone.cpp.
References _Basis, _Height, NL3D::CPSLocatedBindable::_Owner, _Width, NL3D::CPSUtil::display3DQuad(), NL3D::CPSUtil::displayBasis(), NL3D::CParticleSystem::getCurrentEditedElement(), NL3D::CPSLocatedBindable::getDriver(), NL3D::CPSLocatedBindable::getFontGenerator(), NL3D::CPSLocatedBindable::getFontManager(), NL3D::CPSLocatedBindable::getLocalToWorldMatrix(), NL3D::CParticleSystemProcess::getOwner(), NL3D::CPSLocated::getPos(), NL3D::CPSLocated::getSize(), I, NL_PS_FUNC, nlassert, NLMISC::CRGBA::Red, NLMISC::CMatrix::setPos(), NLMISC::CMatrix::setRot(), and NL3D::CPSLocatedBindable::setupDriverModelMatrix().
| virtual bool NL3D::CPSZoneRectangle::supportNonUniformScaling | ( | void | ) | const [inline, virtual] |
Send back true if non-uniform scaling can be applied If it sends false, non-uniform scaling leads to undefine results (default has no effect).
Reimplemented from NL3D::IPSMover.
| virtual bool NL3D::CPSZoneRectangle::supportUniformScaling | ( | void | ) | const [inline, virtual] |
Send back true if uniform scaling can be applied If it sends false, uniform scaling leads to undefine results.
Reimplemented from NL3D::IPSMover.
CPSAttrib<CPlaneBasis> NL3D::CPSZoneRectangle::_Basis [protected] |
Definition at line 374 of file ps_zone.h.
Referenced by computeCollisions(), deleteElement(), getMatrix(), newElement(), resize(), setMatrix(), and show().
TPSAttribFloat NL3D::CPSZoneRectangle::_Height [protected] |
Definition at line 380 of file ps_zone.h.
Referenced by computeCollisions(), deleteElement(), getScale(), newElement(), resize(), setScale(), and show().
TPSAttribFloat NL3D::CPSZoneRectangle::_Width [protected] |
Definition at line 377 of file ps_zone.h.
Referenced by computeCollisions(), deleteElement(), getScale(), newElement(), resize(), setScale(), and show().
1.6.1