MAK RTIspy API Documentation for HLA Evolved
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions
BallController Class Reference
+ Inheritance diagram for BallController:
+ Collaboration diagram for BallController:

List of all members.

Public Member Functions

 BallController (BallMap *data, DdmRegionMap *regionData)
virtual ~BallController ()
virtual bool createAndJoinFederation (const std::wstring &federation, const std::wstring &federateType, const std::wstring &federateName=std::wstring(), bool includeInterExt=false)=0
virtual bool resignAndDestroyFederation ()=0
virtual bool subscribe ()=0
virtual bool unsubscribe ()=0
virtual void update ()
virtual void addBall (int x, int y)
virtual void deleteBall (const std::wstring id)=0
virtual void acquireBall (const std::wstring id)=0
virtual void divestBall (const std::wstring id)=0
virtual bool subscribeWithRegion (int xLowerBound, int yLowerBound, int xUpperBound, int yUpperBound)=0
virtual bool unsubscribeWithRegions (bool resubscribeWithoutRegion)=0
virtual void setDimensions (int minX, int minY, int maxX, int maxY)
virtual void setBallColor (BallColor)
virtual const std::wstring & federateId () const =0
virtual const std::wstring & federateType () const =0
virtual const std::wstring & federateName () const =0
virtual const std::wstring & federationName () const =0
virtual bool isFederateNameSupported () const =0
virtual bool isInteractionExtensionSupported () const =0
virtual bool isDdmEnabled () const
virtual bool isOwnershipTransferEnabled () const
virtual bool isConnected () const
virtual bool isJoined () const
virtual bool isSubscribed () const
virtual void getPendingTextEvents (std::list< TextEvent > &textEvents)
virtual const std::wstring & getLog () const
virtual void clearLog ()

Protected Member Functions

virtual void moveBalls ()
virtual void calculateNewLoc (double x, double y, double distance, double direction, double &newX, double &newY) const
virtual bool calculateVertWallCollision (double x, double y, double distance, double direction, double newX, double newY, double radius, double &finalDirection, double &distAfterColl, double &collX, double &collY, double &finalX, double &finalY) const
virtual bool calculateHorizWallCollision (double x, double y, double distance, double direction, double newX, double newY, double radius, double &finalDirection, double &distAfterColl, double &collX, double &collY, double &finalX, double &finalY) const
virtual void sendUpdates ()=0
virtual void receiveUpdates ()=0
virtual void requestNewBall (Ball *ball, const std::wstring name)=0

Protected Attributes

BallMapmyBallData
DdmRegionMapmyRegionData
std::list< TextEventmyPendingTextEvents
bool myIsConnected
bool myDdmEnabled
bool myOwnershipTransferEnabled
bool myIsJoined
bool myIsSubscribed
int myMinX
int myMinY
int myMaxX
int myMaxY
unsigned int myNextBallNumber
BallColor myBallColor
std::wstring myLog

Static Protected Attributes

static const double pi = 3.14159265
static const double maxRadians = 2*BallController::pi
static const double maxDegrees = 360
static const double degreesToRadians

Private Member Functions

 BallController ()

Constructor & Destructor Documentation

BallController::BallController ( BallMap data,
DdmRegionMap regionData 
)

Member Function Documentation

virtual void BallController::acquireBall ( const std::wstring  id) [pure virtual]
void BallController::addBall ( int  x,
int  y 
) [virtual]
bool BallController::calculateHorizWallCollision ( double  x,
double  y,
double  distance,
double  direction,
double  newX,
double  newY,
double  radius,
double finalDirection,
double distAfterColl,
double collX,
double collY,
double finalX,
double finalY 
) const [protected, virtual]

References calculateNewLoc(), maxRadians, myMaxY, and myMinY.

Referenced by moveBalls().

void BallController::calculateNewLoc ( double  x,
double  y,
double  distance,
double  direction,
double newX,
double newY 
) const [protected, virtual]
bool BallController::calculateVertWallCollision ( double  x,
double  y,
double  distance,
double  direction,
double  newX,
double  newY,
double  radius,
double finalDirection,
double distAfterColl,
double collX,
double collY,
double finalX,
double finalY 
) const [protected, virtual]

References calculateNewLoc(), maxRadians, myMaxX, myMaxY, myMinX, myMinY, and pi.

Referenced by moveBalls().

void BallController::clearLog ( ) [virtual]

References myLog.

Referenced by HlaBounceMainWindow::updateBalls().

virtual bool BallController::createAndJoinFederation ( const std::wstring &  federation,
const std::wstring &  federateType,
const std::wstring &  federateName = std::wstring(),
bool  includeInterExt = false 
) [pure virtual]
virtual void BallController::deleteBall ( const std::wstring  id) [pure virtual]
virtual void BallController::divestBall ( const std::wstring  id) [pure virtual]
virtual const std::wstring& BallController::federateId ( ) const [pure virtual]

Implemented in BallController1516e, BallController13, and BallController1516.

Referenced by addBall().

virtual const std::wstring& BallController::federateName ( ) const [pure virtual]
virtual const std::wstring& BallController::federateType ( ) const [pure virtual]
virtual const std::wstring& BallController::federationName ( ) const [pure virtual]
const std::wstring & BallController::getLog ( ) const [virtual]

References myLog.

Referenced by HlaBounceMainWindow::updateBalls().

void BallController::getPendingTextEvents ( std::list< TextEvent > &  textEvents) [virtual]
bool BallController::isConnected ( ) const [virtual]
bool BallController::isDdmEnabled ( ) const [virtual]
virtual bool BallController::isFederateNameSupported ( ) const [pure virtual]
virtual bool BallController::isInteractionExtensionSupported ( ) const [pure virtual]
bool BallController::isJoined ( ) const [virtual]
bool BallController::isSubscribed ( ) const [virtual]
void BallController::moveBalls ( ) [protected, virtual]
virtual void BallController::receiveUpdates ( ) [protected, pure virtual]

