Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
PartitionData Class Reference

#include <PartitionManager.h>

Inherits MemoryPoolObject.

Public Member Functions

 PartitionData ()
 
void attachToObject (Object *object)
 
void detachFromObject (void)
 
void attachToGhostObject (GhostObject *object)
 
void detachFromGhostObject (void)
 
void setNext (PartitionData *next)
 set next pointer
 
PartitionDatagetNext (void)
 get the next pointer
 
void setPrev (PartitionData *prev)
 set the prev pointer
 
PartitionDatagetPrev (void)
 get the prev pointer
 
void makeDirty (Bool needToUpdateCells)
 mark the given module as being "dirty", needing recalcing during next update phase.
 
Bool isInNeedOfUpdatingCells () const
 
Bool isInNeedOfCollisionCheck () const
 
void invalidateShroudedStatusForPlayer (Int playerIndex)
 
void invalidateShroudedStatusForAllPlayers ()
 
ObjectShroudStatus getShroudedStatus (Int playerIndex)
 
Int wasSeenByAnyPlayers () const
 <check if a player in the game has seen the object but is now looking at fogged version.
 
Int getControllingPlayerIndex () const
 
void addPossibleCollisions (PartitionContactList *ctList)
 
ObjectgetObject ()
 return the Object that owns this module
 
const ObjectgetObject () const
 return the Object that owns this module
 
void friend_setObject (Object *object)
 to be used only by the partition manager.
 
GhostObjectgetGhostObject () const
 return the ghost object that serves as fogged memory of object.
 
void friend_setGhostObject (GhostObject *object)
 used by ghost object manager to free link to partition data.
 
void friend_setShroudednessPrevious (Int playerIndex, ObjectShroudStatus status)
 only used to restore state after map border resizing and/or xfer!
 
ObjectShroudStatus friend_getShroudednessPrevious (Int playerIndex)
 
void friend_removeAllTouchedCells ()
 this is only for use by PartitionManager
 
void friend_updateCellsTouched ()
 this is only for use by PartitionManager
 
Int friend_getCoiInUseCount ()
 this is only for use by PartitionManager
 
Bool friend_collidesWith (const PartitionData *that, CollideLocAndNormal *cinfo) const
 this is only for use by PartitionContactList
 
Int friend_getDoneFlag ()
 
void friend_setDoneFlag (Int i)
 
Bool isInListDirtyModules (PartitionData *const *pListHead) const
 
void prependToDirtyModules (PartitionData **pListHead)
 
void removeFromDirtyModules (PartitionData **pListHead)
 
- Public Member Functions inherited from MemoryPoolObject
void deleteInstance ()
 

Additional Inherited Members

- Protected Member Functions inherited from MemoryPoolObject
virtual ~MemoryPoolObject ()
 
void * operator new (size_t s)
 
void operator delete (void *p)
 
virtual MemoryPoolgetObjectMemoryPool ()=0
 

Detailed Description

A PartitionData is the part of an Object that understands how to maintain the Object in the space partitioning system.

Definition at line 374 of file PartitionManager.h.

Constructor & Destructor Documentation

◆ PartitionData()

PartitionData::PartitionData ( )

Definition at line 1543 of file PartitionManager.cpp.

Member Function Documentation

◆ addPossibleCollisions()

void PartitionData::addPossibleCollisions ( PartitionContactList * ctList)

enumerate the objects that share space with 'this' (ie, the objects in the same Partition Cells) and add 'em to the given contact list. also, if self is intersecting the ground, add it to the list as a possible collide-with-ground.

Definition at line 1922 of file PartitionManager.cpp.

◆ attachToGhostObject()

void PartitionData::attachToGhostObject ( GhostObject * object)

Definition at line 2299 of file PartitionManager.cpp.

◆ attachToObject()

void PartitionData::attachToObject ( Object * object)

Definition at line 2236 of file PartitionManager.cpp.

◆ detachFromGhostObject()

void PartitionData::detachFromGhostObject ( void )

Definition at line 2321 of file PartitionManager.cpp.

◆ detachFromObject()

void PartitionData::detachFromObject ( void )

Definition at line 2273 of file PartitionManager.cpp.

◆ friend_collidesWith()

Bool PartitionData::friend_collidesWith ( const PartitionData * that,
CollideLocAndNormal * cinfo ) const
inline

this is only for use by PartitionContactList

Definition at line 549 of file PartitionManager.h.

◆ friend_getCoiInUseCount()

Int PartitionData::friend_getCoiInUseCount ( )
inline

this is only for use by PartitionManager

Definition at line 548 of file PartitionManager.h.

◆ friend_getDoneFlag()

