Boid2 Class Reference

#include <Boid2.h>

Inheritance diagram for Boid2:

TargetStateMovement

List of all members.

Public Member Functions

 Boid2 (ScorchedContext &context, Target *target, TargetMovementEntryBoids *world)
 ~Boid2 ()
void update (fixed frameTime, std::vector< Boid2 * > &boidSet, bool complexUpdate)
void clearTarget ()

Protected Member Functions

FixedVector checkGrouping (std::vector< Boid2 * > &boidSet)
bool checkCollision (FixedVector &normal)
FixedVectorgetPosition ()
FixedVectorgetVelocity ()

Protected Attributes

ScorchedContextcontext_
Targettarget_
TargetMovementEntryBoidsworld_
fixed directionMag_
FixedVector direction_


Detailed Description

Definition at line 32 of file Boid2.h.


Constructor & Destructor Documentation

Boid2::Boid2 ( ScorchedContext context,
Target target,
TargetMovementEntryBoids world 
)

Definition at line 30 of file Boid2.cpp.

Boid2::~Boid2 (  ) 

Definition at line 35 of file Boid2.cpp.


Member Function Documentation

void Boid2::update ( fixed  frameTime,
std::vector< Boid2 * > &  boidSet,
bool  complexUpdate 
)

Definition at line 58 of file Boid2.cpp.

References ActionController::addSyncCheck(), atan2x(), checkCollision(), checkGrouping(), context_, direction_, directionMag_, S3D::formatStringBuffer(), ScorchedContext::getActionController(), TargetMovementEntryBoids::getCruiseVelocity(), Target::getLife(), TargetMovementEntryBoids::getMaxAcceleration(), TargetMovementEntryBoids::getMaxVelocity(), ScorchedContext::getOptionsGame(), Target::getPlayerId(), getPosition(), TargetLife::getTargetPosition(), TargetLife::getVelocity(), getVelocity(), FixedVector::Magnitude(), TargetLife::setTargetPositionAndRotation(), TargetLife::setVelocity(), FixedVector::StoreNormalize(), target_, world_, and fixed::XPI.

Referenced by TargetMovementEntryBoids::processSet().

void Boid2::clearTarget (  ) 

Definition at line 53 of file Boid2.cpp.

References target_.

FixedVector Boid2::checkGrouping ( std::vector< Boid2 * > &  boidSet  )  [protected]

Definition at line 138 of file Boid2.cpp.

References fixed::abs(), direction_, FixedVector::dotP(), getPosition(), getVelocity(), and FixedVector::Magnitude().

Referenced by update().

bool Boid2::checkCollision ( FixedVector normal  )  [protected]

Definition at line 191 of file Boid2.cpp.

References context_, direction_, LandscapeMaps::getGroundMaps(), GroundMaps::getHeight(), ScorchedContext::getLandscapeMaps(), TargetMovementEntryBoids::getMaxBounds(), TargetMovementEntryBoids::getMinBounds(), GroundMaps::getNormal(), getPosition(), FixedVector::StoreNormalize(), and world_.

Referenced by update().

FixedVector & Boid2::getPosition (  )  [protected]

Definition at line 39 of file Boid2.cpp.

References Target::getLife(), TargetLife::getTargetPosition(), and target_.

Referenced by checkCollision(), checkGrouping(), and update().

FixedVector & Boid2::getVelocity (  )  [protected]

Definition at line 46 of file Boid2.cpp.

References Target::getLife(), TargetLife::getVelocity(), and target_.

Referenced by checkGrouping(), and update().


Member Data Documentation

ScorchedContext& Boid2::context_ [protected]

Definition at line 42 of file Boid2.h.

Referenced by checkCollision(), and update().

Target* Boid2::target_ [protected]

Definition at line 43 of file Boid2.h.

Referenced by clearTarget(), getPosition(), getVelocity(), and update().

TargetMovementEntryBoids* Boid2::world_ [protected]

Definition at line 44 of file Boid2.h.

Referenced by checkCollision(), and update().

fixed Boid2::directionMag_ [protected]

Definition at line 51 of file Boid2.h.

Referenced by update().

FixedVector Boid2::direction_ [protected]

Definition at line 52 of file Boid2.h.

Referenced by checkCollision(), checkGrouping(), and update().


The documentation for this class was generated from the following files:
Generated on Mon Feb 16 15:15:00 2009 for Scorched3D by  doxygen 1.5.3