se_core::CollisionAreaComponent Class Reference

#include <CollisionAreaComponent.hpp>

Inheritance diagram for se_core::CollisionAreaComponent:

se_core::NodeComponent se_core::Component List of all members.

Public Types

typedef ComponentPtr< CollisionAreaComponent,
sct_COLLISION > 
Ptr

Public Member Functions

 CollisionAreaComponent (Composite *owner)
 Constructor.
 ~CollisionAreaComponent ()
const char * name () const
 By default returns name of composite, which returns name of composite factory.
CollisionGridcollisionGrid ()
AreaEdgeareaEdge ()
const AreaEdgeareaEdge () const
void setActive (bool state)
 Called by Composite.
void addCollideable (CollisionComponent &cc)
void removeCollideable (CollisionComponent &cc)
void getContactList (Contact *list, short &count, int maxCollisions)
coor_t farthestLineOfSight (const Point3 &fromPoint, const Point3 &toPoint) const
short _collisionCandidates (CollisionComponent *cc, const int MAX_THINGS, CollisionComponent *candidates[])
short _collisionCandidates2 (CollisionComponent *cc, const int MAX_THINGS, CollisionComponent *candidates[])
void _testCollisionCandidates (CollisionComponent *cc, short candidateCount, CollisionComponent *candidates[], int maxCollisions, Contact *list, short &count)
void _testCollisionCandidates2 (CollisionComponent *cc, short candidateCount, CollisionComponent *candidates[], int maxCollisions, Contact *list, short &count)
bool hasParent () const
 Does the Pos have a parent?
NodeComponentparent ()
 Get parent.
const NodeComponentparent () const
 Get parent.
void resetParent ()
 Set parent to none.
void setParent (NodeComponent &p)
NodeComponentListchildren ()
Compositeowner ()
const Compositeowner () const
 Component type.
Componentcomponent (int type)
const Componentcomponent (int type) const
int type () const
const ComponentFactoryfactory ()
bool isActive ()
bool isDead () const

Protected Member Functions

void parentChanged (Composite *newParent, Composite *oldParent)
 Called by Composite.
void cleanup ()
 Called by Composite.
void addChild (NodeComponent &node)
 Add a NodeComponent as a child.
void removeChild (NodeComponent &node)
 Add a NodeComponent from the child list.
virtual void setDead ()
 Called by Composite.
virtual void zoneChanged (int type, Composite *newArea, Composite *oldArea)
 Called by Composite.
virtual void init ()
 Called by Composite.

Protected Attributes

NodeComponentparent_
 The parent of this position.
NodeComponentList children_
 List of child NodeComponents.
int type_
 The type of Component.
Compositeowner_
const ComponentFactoryfactory_

Friends

class Composite

Member Typedef Documentation

typedef ComponentPtr<CollisionAreaComponent, sct_COLLISION> se_core::CollisionAreaComponent::Ptr
 

Definition at line 48 of file CollisionAreaComponent.hpp.


Constructor & Destructor Documentation

se_core::CollisionAreaComponent::CollisionAreaComponent Composite owner  ) 
 

Constructor.

Definition at line 37 of file CollisionAreaComponent.cpp.

References se_core::sct_COLLISION.

se_core::CollisionAreaComponent::~CollisionAreaComponent  ) 
 

Definition at line 44 of file CollisionAreaComponent.cpp.


Member Function Documentation

short se_core::CollisionAreaComponent::_collisionCandidates CollisionComponent cc,
const int  MAX_THINGS,
CollisionComponent candidates[]
 

Definition at line 219 of file CollisionAreaComponent.cpp.

References se_core::CollisionComponent::areaCovered(), se_core::BoundingBox::center(), coor_t, and se_core::BoundingBox::radius().

short se_core::CollisionAreaComponent::_collisionCandidates2 CollisionComponent cc,
const int  MAX_THINGS,
CollisionComponent candidates[]
 

Definition at line 240 of file CollisionAreaComponent.cpp.

References se_core::CollisionComponent::isCollideable().