Implemented in BallController1516e, BallController13, and BallController1516.

Referenced by update().

virtual void BallController::requestNewBall ( Ball ball,
const std::wstring  name 
) [protected, pure virtual]

Implemented in BallController1516e, BallController13, and BallController1516.

Referenced by addBall().

virtual void BallController::sendUpdates ( ) [protected, pure virtual]

Implemented in BallController1516e, BallController13, and BallController1516.

Referenced by update().

void BallController::setBallColor ( BallColor  color) [virtual]
void BallController::setDimensions ( int  minX,
int  minY,
int  maxX,
int  maxY 
) [virtual]
virtual bool BallController::subscribe ( ) [pure virtual]
virtual bool BallController::subscribeWithRegion ( int  xLowerBound,
int  yLowerBound,
int  xUpperBound,
int  yUpperBound 
) [pure virtual]
virtual bool BallController::unsubscribe ( ) [pure virtual]
virtual bool BallController::unsubscribeWithRegions ( bool  resubscribeWithoutRegion) [pure virtual]
void BallController::update ( ) [virtual]

Member Data Documentation

const double BallController::degreesToRadians [static, protected]
const double BallController::maxDegrees = 360 [static, protected]

Referenced by addBall().

const double BallController::maxRadians = 2*BallController::pi [static, protected]

Referenced by BallController13::acquireBall(), BallController1516e::acquireBall(), BallController1516::acquireBall(), BallController13::assumeOwnership(), BallController1516::assumeOwnership(), BallController1516e::assumeOwnership(), BallController13::ballDiscovered(), BallController1516::ballDiscovered(), BallController1516e::ballDiscovered(), BallController13::ballNotVisible(), BallController1516e::ballNotVisible(), BallController1516::ballNotVisible(), BallController13::ballRemoved(), BallController1516e::ballRemoved(), BallController1516::ballRemoved(), BallController13::ballUpdated(), BallController1516e::ballUpdated(), BallController1516::ballUpdated(), BallController13::ballVisible(), BallController1516e::ballVisible(), BallController1516::ballVisible(), BallController1516::confirmDivestiture(), BallController1516e::confirmDivestiture(), BallController13::deleteBall(), BallController1516::deleteBall(), BallController1516e::deleteBall(), BallController1516::deleteKnownBalls(), BallController13::deleteKnownBalls(), BallController1516e::deleteKnownBalls(), BallController1516e::divestBall(), BallController1516::divestBall(), BallController13::divestBall(), BallController1516::markBallsOutOfScope(), BallController13::markBallsOutOfScope(), BallController1516e::markBallsOutOfScope(), moveBalls(), BallController13::ownershipAcquired(), BallController1516::ownershipAcquired(), BallController1516e::ownershipAcquired(), BallController13::ownershipDivested(), BallController13::releaseOwnership(), BallController1516::releaseOwnership(), BallController1516e::releaseOwnership(), BallController1516::sendUpdates(), BallController13::sendUpdates(), BallController1516e::sendUpdates(), and setBallColor().

std::wstring BallController::myLog [protected]

Referenced by BallController13::acquireBall(), BallController1516e::acquireBall(), BallController1516::acquireBall(), BallController13::assumeOwnership(), BallController1516::assumeOwnership(), BallController1516e::assumeOwnership(), BallController13::BallController13(), BallController1516::BallController1516(), BallController1516e::BallController1516e(), clearLog(), BallController1516::confirmDivestiture(), BallController1516e::confirmDivestiture(), BallController13::createAndJoinFederation(), BallController1516e::createAndJoinFederation(), BallController1516::createAndJoinFederation(), BallController13::createPublicationRegion(), BallController1516::createPublicationRegion(), BallController1516e::createPublicationRegion(), BallController1516::deleteBall(), BallController1516e::deleteBall(), BallController13::deleteBall(), BallController13::divestBall(), BallController1516e::divestBall(), BallController1516::divestBall(), getLog(), BallController1516e::nameReservationFailed(), BallController1516::nameReservationFailed(), BallController13::ownershipAcquired(), BallController1516::ownershipAcquired(), BallController1516e::ownershipAcquired(), BallController13::releaseOwnership(), BallController1516::releaseOwnership(), BallController1516e::releaseOwnership(), BallController13::resignAndDestroyFederation(), BallController1516::resignAndDestroyFederation(), BallController1516e::resignAndDestroyFederation(), BallController1516::sendUpdates(), BallController13::sendUpdates(), BallController1516e::sendUpdates(), BallController1516e::subscribeInteractionClass(), BallController1516::subscribeToDefaultRegion(), BallController13::subscribeToDefaultRegion(), BallController1516e::subscribeToDefaultRegion(), BallController1516e::subscribeWithRegion(), BallController1516::subscribeWithRegion(), BallController13::subscribeWithRegion(), BallController13::unsubscribeFromDefaultRegion(), BallController1516::unsubscribeFromDefaultRegion(), BallController1516e::unsubscribeFromDefaultRegion(), BallController1516e::unsubscribeInteractionClass(), BallController1516e::unsubscribeWithRegions(), BallController1516::unsubscribeWithRegions(), BallController13::unsubscribeWithRegionsKeepRegionInfo(), and BallController1516e::~BallController1516e().

int BallController::myMaxX [protected]
int BallController::myMaxY [protected]
int BallController::myMinX [protected]
int BallController::myMinY [protected]
unsigned int BallController::myNextBallNumber [protected]

Referenced by addBall().

const double BallController::pi = 3.14159265 [static, protected]

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

Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)