![]() |
Oolite 1.91.0.7650-250121-affa790
|
#include <PlanetEntity.h>
Class Methods | |
(static unsigned) | + baseVertexIndexForEdge [implementation] |
Private Attributes | |
OOStellarBodyType | planet_type |
uint8_t | lastSubdivideLevel |
BOOL | useTexturedModel |
BOOL | isTextureImage |
NSString * | _textureFileName |
OOTexture * | _texture |
int | planet_seed |
double | polar_color_factor |
double | rotational_velocity |
GLfloat | amb_land [4] |
GLfloat | amb_polar_land [4] |
GLfloat | amb_sea [4] |
GLfloat | amb_polar_sea [4] |
PlanetEntity * | atmosphere |
PlanetEntity * | root_planet |
int | shuttles_on_ground |
double | last_launch_time |
double | shuttle_launch_interval |
double | sqrt_zero_distance |
GLuint | displayListNames [MAX_SUBDIVIDE] |
GLuint | vertexCount |
VertexData | vertexdata |
Vector | rotationAxis |
Definition at line 55 of file PlanetEntity.h.
|
implementation |
Reimplemented from Entity.
Definition at line 1612 of file PlanetEntity.m.
References _texture, allTextures, and nil.
Referenced by allTextures.
- (GLfloat *) amb_land |
References amb_polar_land.
- (GLfloat *) amb_polar_land |
References amb_sea.
- (GLfloat *) amb_polar_sea |
References atmosphere, drawUnconditionally, hasAtmosphere, launchShuttle, PlanetEntity, planetType, radius, and rotationalVelocity.
- (GLfloat *) amb_sea |
References amb_polar_sea.
- (PlanetEntity *) atmosphere |
|
implementation |
Definition at line 1317 of file PlanetEntity.m.
References base_vertex_array, next_free_vertex, sEdgeToVertex, and texture_uv_array.
|
implementation |
Reimplemented from Entity.
Definition at line 615 of file PlanetEntity.m.
References canCollide, planet_type, STELLAR_TYPE_ATMOSPHERE, STELLAR_TYPE_MINIATURE, STELLAR_TYPE_MOON, STELLAR_TYPE_NORMAL_PLANET, and STELLAR_TYPE_SUN.
Referenced by canCollide.
|
implementation |
Reimplemented from Entity.
Definition at line 633 of file PlanetEntity.m.
References DEBUG_COLLISIONS, gDebugFlags, Entity::isShip, <OOStellarBody>::name, OOLog, Entity::position, and Entity::universalID.
|
implementation |
Provided by category PlanetEntity(OOPrivate).
Definition at line 1585 of file PlanetEntity.m.
References fillRanNoiseBuffer(), kOOPixMapRGBA, nil, OOMakePixMap(), and OOTexture::textureWithGenerator:.
Referenced by PlanetEntity(OOPrivate)::initAsAtmosphereForPlanet:dictionary:.
|
implementation |
Reimplemented from Entity.
Definition at line 580 of file PlanetEntity.m.
References _texture, _textureFileName, atmosphere, Entity::dealloc, dealloc, deleteDisplayLists, DESTROY, OOGraphicsResetManager::sharedManager, and OOGraphicsResetManager::unregisterClient:.
Referenced by dealloc.
|
implementation |
Provided by category PlanetEntity(OOPrivate).
Definition at line 1503 of file PlanetEntity.m.
References PlanetEntity(OOPrivate)::deleteDisplayLists, and MAX_SUBDIVIDE.
Referenced by dealloc, PlanetEntity(OOPrivate)::deleteDisplayLists, PlanetEntity(OOPrivate)::initMiniatureFromPlanet:withAlpha:, resetGraphicsState, and setUpPlanetFromTexture:.
|
implementation |
Reimplemented from Entity.
Definition at line 594 of file PlanetEntity.m.
References descriptionComponents, planet_type, Entity::position, radius, STELLAR_TYPE_ATMOSPHERE, STELLAR_TYPE_MINIATURE, STELLAR_TYPE_MOON, STELLAR_TYPE_NORMAL_PLANET, and Entity::universalID.
Referenced by descriptionComponents.
|
implementation |
Reimplemented from Entity.
Definition at line 763 of file PlanetEntity.m.
References ATMOSPHERE_DEPTH, Entity::cam_zero_distance, Entity::cameraRelativePosition, drawUnconditionally, radius, and UNIVERSE.
Referenced by drawUnconditionally.
|
implementation |
Provided by category PlanetEntity(OOPrivate).
Definition at line 1163 of file PlanetEntity.m.
References n_triangles, OOGL, and triangle_start.
Referenced by drawUnconditionally.
- (void) drawUnconditionally |
Definition at line 783 of file PlanetEntity.m.
References _texture, OOTexture::apply, OOTexture::applyNone, atmosphere, Entity::cam_zero_distance, Entity::cameraRelativePosition, Entity::collision_radius, displayListNames, drawImmediate:translucent:, drawModelWithVertexArraysAndSubdivision:, drawUnconditionally, OOTexture::ensureFinishedLoading, lastSubdivideLevel, nil, OOCheckOpenGLErrors(), OOGL, OOGLPopModelView(), OOGLPushModelView(), OOGLTranslateModelView(), OOGLWireframeModeOff(), OOGLWireframeModeOn(), OOSetOpenGLState, OOVerifyOpenGLState, OPENGL_STATE_OPAQUE, planet_type, root_planet, Entity::rotMatrix, sqrt_zero_distance, STELLAR_TYPE_ATMOSPHERE, STELLAR_TYPE_MINIATURE, STELLAR_TYPE_MOON, STELLAR_TYPE_NORMAL_PLANET, STELLAR_TYPE_SUN, UNIVERSE, and vertexdata.
Referenced by amb_polar_sea, drawImmediate:translucent:, and drawUnconditionally.
- (BOOL) hasAtmosphere |
Definition at line 1157 of file PlanetEntity.m.
References atmosphere, hasAtmosphere, and nil.
Referenced by amb_polar_sea, hasAtmosphere, and setUpPlanetFromTexture:.
|
implementation |
Reimplemented from Entity.
Definition at line 192 of file PlanetEntity.m.
Referenced by init.
|
implementation |
Provided by category PlanetEntity(OOPrivate).
Definition at line 200 of file PlanetEntity.m.
References ATMOSPHERE_DEPTH, CLEAR_SKY_ALPHA, CLOUD_ALPHA, cloudTextureWithCloudColor:cloudImpress:cloudBias:, Entity::collision_radius, OOColor::colorWithDescription:, OOColor::colorWithRed:green:blue:alpha:, currentRandomSeed(), gen_rnd_number(), OOColor::getRed:green:blue:alpha:, Entity::init, initialiseBaseTerrainArray:, initialiseBaseVertexArray, next_free_vertex, nil, OOLogERR, Entity::orientation, PLANET_MINIATURE_FACTOR, planet_type, PlanetEntity, POLAR_CLEAR_SKY_ALPHA, POLAR_CLOUD_ALPHA, Entity::position, ranrot_rand, RANROTGetFullSeed(), RANROTSetFullSeed(), OOGraphicsResetManager::registerClient:, rotationalVelocity, scaleVertices, Entity::setOwner:, setRandomSeed(), setUseTexturedModel:, OOGraphicsResetManager::sharedManager, STELLAR_TYPE_ATMOSPHERE, STELLAR_TYPE_MINIATURE, STELLAR_TYPE_NORMAL_PLANET, and vector_up_from_quaternion().
- (id) initFromDictionary: | (NSDictionary*) | dict | |
withAtmosphere: | (BOOL) | atmo | |
andSeed: | (Random_Seed) | p_seed |
Definition at line 378 of file PlanetEntity.m.
References _texture, Random_Seed::a, amb_land, amb_polar_land, amb_polar_sea, amb_sea, atmosphere, OOColor::blueComponent, Random_Seed::c, Entity::collision_radius, OOColor::colorWithHue:saturation:brightness:alpha:, currentRandomSeed(), Random_Seed::e, Entity::energy, gen_rnd_number(), OOColor::greenComponent, Entity::init, initialiseBaseTerrainArray:, initialiseBaseVertexArray, is_nil_seed(), isTextureImage, last_launch_time, loadTexture:, M_SQRT1_2, next_free_vertex, nil, OOLogERR, Entity::orientation, planet_seed, planet_type, planetTextureWithInfo:, PLAYER, polar_color_factor, quaternion_rotate_about_axis(), RandomSeedFromString(), RANROTGetFullSeed(), RANROTSetFullSeed(), OOColor::redComponent, OOGraphicsResetManager::registerClient:, OOTexture::retain, root_planet, rotational_velocity, rotationAxis, scaleVertices, Entity::scanClass, ScanVectorFromString(), seed_for_planet_description(), setRandomSeed(), Entity::setStatus:, setTextureColorForPlanet:inSystem:, setUseTexturedModel:, OOGraphicsResetManager::sharedManager, shuttle_launch_interval, shuttles_on_ground, STELLAR_TYPE_MOON, STELLAR_TYPE_NORMAL_PLANET, texture, vector_up_from_quaternion(), and vertexCount.
|
implementation |
Provided by category PlanetEntity(OOPrivate).
Definition at line 1364 of file PlanetEntity.m.
References base_terrain_array, base_vertex_array, baseVertexIndexForEdge(), gen_rnd_number(), isTextured, MAX_SUBDIVIDE, n_triangles, ranrot_rand, ranrot_srand(), RANROTGetFullSeed(), RANROTSetFullSeed(), and vertex_index_array.
Referenced by PlanetEntity(OOPrivate)::initAsAtmosphereForPlanet:dictionary:, initFromDictionary:withAtmosphere:andSeed:, and setUpPlanetFromTexture:.
|
implementation |
Provided by category PlanetEntity(OOPrivate).
Definition at line 1211 of file PlanetEntity.m.
References base_vertex_array, baseVertexIndexForEdge(), PlanetEntity(OOPrivate)::initialiseBaseVertexArray, isTextured, kTexturedFaces, kTexturedVertices, kUntexturedFaces, kUntexturedVertices, MAX_SUBDIVIDE, MAX_TRI_INDICES, n_triangles, next_free_vertex, sEdgeToVertex, texture_uv_array, triangle_start, and vertex_index_array.
Referenced by PlanetEntity(OOPrivate)::initAsAtmosphereForPlanet:dictionary:, initFromDictionary:withAtmosphere:andSeed:, PlanetEntity(OOPrivate)::initialiseBaseVertexArray, and setUpPlanetFromTexture:.
|
implementation |
Provided by category PlanetEntity(OOPrivate).
- (BOOL) isExplicitlyTextured |
Definition at line 1523 of file PlanetEntity.m.
References isExplicitlyTextured, and isTextureImage.
Referenced by isExplicitlyTextured, and planet_seed.
|
implementation |
Reimplemented from Entity.
Definition at line 1620 of file PlanetEntity.m.
References isPlanet.
Referenced by isPlanet.
- (BOOL) isTextured |
Definition at line 1007 of file PlanetEntity.m.
References _texture, isTextured, and nil.
Referenced by PlanetEntity(OOPrivate)::initialiseBaseTerrainArray:, PlanetEntity(OOPrivate)::initialiseBaseVertexArray, isTextured, planet_seed, and setUpPlanetFromTexture:.
|
implementation |
Reimplemented from Entity.
Definition at line 1626 of file PlanetEntity.m.
References isVisible.
Referenced by isVisible.
- (void) launchShuttle |
Definition at line 1169 of file PlanetEntity.m.
References Entity::collision_radius, launchShuttle, Entity::position, quaternion_set_random(), ShipEntity::setCargoFlag:, Entity::setOrientation:, Entity::setPosition:, Entity::setScanClass:, ShipEntity::setSingleCrewWithRole:, ShipEntity::switchAITo:, and vector_forward_from_quaternion().
Referenced by amb_polar_sea, launchShuttle, and update:.
|
implementation |
Provided by category PlanetEntity(OOPrivate).
Definition at line 1535 of file PlanetEntity.m.
References nil, and OOTexture::textureWithConfiguration:extraOptions:.
Referenced by initFromDictionary:withAtmosphere:andSeed:, and setUpPlanetFromTexture:.
- (void) miniaturize |
Definition at line 359 of file PlanetEntity.m.
References atmosphere, ATMOSPHERE_DEPTH, Entity::collision_radius, Entity::collisionRadius, kBasisYVector, last_launch_time, miniaturize, nil, PLANET_MINIATURE_FACTOR, planet_type, rotational_velocity, rotationAxis, scaleVertices, Entity::setStatus:, shuttle_launch_interval, shuttles_on_ground, and STELLAR_TYPE_MINIATURE.
Referenced by miniaturize.
|
implementation |
Provided by category PlanetEntity(OOPrivate).
Definition at line 1438 of file PlanetEntity.m.
References base_terrain_array, base_vertex_array, nil, ranrot_rand, ranrot_srand(), RANROTGetFullSeed(), RANROTSetFullSeed(), and STELLAR_TYPE_ATMOSPHERE.
- (int) planet_seed |
References isExplicitlyTextured, isTextured, polar_color_factor, texture, and textureFileName.
|
implementation |
Provided by category PlanetEntity(OOPrivate).
Definition at line 1561 of file PlanetEntity.m.
References fillRanNoiseBuffer(), kOOPixMapRGBA, nil, OOMakePixMap(), and OOTexture::textureWithGenerator:.
Referenced by initFromDictionary:withAtmosphere:andSeed:.
- (OOStellarBodyType) planetType |
Reimplemented from <OOStellarBody>.
Definition at line 1113 of file PlanetEntity.m.
References planet_type, and planetType.
Referenced by amb_polar_sea, and planetType.
- (double) polar_color_factor |
References amb_land.
- (double) radius |
Reimplemented from <OOStellarBody>.
Definition at line 1125 of file PlanetEntity.m.
References Entity::collision_radius, and radius.
Referenced by amb_polar_sea, descriptionComponents, drawImmediate:translucent:, and radius.
|
implementation |
Definition at line 1517 of file PlanetEntity.m.
References deleteDisplayLists, and resetGraphicsState.
Referenced by resetGraphicsState.
- (double) rotationalVelocity |
Definition at line 1136 of file PlanetEntity.m.
References rotational_velocity, and rotationalVelocity.
Referenced by amb_polar_sea, PlanetEntity(OOPrivate)::initAsAtmosphereForPlanet:dictionary:, rotationalVelocity, and setRotationalVelocity:.
|
implementation |
Provided by category PlanetEntity(OOPrivate).
Definition at line 1488 of file PlanetEntity.m.
References base_vertex_array, next_free_vertex, PlanetEntity(OOPrivate)::scaleVertices, and texture_uv_array.
Referenced by PlanetEntity(OOPrivate)::initAsAtmosphereForPlanet:dictionary:, initFromDictionary:withAtmosphere:andSeed:, miniaturize, PlanetEntity(OOPrivate)::scaleVertices, and setUpPlanetFromTexture:.
|
implementation |
Reimplemented from Entity.
Definition at line 739 of file PlanetEntity.m.
References atmosphere, rotationAxis, Entity::setOrientation:, setOrientation:, and vector_up_from_quaternion().
Referenced by setOrientation:.
- (void) setPlanetType: | (OOStellarBodyType) | pt |
Definition at line 1119 of file PlanetEntity.m.
References planet_type.
|
implementation |
Reimplemented from Entity.
Definition at line 732 of file PlanetEntity.m.
References Entity::position, and setPosition:.
Referenced by setPosition:.
- (void) setRadius: | (GLfloat) | rad |
Definition at line 1131 of file PlanetEntity.m.
References Entity::collision_radius.
- (void) setRotationalVelocity: | (double) | v |
Definition at line 1141 of file PlanetEntity.m.
References atmosphere, rotational_velocity, rotationalVelocity, and setRotationalVelocity:.
Referenced by setRotationalVelocity:.
|
implementation |
Provided by category PlanetEntity(OOPrivate).
Definition at line 1019 of file PlanetEntity.m.
References OOColor::blueComponent, OOColor::colorWithHue:saturation:brightness:alpha:, OOColor::greenComponent, PLAYER, OOColor::redComponent, ScanVectorFromString(), and UNIVERSE.
Referenced by initFromDictionary:withAtmosphere:andSeed:, and setUpPlanetFromTexture:.
- (BOOL) setUpPlanetFromTexture: | (NSString *) | fileName |
Definition at line 1044 of file PlanetEntity.m.
References amb_sea, atmosphere, CLOUD_ALPHA, deleteDisplayLists, hasAtmosphere, initialiseBaseTerrainArray:, initialiseBaseVertexArray, isTextured, loadTexture:, next_free_vertex, nil, scaleVertices, setTextureColorForPlanet:inSystem:, and setUseTexturedModel:.
|
implementation |
Provided by category PlanetEntity(OOPrivate).
Definition at line 747 of file PlanetEntity.m.
References kTexturedVertices, and kUntexturedVertices.
Referenced by PlanetEntity(OOPrivate)::initAsAtmosphereForPlanet:dictionary:, initFromDictionary:withAtmosphere:andSeed:, and setUpPlanetFromTexture:.
|
implementation |
Provided by category PlanetEntity(OOPrivate).
Definition at line 1151 of file PlanetEntity.m.
References PlanetEntity(OOPrivate)::sqrtZeroDistance.
Referenced by PlanetEntity(OOPrivate)::sqrtZeroDistance.
- (OOTexture *) texture |
Definition at line 1529 of file PlanetEntity.m.
References _texture, and texture.
Referenced by initFromDictionary:withAtmosphere:andSeed:, planet_seed, and texture.
- (NSString *) textureFileName |
Definition at line 1013 of file PlanetEntity.m.
References _textureFileName, and textureFileName.
Referenced by planet_seed, and textureFileName.
|
implementation |
Reimplemented from Entity.
Definition at line 662 of file PlanetEntity.m.
References atmosphere, Entity::cam_zero_distance, Entity::collision_radius, last_launch_time, launchShuttle, Entity::orientation, Entity::orientationChanged, planet_type, quaternion_rotate_about_axis(), rotational_velocity, rotationAxis, shuttle_launch_interval, shuttles_on_ground, sqrt_zero_distance, STELLAR_TYPE_ATMOSPHERE, STELLAR_TYPE_MINIATURE, STELLAR_TYPE_MOON, STELLAR_TYPE_NORMAL_PLANET, STELLAR_TYPE_SUN, Entity::update:, and update:.
Referenced by update:.
- (void) welcomeShuttle: | (ShipEntity *) | shuttle |
Definition at line 1205 of file PlanetEntity.m.
References shuttles_on_ground.
|
private |
Definition at line 65 of file PlanetEntity.h.
Referenced by allTextures, dealloc, drawUnconditionally, initFromDictionary:withAtmosphere:andSeed:, isTextured, and texture.
|
private |
Definition at line 64 of file PlanetEntity.h.
Referenced by dealloc, and textureFileName.
|
private |
Definition at line 1089 of file PlanetEntity.m.
Referenced by initFromDictionary:withAtmosphere:andSeed:, and polar_color_factor.
|
private |
Definition at line 1095 of file PlanetEntity.m.
Referenced by amb_land, and initFromDictionary:withAtmosphere:andSeed:.
|
private |
Definition at line 1107 of file PlanetEntity.m.
Referenced by amb_sea, and initFromDictionary:withAtmosphere:andSeed:.
|
private |
Definition at line 1101 of file PlanetEntity.m.
Referenced by amb_polar_land, initFromDictionary:withAtmosphere:andSeed:, and setUpPlanetFromTexture:.
|
private |
Definition at line 994 of file PlanetEntity.m.
Referenced by amb_polar_sea, dealloc, drawUnconditionally, hasAtmosphere, initFromDictionary:withAtmosphere:andSeed:, miniaturize, setOrientation:, setRotationalVelocity:, setUpPlanetFromTexture:, and update:.
|
private |
Definition at line 86 of file PlanetEntity.h.
Referenced by drawUnconditionally.
|
private |
Definition at line 63 of file PlanetEntity.h.
Referenced by initFromDictionary:withAtmosphere:andSeed:, and isExplicitlyTextured.
|
private |
Definition at line 81 of file PlanetEntity.h.
Referenced by initFromDictionary:withAtmosphere:andSeed:, miniaturize, and update:.
|
private |
Definition at line 61 of file PlanetEntity.h.
Referenced by drawUnconditionally.
|
private |
Definition at line 1001 of file PlanetEntity.m.
Referenced by initFromDictionary:withAtmosphere:andSeed:.
|
private |
Definition at line 59 of file PlanetEntity.h.
Referenced by canCollide, descriptionComponents, drawUnconditionally, PlanetEntity(OOPrivate)::initAsAtmosphereForPlanet:dictionary:, initFromDictionary:withAtmosphere:andSeed:, miniaturize, planetType, setPlanetType:, and update:.
|
private |
Definition at line 1083 of file PlanetEntity.m.
Referenced by initFromDictionary:withAtmosphere:andSeed:, and planet_seed.
|
private |
Definition at line 78 of file PlanetEntity.h.
Referenced by drawUnconditionally, and initFromDictionary:withAtmosphere:andSeed:.
|
private |
Definition at line 70 of file PlanetEntity.h.
Referenced by initFromDictionary:withAtmosphere:andSeed:, miniaturize, rotationalVelocity, setRotationalVelocity:, and update:.
|
private |
Definition at line 90 of file PlanetEntity.h.
Referenced by initFromDictionary:withAtmosphere:andSeed:, miniaturize, setOrientation:, and update:.
|
private |
Definition at line 82 of file PlanetEntity.h.
Referenced by initFromDictionary:withAtmosphere:andSeed:, miniaturize, and update:.
|
private |
Definition at line 80 of file PlanetEntity.h.
Referenced by initFromDictionary:withAtmosphere:andSeed:, miniaturize, update:, and welcomeShuttle:.
|
private |
Definition at line 84 of file PlanetEntity.h.
Referenced by drawUnconditionally, and update:.
|
private |
Definition at line 62 of file PlanetEntity.h.
|
private |
Definition at line 87 of file PlanetEntity.h.
Referenced by initFromDictionary:withAtmosphere:andSeed:.
|
private |
Definition at line 88 of file PlanetEntity.h.
Referenced by drawUnconditionally.