void se_core::CollisionAreaComponent::_testCollisionCandidates CollisionComponent cc,
short  candidateCount,
CollisionComponent candidates[],
int  maxCollisions,
Contact list,
short &  count
 

Definition at line 261 of file CollisionAreaComponent.cpp.

References se_core::_testCollision(), Assert, se_core::CollisionComponent::bouncePoint(), se_core::ContactInfo::bouncePoint_, se_core::ContactInfo::cc_, se_core::Contact::ci1_, se_core::Contact::ci2_, se_core::ViewPoint::coor_, se_core::CollisionComponent::isCollideable(), LogWarning, se_core::Composite::name(), se_core::PosComponent::nextPos(), se_core::Component::owner(), se_core::CollisionComponent::posComponent(), se_core::ContactInfo::radius_, se_core::Contact::radSum_, se_core::ViewPoint::setViewPoint(), se_core::ContactInfo::vp_, se_core::Pos::world_, and se_core::Tuple3::y_.

void se_core::CollisionAreaComponent::_testCollisionCandidates2 CollisionComponent cc,
short  candidateCount,
CollisionComponent candidates[],
int  maxCollisions,
Contact list,
short &  count
 

Definition at line 320 of file CollisionAreaComponent.cpp.

References se_core::_testCollision(), Assert, se_core::CollisionComponent::bouncePoint(), se_core::ContactInfo::bouncePoint_, se_core::ContactInfo::cc_, se_core::Contact::ci1_, se_core::Contact::ci2_, se_core::ViewPoint::coor_, LogWarning, se_core::Composite::name(), se_core::PosComponent::nextPos(), se_core::Component::owner(), se_core::CollisionComponent::posComponent(), se_core::ContactInfo::radius_, se_core::Contact::radSum_, se_core::ViewPoint::setViewPoint(), se_core::ContactInfo::vp_, se_core::Pos::world_, and se_core::Tuple3::y_.

void se_core::NodeComponent::addChild NodeComponent node  )  [protected, inherited]
 

Add a NodeComponent as a child.

Called by setParent of child.

Definition at line 60 of file NodeComponent.cpp.

Referenced by se_core::NodeComponent::setParent().

void se_core::CollisionAreaComponent::addCollideable CollisionComponent cc  ) 
 

Definition at line 50 of file CollisionAreaComponent.cpp.

References se_core::CollisionComponent::areaCovered(), se_core::BoundingBox::center(), coor_t, and se_core::BoundingBox::radius().

Referenced by se_core::CollisionComponent::setCollideable(), and se_core::CollisionComponent::zoneChanged().

const AreaEdge& se_core::CollisionAreaComponent::areaEdge  )  const [inline]
 

Definition at line 64 of file CollisionAreaComponent.hpp.

AreaEdge& se_core::CollisionAreaComponent::areaEdge  )  [inline]
 

Definition at line 61 of file CollisionAreaComponent.hpp.

NodeComponentList& se_core::NodeComponent::children  )  [inline, inherited]
 

Definition at line 63 of file NodeComponent.hpp.

Referenced by se_core::NodeComponentList::TreeIterator::next().

void se_core::NodeComponent::cleanup  )  [inline, protected, virtual, inherited]
 

Called by Composite.

Reimplemented from se_core::Component.

Reimplemented in se_core::RootComponent, se_core::CutsceneComponent, se_core::SignalAreaComponent, se_core::SignalComponent, se_ogre::O3dAreaComponent, se_ogre::O3dThingComponent, and se_basic::NavMeshComponent.

Definition at line 70 of file NodeComponent.hpp.

CollisionGrid* se_core::CollisionAreaComponent::collisionGrid  )  [inline]
 

Definition at line 57 of file CollisionAreaComponent.hpp.

Referenced by se_core::CollisionComponent::move().

const Component* se_core::Component::component int  type  )  const [inline, inherited]
 

Definition at line 71 of file Component.hpp.

References se_core::Component::component().

Component* se_core::Component::component int  type  )  [inline, inherited]
 

