|
Oolite
|
#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 37 of file CollisionRegion.h.
| - (void) addEntity: | (Entity*) | ent |
Definition at line 186 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 99 of file CollisionRegion.m.
References addSubregionAtPosition:withRadius:, nil, positionIsWithinRegion, sphereIsWithinRegion, and subregions.
Referenced by addSubregionAtPosition:withRadius:.
| - (BOOL) checkEntity: | (Entity*) | ent |
Definition at line 205 of file CollisionRegion.m.
References addEntity:, nil, Entity::position, positionIsWithinBorders, Entity::setCollisionRegion:, and subregions.
Referenced by Universe::findCollisionsAndShadows.
| - (void) clearEntityList |
Definition at line 179 of file CollisionRegion.m.
References clearEntityList, isPlayerInRegion, and n_entities.
Referenced by clearEntityList, and Universe::findCollisionsAndShadows.
| - (void) clearSubregions |
Definition at line 93 of file CollisionRegion.m.
References clearSubregions.
Referenced by clearSubregions, Universe::setUpSpace, and Universe::setUpWitchspaceBetweenSystem:andSystem:.
| - (NSString *) collisionDescription |
Definition at line 618 of file CollisionRegion.m.
References collisionDescription.
Referenced by collisionDescription, and Universe::collisionDescription.
|
implementation |
Definition at line 80 of file CollisionRegion.m.
References dealloc, DESTROY, entity_array, and subregions.
Referenced by dealloc.
| - (NSString *) debugOut |
Definition at line 623 of file CollisionRegion.m.
References debugOut, nil, and subregions.
Referenced by debugOut.
|
implementation |
Definition at line 88 of file CollisionRegion.m.
References description.
Referenced by description.
|
implementation |
Definition at line 377 of file CollisionRegion.m.
References Entity::collision_radius, EXPECT_NOT, Entity::position, and shadowAtPointOcclusionToValue().
Referenced by findShadowedEntities, and testEntityOccludedByEntity.
| - (void) findCollisions |
Definition at line 226 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, HPdistance2(), 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 502 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 46 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 61 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 69 of file CollisionRegion.m.
References border_radius, COLLISION_REGION_BORDER_RADIUS, init, location, parentRegion, and radius.
|
implementation |
Definition at line 160 of file CollisionRegion.m.
References border_radius, isUniverse, location, nil, radius, HPVector::x, HPVector::y, and HPVector::z.
Referenced by checkEntity:.
|
implementation |
Definition at line 126 of file CollisionRegion.m.
References isUniverse, location, nil, radius, HPVector::x, HPVector::y, and HPVector::z.
Referenced by addSubregionAtPosition:withRadius:.
|
implementation |
Definition at line 387 of file CollisionRegion.m.
References bounding_box_get_dimensions(), Entity::collision_radius, dot_product(), HPdistance2(), HPvector_subtract(), HPVectorToVector(), Entity::position, ShipEntity::totalBoundingBox, vector_normal_or_xbasis(), and vector_normal_or_zbasis().
|
implementation |
Definition at line 143 of file CollisionRegion.m.
References isUniverse, location, nil, radius, HPVector::x, HPVector::y, and HPVector::z.
Referenced by addSubregionAtPosition:withRadius:.
|
implementation |
Definition at line 496 of file CollisionRegion.m.
References entityByEntityOcclusionToValue.
Referenced by findShadowedEntities.
|
private |
Definition at line 44 of file CollisionRegion.h.
Referenced by initAtLocation:withRadius:withinRegion:, and positionIsWithinBorders.
|
private |
Definition at line 46 of file CollisionRegion.h.
Referenced by findCollisions.
|
private |
Definition at line 47 of file CollisionRegion.h.
Referenced by findCollisions.
|
private |
Definition at line 41 of file CollisionRegion.h.
Referenced by init.
|
private |
Definition at line 53 of file CollisionRegion.h.
Referenced by addEntity:, dealloc, findCollisions, findShadowedEntities, and init.
|
private |
Definition at line 51 of file CollisionRegion.h.
Referenced by addEntity:, and clearEntityList.
|
private |
Definition at line 39 of file CollisionRegion.h.
Referenced by initAsUniverse, positionIsWithinBorders, positionIsWithinRegion, and sphereIsWithinRegion.
|
private |
Definition at line 42 of file CollisionRegion.h.
Referenced by initAtLocation:withRadius:withinRegion:, positionIsWithinBorders, positionIsWithinRegion, and sphereIsWithinRegion.
|
private |
Definition at line 55 of file CollisionRegion.h.
Referenced by addEntity:, and init.
|
private |
Definition at line 54 of file CollisionRegion.h.
Referenced by addEntity:, clearEntityList, findCollisions, and findShadowedEntities.
|
private |
Definition at line 57 of file CollisionRegion.h.
Referenced by initAtLocation:withRadius:withinRegion:.
|
private |
Definition at line 43 of file CollisionRegion.h.
Referenced by initAtLocation:withRadius:withinRegion:, positionIsWithinBorders, positionIsWithinRegion, and sphereIsWithinRegion.
|
private |
Definition at line 49 of file CollisionRegion.h.
Referenced by addSubregionAtPosition:withRadius:, checkEntity:, dealloc, and debugOut.