#include <Boid2.h>

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) |
| FixedVector & | getPosition () |
| FixedVector & | getVelocity () |
Protected Attributes | |
| ScorchedContext & | context_ |
| Target * | target_ |
| TargetMovementEntryBoids * | world_ |
| fixed | directionMag_ |
| FixedVector | direction_ |
Definition at line 32 of file Boid2.h.
| Boid2::Boid2 | ( | ScorchedContext & | context, | |
| Target * | target, | |||
| TargetMovementEntryBoids * | world | |||
| ) |
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().
| 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().
ScorchedContext& Boid2::context_ [protected] |
Target* Boid2::target_ [protected] |
Definition at line 43 of file Boid2.h.
Referenced by clearTarget(), getPosition(), getVelocity(), and update().
TargetMovementEntryBoids* Boid2::world_ [protected] |
fixed Boid2::directionMag_ [protected] |
FixedVector Boid2::direction_ [protected] |
Definition at line 52 of file Boid2.h.
Referenced by checkCollision(), checkGrouping(), and update().
1.5.3