Definition at line 67 of file Component.hpp.

References se_core::Composite::component().

Referenced by se_core::Component::component(), se_core::Component::ComponentPtr< T, type >::ComponentPtr(), se_ogre::O3dThingComponent::get(), se_ogre::O3dNodeComponent::get(), and se_ogre::O3dAreaComponent::get().

const ComponentFactory* se_core::Component::factory  )  [inline, inherited]
 

Definition at line 81 of file Component.hpp.

Referenced by se_core::Composite::releaseComponents().

coor_t se_core::CollisionAreaComponent::farthestLineOfSight const Point3 fromPoint,
const Point3 toPoint
const
 

Definition at line 169 of file CollisionAreaComponent.cpp.

References se_core::Tuple3::add(), se_core::CollisionComponent::areaCovered(), se_core::CollisionComponent::bouncePoints(), coor_t, se_core::CollisionComponent::doObstructView(), se_core::BoundingBox::isTouching(), se_core::BoundingBox::maxY_, se_core::Tuple3::scale(), and se_core::Point3::xzDistanceSquared().

void se_core::CollisionAreaComponent::getContactList Contact list,
short &  count,
int  maxCollisions
 

Definition at line 372 of file CollisionAreaComponent.cpp.

References se_core::NodeComponentList::TreeIterator::hasNext(), se_core::CollisionComponent::isCollideable(), and se_core::NodeComponentList::TreeIterator::next().

Referenced by se_core::CollisionManager::getContactList().

bool se_core::NodeComponent::hasParent  )  const [inline, inherited]
 

Does the Pos have a parent?

Definition at line 41 of file NodeComponent.hpp.

void se_core::Component::init  )  [protected, virtual, inherited]
 

Called by Composite.

Reimplemented in se_core::RootComponent, se_core::SignalAreaComponent, se_ogre::O3dAreaComponent, and se_ogre::O3dThingComponent.

Definition at line 42 of file Component.cpp.

Referenced by se_core::Composite::init().

bool se_core::Component::isActive  )  [inherited]
 

Definition at line 26 of file Component.cpp.

bool se_core::Component::isDead  )  const [inherited]
 

Definition at line 31 of file Component.cpp.

Referenced by se_core::Actor::affect().

const char* se_core::CollisionAreaComponent::name  )  const [inline, virtual]
 

By default returns name of composite, which returns name of composite factory.

Reimplemented from se_core::Component.

Definition at line 55 of file CollisionAreaComponent.hpp.

const Composite* se_core::Component::owner  )  const [inline, inherited]
 

Component type.

Definition at line 62 of file Component.hpp.

Composite* se_core::Component::owner  )  [inline, inherited]
 

Definition at line 54 of file Component.hpp.

Referenced by _testCollisionCandidates(), _testCollisionCandidates2(), se_core::HealthListeners::add(), se_core::ZoneAreaComponent::addNeighbour(), se_basic::PhTrackingCamera::affect(), se_core::HealthListeners::castHealthChangedEvent(), se_core::Component::ComponentPtr< T, type >::ComponentPtr(), se_ogre::ThingMOManager::create(), se_basic::SimpleAreaThingEncoder::encode(), se_core::SpawnComponent::get(), se_core::SignalComponent::get(), se_core::SignalAreaComponent::get(), se_core::ScriptComponent::get(), se_core::PosComponent::get(), se_core::PhysicsComponent::get(), se_core::StatComponent::get(), se_ogre::O3dThingComponent::get(), se_ogre::O3dNodeComponent::get(), se_ogre::O3dAreaComponent::get(), se_core::Pos::hasArea(), se_core::CollisionGrid::insert(), se_core::CollisionComponent::isCollideable(), se_core::ZoneComponent::name(), se_core::Component::ComponentPtr< T, type >::operator=(), se_core::DefaultTC::pop(), se_core::CoDefault::pop(), se_core::DefaultTC::popAndDie(), se_core::CoDefault::popAndDie(), removeCollideable(), se_core::AreaManager::resetThings(), se_core::Actor::scheduleForDestruction(), se_core::AreaManager::setActive(), se_core::AreaManager::setInactive(), and se_ogre::O3dManager::updateStats().

