#include <PosComponent.hpp>
Inheritance diagram for se_core::PosComponent:
Public Types | |
typedef ComponentPtr< PosComponent, sct_POS > | Ptr |
Public Member Functions | |
PosComponent (Composite *owner) | |
virtual | ~PosComponent () |
const Pos & | pos () const |
Return a const reference to the current position of the thing. | |
bool | didMove () const |
Does the PosComponent move during this simulation step? | |
void | resetFutureCoor () |
Reset the next coordinate. | |
void | resetFutureXZCoor () |
Pos & | nextPos () |
Get the next coordinate. | |
const Pos & | nextPos () const |
void | flip () |
Flip from Pos() to nextPos(). | |
virtual void | leaveCurrentParent () |
Remove the PosNode from the child list of its parent. | |
virtual bool | changeParent () |
Move this PosNode from the child list of the old parent, to the child list of the new. | |
void | updateWorldViewPoint () |
Update the world viewpoint. | |
void | worldCoor (scale_t alpha, Point3 &dest) const |
World coor interpolated between now and next. | |
void | worldViewPoint (scale_t alpha, ViewPoint &dest) const |
World viewpoint interpolated between now and next. | |
virtual const char * | name () const |
By default returns name of composite, which returns name of composite factory. | |
Composite * | owner () |
const Composite * | owner () const |
Component type. | |
Component * | component (int type) |
const Component * | component (int type) const |
int | type () const |
const ComponentFactory * | factory () |
bool | isActive () |
bool | isDead () const |
Static Public Member Functions | |
PosComponent * | get (Composite *composite) |
PosComponent * | get (Composite &composite) |
const PosComponent * | get (const Composite &composite) |
PosComponent * | get (Component &component) |
const PosComponent * | get (const Component &component) |
Protected Member Functions | |
virtual void | cleanup () |
Called by Composite. | |
virtual void | setActive (bool state) |
Called by Composite. | |
virtual void | setDead () |
Called by Composite. | |
virtual void | parentChanged (Composite *newParent, Composite *oldParent) |
Called by Composite. | |
virtual void | zoneChanged (int type, Composite *newArea, Composite *oldArea) |
Called by Composite. | |
virtual void | init () |
Called by Composite. | |
Protected Attributes | |
Pos | position_ |
Position of the PosComponent at the beginning of the current simulation step. | |
Pos | nextPosition_ |
Position of the PosComponent at the beginning of the next simulation step. | |
bool | didMove_ |
Flag which indicates that the PosComponent moves between the current and the next simulation step. | |
bool | isCollideable_ |
Flag that indicated wether other PosNodes can collide with this PosNode. | |
int | type_ |
The type of Component. | |
Composite * | owner_ |
const ComponentFactory * | factory_ |
Friends | |
class | Composite |
PosComponent is the base class for all world entities, including the Area, Thing and Actor classes. It maintains information about the present local coordinate of a world entity, a reference to its parent, a list of its children, and methods for traversing the parents to calculate the world coordinates of the entity.
Definition at line 44 of file PosComponent.hpp.
|
Definition at line 46 of file PosComponent.hpp. |
|
Definition at line 33 of file PosComponent.cpp. References se_core::sct_POS. |
|
Definition at line 40 of file PosComponent.cpp. |
|
Move this PosNode from the child list of the old parent, to the child list of the new. You don't call this method directly. It is called automatically by the SagaEngine during the flip phase of a new simulation step. Definition at line 105 of file PosComponent.cpp. |
|
Called by Composite.
Reimplemented from se_core::Component. Definition at line 97 of file PosComponent.cpp. |
|
Definition at line 71 of file Component.hpp. References se_core::Component::component(). |
|
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(). |
|
Does the PosComponent move during this simulation step?
Definition at line 96 of file PosComponent.hpp. Referenced by se_core::Pos::didParentMove(). |
|
Definition at line 81 of file Component.hpp. Referenced by se_core::Composite::releaseComponents(). |
|
Flip from Pos() to nextPos(). Make the next position the current position. This method is called by the Area the beginning of a new AI step. Definition at line 45 of file PosComponent.cpp. References se_core::st_AREA, and se_core::Composite::zoneChanged(). Referenced by se_client::PlayerParser::parse(). |
|
Definition at line 73 of file PosComponent.hpp. References se_core::Composite::component(), and se_core::Component::owner(). |
|
Definition at line 68 of file PosComponent.hpp. References se_core::Composite::component(), and se_core::Component::owner(). |
|
Definition at line 63 of file PosComponent.hpp. References se_core::Composite::component(). |
|
Definition at line 58 of file PosComponent.hpp. References se_core::Composite::component(). |
|
Definition at line 51 of file PosComponent.hpp. References se_core::Composite::component(). |
|
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(). |
|
Definition at line 26 of file Component.cpp. |
|
Definition at line 31 of file Component.cpp. Referenced by se_core::Actor::affect(). |
|
Remove the PosNode from the child list of its parent. You don't call this method directly. It is called automatically by the SagaEngine during the flip phase of a new simulation step. Definition at line 89 of file PosComponent.cpp. |
|
By default returns name of composite, which returns name of composite factory.
Reimplemented in se_core::CutsceneAreaComponent, se_core::CutsceneComponent, se_core::CutsceneManager, se_core::CollisionAreaComponent, se_core::SignalAreaComponent, se_core::SignalComponent, se_core::SpawnAreaComponent, se_core::SpawnManager, se_core::ZoneAreaComponent, se_core::ZoneComponent, se_core::ZoneManager, se_basic::NavMeshAreaComponent, se_basic::NavMeshComponent, and se_basic::NavMeshManager. Definition at line 21 of file Component.cpp. Referenced by se_core::Area::addNeighbour(), se_core::DefaultTC::collide(), se_core::CoDefault::collide(), se_basic::Say::perform(), and se_ogre::SpeechBubble::speechEvent(). |
|
Definition at line 121 of file PosComponent.hpp. |
|
Get the next coordinate. Get the precalculated Coor for where the Actor is at the beginning of the next (and the end of this) initiative. Definition at line 117 of file PosComponent.hpp. Referenced by se_core::DefaultTC::_pop(), se_core::CoDefault::_pop(), se_core::CollisionAreaComponent::_testCollisionCandidates(), se_core::CollisionAreaComponent::_testCollisionCandidates2(), se_core::Pos::areaCoor(), se_core::Pos::areaFace(), se_core::Pos::areaViewPoint(), se_ogre::O3dAreaComponent::compileStaticGeometry(), se_client::PlayerParser::parse(), se_core::Pos::setParent(), se_ogre::ThingBillboard::ThingBillboard(), and se_core::CollisionComponent::whenDoesGeometryCollide(). |
|
Component type.
Definition at line 62 of file Component.hpp. |
|
|
Called by Composite.
Reimplemented in se_core::AreaChildComponent, and se_core::NodeComponent. Definition at line 101 of file Component.hpp. Referenced by se_core::Composite::resetParent(), and se_core::Composite::setParent(). |
|
Return a const reference to the current position of the thing. The current position should never be changed. Updates of the position for future steps should happen inside the nextPos(). The nextPos() is copied into pos() at the next AI-step. The pos() object also contains information about the radius of the collision cylinder of the PosComponent. This is used for the first step of the collision testing. The PosComponentCollide object registered with the PosComponent may perform further collision testing. Definition at line 90 of file PosComponent.hpp. Referenced by se_basic::SimpleAreaThingEncoder::encode(), se_core::ThingCollide::isGuilty(), and se_basic::NavMeshArea::path(). |
|
Reset the next coordinate. Sets the next coordinate to be the same as the present one. Definition at line 104 of file PosComponent.hpp. |
|
Definition at line 106 of file PosComponent.hpp. |
|
|
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(). |
|
Definition at line 76 of file Component.hpp. Referenced by se_core::Composite::component(). |
|
Update the world viewpoint. Updates the world_ attribute in nextPos() make it harmonize with local_. Definition at line 65 of file PosComponent.cpp. |
|
World coor interpolated between now and next.
Definition at line 74 of file PosComponent.cpp. References se_core::Tuple3::interpolate(), and se_core::Tuple3::set(). Referenced by se_core::CollisionComponent::bouncePoints(), and se_core::CollisionComponent::whenDoesGeometryCollide(). |
|
World viewpoint interpolated between now and next.
Definition at line 81 of file PosComponent.cpp. References se_core::ViewPoint::coor_, se_core::ViewPoint::face_, se_core::Euler3::interpolate(), se_core::Tuple3::interpolate(), and se_core::ViewPoint::setViewPoint(). |
|
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(). |
|
Definition at line 89 of file Component.hpp. |
|
Flag which indicates that the PosComponent moves between the current and the next simulation step.
Definition at line 182 of file PosComponent.hpp. |
|
Definition at line 120 of file Component.hpp. |
|
Flag that indicated wether other PosNodes can collide with this PosNode. Used by the Area class to decide wether the PosNode should be inserted into a collision grid. Definition at line 187 of file PosComponent.hpp. |
|
Position of the PosComponent at the beginning of the next simulation step.
Definition at line 179 of file PosComponent.hpp. |
|
Definition at line 118 of file Component.hpp. |
|
Position of the PosComponent at the beginning of the current simulation step.
Definition at line 176 of file PosComponent.hpp. |
|
The type of Component.
Definition at line 117 of file Component.hpp. |
Home Page | SagaEngine trunk (updated nightly) reference generated Sun Dec 2 20:06:27 2007 by Doxygen version 1.3.9.1.