Int PartitionData::friend_getDoneFlag ( )
inline

Definition at line 553 of file PartitionManager.h.

◆ friend_getShroudednessPrevious()

ObjectShroudStatus PartitionData::friend_getShroudednessPrevious ( Int playerIndex)
inline

Definition at line 544 of file PartitionManager.h.

◆ friend_removeAllTouchedCells()

void PartitionData::friend_removeAllTouchedCells ( )
inline

this is only for use by PartitionManager

Definition at line 546 of file PartitionManager.h.

◆ friend_setDoneFlag()

void PartitionData::friend_setDoneFlag ( Int i)
inline

Definition at line 554 of file PartitionManager.h.

◆ friend_setGhostObject()

void PartitionData::friend_setGhostObject ( GhostObject * object)
inline

used by ghost object manager to free link to partition data.

Definition at line 542 of file PartitionManager.h.

◆ friend_setObject()

void PartitionData::friend_setObject ( Object * object)
inline

to be used only by the partition manager.

Definition at line 540 of file PartitionManager.h.

◆ friend_setShroudednessPrevious()

void PartitionData::friend_setShroudednessPrevious ( Int playerIndex,
ObjectShroudStatus status )

only used to restore state after map border resizing and/or xfer!

Definition at line 1599 of file PartitionManager.cpp.

◆ friend_updateCellsTouched()

void PartitionData::friend_updateCellsTouched ( )
inline

this is only for use by PartitionManager

Definition at line 547 of file PartitionManager.h.

◆ getControllingPlayerIndex()

Int PartitionData::getControllingPlayerIndex ( ) const

Definition at line 1582 of file PartitionManager.cpp.

◆ getGhostObject()

GhostObject * PartitionData::getGhostObject ( ) const
inline

return the ghost object that serves as fogged memory of object.

Definition at line 541 of file PartitionManager.h.

◆ getNext()

PartitionData * PartitionData::getNext ( void )
inline

get the next pointer

Definition at line 501 of file PartitionManager.h.

◆ getObject() [1/2]

Object * PartitionData::getObject ( )
inline

return the Object that owns this module

Definition at line 538 of file PartitionManager.h.

◆ getObject() [2/2]

const Object * PartitionData::getObject ( ) const
inline

return the Object that owns this module

Definition at line 539 of file PartitionManager.h.

◆ getPrev()

PartitionData * PartitionData::getPrev ( void )
inline

get the prev pointer

Definition at line 503 of file PartitionManager.h.

◆ getShroudedStatus()

ObjectShroudStatus PartitionData::getShroudedStatus ( Int playerIndex)

Definition at line 1614 of file PartitionManager.cpp.

◆ invalidateShroudedStatusForAllPlayers()

void PartitionData::invalidateShroudedStatusForAllPlayers ( )

Definition at line 2125 of file PartitionManager.cpp.

◆ invalidateShroudedStatusForPlayer()

void PartitionData::invalidateShroudedStatusForPlayer ( Int playerIndex)

Definition at line 2116 of file PartitionManager.cpp.

◆ isInListDirtyModules()

Bool PartitionData::isInListDirtyModules ( PartitionData *const * pListHead) const
inline

Definition at line 556 of file PartitionManager.h.

◆ isInNeedOfCollisionCheck()

Bool PartitionData::isInNeedOfCollisionCheck ( ) const
inline

Definition at line 511 of file PartitionManager.h.

◆ isInNeedOfUpdatingCells()

Bool PartitionData::isInNeedOfUpdatingCells ( ) const
inline

Definition at line 510 of file PartitionManager.h.

◆ makeDirty()

void PartitionData::makeDirty ( Bool needToUpdateCells)

mark the given module as being "dirty", needing recalcing during next update phase.

Definition at line 2195 of file PartitionManager.cpp.

◆ prependToDirtyModules()

void PartitionData::prependToDirtyModules ( PartitionData ** pListHead)
inline

Definition at line 562 of file PartitionManager.h.

◆ removeFromDirtyModules()

void PartitionData::removeFromDirtyModules ( PartitionData ** pListHead)
inline

Definition at line 570 of file PartitionManager.h.

◆ setNext()

void PartitionData::setNext ( PartitionData * next)
inline

set next pointer

Definition at line 500 of file PartitionManager.h.

◆ setPrev()

void PartitionData::setPrev ( PartitionData * prev)
inline

set the prev pointer

Definition at line 502 of file PartitionManager.h.

◆ wasSeenByAnyPlayers()

Int PartitionData::wasSeenByAnyPlayers ( ) const
inline

<check if a player in the game has seen the object but is now looking at fogged version.

Definition at line 518 of file PartitionManager.h.


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