![]() |
Oolite 1.91.0.7658-250404-b1488af
|
#include <CollisionRegion.h>
Instance Methods | |
(id) | - initAsUniverse |
(id) | - initAtLocation:withRadius:withinRegion: |
(void) | - clearSubregions |
(void) | - addSubregionAtPosition:withRadius: |
(void) | - clearEntityList |
(void) | - addEntity: |
(BOOL) | - checkEntity: |
(void) | - findCollisions |
(void) | - findShadowedEntities |
(NSString *) | - collisionDescription |
(NSString *) | - debugOut |
(id) | - init [implementation] |
(void) | - dealloc [implementation] |
(NSString *) | - description [implementation] |
(BOOL) | - shadowAtPointOcclusionToValue [implementation] |
Class Methods | |
(static BOOL) | + positionIsWithinRegion [implementation] |
(static BOOL) | + sphereIsWithinRegion [implementation] |
(static BOOL) | + positionIsWithinBorders [implementation] |
(static BOOL) | + entityByEntityOcclusionToValue [implementation] |
(static BOOL) | + testEntityOccludedByEntity [implementation] |
Private Attributes | |
BOOL | isUniverse |
int | crid |
HPVector | location |
GLfloat | radius |
GLfloat | border_radius |
unsigned | checks_this_tick |
unsigned | checks_within_range |
NSMutableArray * | subregions |
BOOL | isPlayerInRegion |
Entity ** | entity_array |
unsigned | n_entities |
unsigned | max_entities |
CollisionRegion * | parentRegion |
Definition at line 39 of file CollisionRegion.h.
- (void) addEntity: | (Entity *) | ent |
Definition at line 209 of file CollisionRegion.m.
References entity_array, isPlayerInRegion, max_entities, and n_entities.
Referenced by checkEntity:.
- (void) addSubregionAtPosition: | (HPVector) | pos | |
withRadius: | (GLfloat) | rad |
Definition at line 112 of file CollisionRegion.m.
References addSubregionAtPosition:withRadius:, nil, positionIsWithinRegion, sphereIsWithinRegion, and subregions.
Referenced by addSubregionAtPosition:withRadius:.
- (BOOL) checkEntity: | (Entity *) | ent |
Definition at line 230 of file CollisionRegion.m.
References addEntity:, nil, Entity::position, positionIsWithinBorders, Entity::setCollisionRegion:, and subregions.
Referenced by Universe::findCollisionsAndShadows.
- (void) clearEntityList |
Definition at line 201 of file CollisionRegion.m.
References clearEntityList, isPlayerInRegion, and n_entities.
Referenced by clearEntityList, and Universe::findCollisionsAndShadows.
- (void) clearSubregions |
Definition at line 105 of file CollisionRegion.m.
References clearSubregions.
Referenced by clearSubregions, Universe::setUpSpace, and Universe::setUpWitchspaceBetweenSystem:andSystem:.
- (NSString *) collisionDescription |
Definition at line 720 of file CollisionRegion.m.
References collisionDescription.
Referenced by collisionDescription, and Universe::collisionDescription.
|
implementation |
Definition at line 90 of file CollisionRegion.m.
References dealloc, DESTROY, entity_array, and subregions.
Referenced by dealloc.
- (NSString *) debugOut |
Definition at line 726 of file CollisionRegion.m.
References debugOut, nil, and subregions.
Referenced by debugOut.
|
implementation |
Definition at line 99 of file CollisionRegion.m.
References description.
Referenced by description.
|
implementation |
Definition at line 447 of file CollisionRegion.m.
References Entity::collision_radius, EXPECT_NOT, Entity::position, and shadowAtPointOcclusionToValue().
Referenced by findShadowedEntities, and testEntityOccludedByEntity.
- (void) findCollisions |
Definition at line 255 of file CollisionRegion.m.
References Entity::checkCloseCollisionWith:, ShipEntity::checkCloseCollisionWith:, checks_this_tick, checks_within_range, Entity::collider, Entity::collision_chain, Entity::collision_radius, Entity::collisionArray, Entity::collisionTestFilter, DEBUG_COLLISIONS, entity_array, findCollisions, gDebugFlags, Entity::hasCollided, Entity::isShip, Entity::isStation, n_entities, nil, OOLog, Entity::position, PROXIMITY_WARN_DISTANCE2, ShipEntity::setProximityAlert:, and StationEntity::shipIsInDockingCorridor:.
Referenced by findCollisions, and Universe::findCollisionsAndShadows.
- (void) findShadowedEntities |
Definition at line 583 of file CollisionRegion.m.
References entity_array, entityByEntityOcclusionToValue, findShadowedEntities, Entity::hasMoved, Entity::isSunlit, MINIMUM_SHADOWING_ENTITY_RADIUS, n_entities, nil, NO_TARGET, PlayerEntity::setOcclusionLevel:, Entity::shadingEntityID, testEntityOccludedByEntity, Entity::universalID, and UNIVERSE.
Referenced by Universe::findCollisionsAndShadows, and findShadowedEntities.
|
implementation |
Definition at line 49 of file CollisionRegion.m.
References COLLISION_MAX_ENTITIES, crid, crid_counter, entity_array, init, max_entities, and nil.
Referenced by init, initAsUniverse, and initAtLocation:withRadius:withinRegion:.
- (id) initAsUniverse |
Definition at line 67 of file CollisionRegion.m.
References init, initAsUniverse, and isUniverse.
Referenced by initAsUniverse.
- (id) initAtLocation: | (HPVector) | locn | |
withRadius: | (GLfloat) | rad | |
withinRegion: | (CollisionRegion*) | otherRegion |
Definition at line 77 of file CollisionRegion.m.
References border_radius, COLLISION_REGION_BORDER_RADIUS, init, location, parentRegion, and radius.
|
implementation |
Definition at line 180 of file CollisionRegion.m.
References border_radius, isUniverse, location, nil, and radius.
Referenced by checkEntity:.
|
implementation |
Definition at line 142 of file CollisionRegion.m.
References isUniverse, location, nil, and radius.
Referenced by addSubregionAtPosition:withRadius:.
|
implementation |
Definition at line 458 of file CollisionRegion.m.
References Entity::collision_radius, Entity::position, and ShipEntity::totalBoundingBox.
|
implementation |
Definition at line 161 of file CollisionRegion.m.
References isUniverse, location, nil, and radius.
Referenced by addSubregionAtPosition:withRadius:.
|
implementation |
Definition at line 576 of file CollisionRegion.m.
References entityByEntityOcclusionToValue.
Referenced by findShadowedEntities.
|
private |
Definition at line 47 of file CollisionRegion.h.
Referenced by initAtLocation:withRadius:withinRegion:, and positionIsWithinBorders.
|
private |
Definition at line 49 of file CollisionRegion.h.
Referenced by findCollisions.
|
private |
Definition at line 50 of file CollisionRegion.h.
Referenced by findCollisions.
|
private |
Definition at line 44 of file CollisionRegion.h.
Referenced by init.
|
private |
Definition at line 56 of file CollisionRegion.h.
Referenced by addEntity:, dealloc, findCollisions, findShadowedEntities, and init.
|
private |
Definition at line 54 of file CollisionRegion.h.
Referenced by addEntity:, and clearEntityList.
|
private |
Definition at line 42 of file CollisionRegion.h.
Referenced by initAsUniverse, positionIsWithinBorders, positionIsWithinRegion, and sphereIsWithinRegion.
|
private |
Definition at line 45 of file CollisionRegion.h.
Referenced by initAtLocation:withRadius:withinRegion:, positionIsWithinBorders, positionIsWithinRegion, and sphereIsWithinRegion.
|
private |
Definition at line 58 of file CollisionRegion.h.
Referenced by addEntity:, and init.
|
private |
Definition at line 57 of file CollisionRegion.h.
Referenced by addEntity:, clearEntityList, findCollisions, and findShadowedEntities.
|
private |
Definition at line 60 of file CollisionRegion.h.
Referenced by initAtLocation:withRadius:withinRegion:.
|
private |
Definition at line 46 of file CollisionRegion.h.
Referenced by initAtLocation:withRadius:withinRegion:, positionIsWithinBorders, positionIsWithinRegion, and sphereIsWithinRegion.
|
private |
Definition at line 52 of file CollisionRegion.h.
Referenced by addSubregionAtPosition:withRadius:, checkEntity:, dealloc, and debugOut.