const NodeComponent* se_core::NodeComponent::parent  )  const [inline, inherited]
 

Get parent.

const version.

Definition at line 52 of file NodeComponent.hpp.

NodeComponent* se_core::NodeComponent::parent  )  [inline, inherited]
 

Get parent.

Definition at line 46 of file NodeComponent.hpp.

void se_core::NodeComponent::parentChanged Composite newParent,
Composite oldParent
[protected, virtual, inherited]
 

Called by Composite.

Reimplemented from se_core::Component.

Reimplemented in se_core::AreaChildComponent.

Definition at line 74 of file NodeComponent.cpp.

References se_core::Composite::component().

void se_core::NodeComponent::removeChild NodeComponent node  )  [protected, inherited]
 

Add a NodeComponent from the child list.

Called by setParent of child.

Definition at line 68 of file NodeComponent.cpp.

void se_core::CollisionAreaComponent::removeCollideable CollisionComponent cc  ) 
 

Definition at line 61 of file CollisionAreaComponent.cpp.

References se_core::CollisionComponent::areaCovered(), AssertWarning, se_core::BoundingBox::center(), coor_t, se_core::Composite::name(), se_core::Component::owner(), and se_core::BoundingBox::radius().

Referenced by se_core::CollisionComponent::setCollideable(), and se_core::CollisionComponent::zoneChanged().

void se_core::NodeComponent::resetParent  )  [inherited]
 

Set parent to none.

Parameters:
doKeepWorldCoor wether the local viewpoint should be updated to maintain the world viewpoint

Definition at line 41 of file NodeComponent.cpp.

void se_core::CollisionAreaComponent::setActive bool  state  )  [virtual]
 

Called by Composite.

Reimplemented from se_core::Component.

Definition at line 125 of file CollisionAreaComponent.cpp.

virtual void se_core::Component::setDead  )  [inline, protected, virtual, inherited]
 

Called by Composite.

Reimplemented in se_core::SignalComponent, and se_core::SpawnComponent.

Definition at line 97 of file Component.hpp.

Referenced by se_core::Composite::scheduleForDestruction().

void se_core::NodeComponent::setParent NodeComponent p  )  [inherited]
 

Definition at line 50 of file NodeComponent.cpp.

References se_core::NodeComponent::addChild().

int se_core::Component::type  )  const [inline, inherited]
 

Definition at line 76 of file Component.hpp.

Referenced by se_core::Composite::component().

void se_core::Component::zoneChanged int  type,
Composite newArea,
Composite oldArea
[protected, virtual, inherited]
 

Called by Composite.

Reimplemented in se_core::AreaChildComponent, se_core::CollisionComponent, and se_core::SignalComponent.

Definition at line 37 of file Component.cpp.

Referenced by se_core::Composite::zoneChanged().


Friends And Related Function Documentation

friend class Composite [friend, inherited]
 

Definition at line 89 of file Component.hpp.


Member Data Documentation

NodeComponentList se_core::NodeComponent::children_ [protected, inherited]
 

List of child NodeComponents.

Definition at line 92 of file NodeComponent.hpp.

const ComponentFactory* se_core::Component::factory_ [protected, inherited]
 

Definition at line 120 of file Component.hpp.

Composite* se_core::Component::owner_ [protected, inherited]
 

Definition at line 118 of file Component.hpp.

NodeComponent* se_core::NodeComponent::parent_ [protected, inherited]
 

The parent of this position.

Definition at line 89 of file NodeComponent.hpp.

int se_core::Component::type_ [protected, inherited]
 

The type of Component.

Definition at line 117 of file Component.hpp.


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

Home Page | SagaEngine trunk (updated nightly) reference generated Sun Dec 2 20:06:27 2007 by Doxygen version 1.3.9.1.

SourceForge.net Logo