|
Oolite
|
#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 53 of file PlanetEntity.h.
| - (GLfloat *) amb_polar_land |
References amb_polar_land.
| - (GLfloat *) amb_polar_sea |
References amb_polar_sea, atmosphere, drawUnconditionally, hasAtmosphere, launchShuttle, PlanetEntity, planetType, radius, and rotationalVelocity.
|
implementation |
Definition at line 1212 of file PlanetEntity.m.
References base_vertex_array, next_free_vertex, sEdgeToVertex, texture_uv_array, vector_add(), and vector_normal().
|
implementation |
Reimplemented from Entity.
Definition at line 590 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 606 of file PlanetEntity.m.
References DEBUG_COLLISIONS, gDebugFlags, Entity::isShip, <OOStellarBody>::name, OOLog, Entity::position, Entity::universalID, HPVector::x, HPVector::y, and HPVector::z.
|
implementation |
Provided by category PlanetEntity(OOPrivate).
Definition at line 1452 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 554 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 1382 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 567 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 721 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 1077 of file PlanetEntity.m.
References n_triangles, OOGL, and triangle_start.
Referenced by drawUnconditionally.
| - (void) drawUnconditionally |
Definition at line 739 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 1072 of file PlanetEntity.m.
References atmosphere, hasAtmosphere, and nil.
Referenced by amb_polar_sea, hasAtmosphere, and setUpPlanetFromTexture:.
|
implementation |
Reimplemented from Entity.
Definition at line 180 of file PlanetEntity.m.
Referenced by init.
|
implementation |
Provided by category PlanetEntity(OOPrivate).
Definition at line 187 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, OOClamp_0_1_f(), 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 351 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(), dot_product(), 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:, 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(), vertexCount, Vector::x, Vector::y, and Vector::z.
|
implementation |
Provided by category PlanetEntity(OOPrivate).
Definition at line 1255 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 1120 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 1398 of file PlanetEntity.m.
References isExplicitlyTextured, and isTextureImage.
Referenced by isExplicitlyTextured, and planet_seed.
|
implementation |
Reimplemented from Entity.
Definition at line 1486 of file PlanetEntity.m.
References isPlanet.
Referenced by isPlanet.
| - (BOOL) isTextured |
Definition at line 932 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 1491 of file PlanetEntity.m.
References isVisible.
Referenced by isVisible.
| - (void) launchShuttle |
Definition at line 1082 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:, vector_forward_from_quaternion(), HPVector::x, Vector::x, HPVector::y, Vector::y, HPVector::z, and Vector::z.
Referenced by amb_polar_sea, launchShuttle, and update:.
|
implementation |
Provided by category PlanetEntity(OOPrivate).
Definition at line 1408 of file PlanetEntity.m.
References nil, and OOTexture::textureWithConfiguration:extraOptions:.
Referenced by initFromDictionary:withAtmosphere:andSeed:, and setUpPlanetFromTexture:.
| - (void) miniaturize |
Definition at line 334 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 1320 of file PlanetEntity.m.
References base_terrain_array, base_vertex_array, nil, ranrot_rand, ranrot_srand(), RANROTGetFullSeed(), RANROTSetFullSeed(), STELLAR_TYPE_ATMOSPHERE, Vector::x, Vector::y, and Vector::z.
| - (int) planet_seed |
References int(), isExplicitlyTextured, isTextured, planet_seed, texture, and textureFileName.
|
implementation |
Provided by category PlanetEntity(OOPrivate).
Definition at line 1430 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 1033 of file PlanetEntity.m.
References planet_type, and planetType.
Referenced by amb_polar_sea, and planetType.
| - (double) polar_color_factor |
References polar_color_factor.
| - (double) radius |
Reimplemented from <OOStellarBody>.
Definition at line 1043 of file PlanetEntity.m.
References Entity::collision_radius, and radius.
Referenced by amb_polar_sea, descriptionComponents, drawImmediate:translucent:, and radius.
|
implementation |
Definition at line 1393 of file PlanetEntity.m.
References deleteDisplayLists, and resetGraphicsState.
Referenced by resetGraphicsState.
| - (double) rotationalVelocity |
Definition at line 1053 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 1369 of file PlanetEntity.m.
References base_vertex_array, make_vector(), next_free_vertex, PlanetEntity(OOPrivate)::scaleVertices, texture_uv_array, Vector::x, Vector::y, and Vector::z.
Referenced by PlanetEntity(OOPrivate)::initAsAtmosphereForPlanet:dictionary:, initFromDictionary:withAtmosphere:andSeed:, miniaturize, PlanetEntity(OOPrivate)::scaleVertices, and setUpPlanetFromTexture:.
|
implementation |
Reimplemented from Entity.
Definition at line 701 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 1038 of file PlanetEntity.m.
References planet_type.
|
implementation |
Reimplemented from Entity.
Definition at line 695 of file PlanetEntity.m.
References Entity::position, and setPosition:.
Referenced by setPosition:.
| - (void) setRadius: | (GLfloat) | rad |
Definition at line 1048 of file PlanetEntity.m.
References Entity::collision_radius.
| - (void) setRotationalVelocity: | (double) | v |
Definition at line 1058 of file PlanetEntity.m.
References atmosphere, rotational_velocity, rotationalVelocity, and setRotationalVelocity:.
Referenced by setRotationalVelocity:.
|
implementation |
Provided by category PlanetEntity(OOPrivate).
Definition at line 942 of file PlanetEntity.m.
References OOColor::blueComponent, OOColor::colorWithHue:saturation:brightness:alpha:, OOColor::greenComponent, PLAYER, OOColor::redComponent, ScanVectorFromString(), UNIVERSE, Vector::x, Vector::y, and Vector::z.
Referenced by initFromDictionary:withAtmosphere:andSeed:, and setUpPlanetFromTexture:.
| - (BOOL) setUpPlanetFromTexture: | (NSString*) | fileName |
Definition at line 971 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 709 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 1067 of file PlanetEntity.m.
References PlanetEntity(OOPrivate)::sqrtZeroDistance.
Referenced by PlanetEntity(OOPrivate)::sqrtZeroDistance.
| - (OOTexture *) texture |
Definition at line 1403 of file PlanetEntity.m.
References _texture, and texture.
Referenced by initFromDictionary:withAtmosphere:andSeed:, planet_seed, and texture.
| - (NSString *) textureFileName |
Definition at line 937 of file PlanetEntity.m.
References _textureFileName, and textureFileName.
Referenced by planet_seed, and textureFileName.
|
implementation |
Reimplemented from Entity.
Definition at line 631 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 1115 of file PlanetEntity.m.
References shuttles_on_ground.
|
private |
Definition at line 61 of file PlanetEntity.h.
Referenced by dealloc, drawUnconditionally, initFromDictionary:withAtmosphere:andSeed:, isTextured, and texture.
|
private |
Definition at line 60 of file PlanetEntity.h.
Referenced by dealloc, and textureFileName.
|
private |
Definition at line 1013 of file PlanetEntity.m.
Referenced by amb_land, and initFromDictionary:withAtmosphere:andSeed:.
|
private |
Definition at line 1018 of file PlanetEntity.m.
Referenced by amb_polar_land, and initFromDictionary:withAtmosphere:andSeed:.
|
private |
Definition at line 1028 of file PlanetEntity.m.
Referenced by amb_polar_sea, and initFromDictionary:withAtmosphere:andSeed:.
|
private |
Definition at line 1023 of file PlanetEntity.m.
Referenced by amb_sea, initFromDictionary:withAtmosphere:andSeed:, and setUpPlanetFromTexture:.
|
private |
Definition at line 73 of file PlanetEntity.h.
Referenced by amb_polar_sea, dealloc, drawUnconditionally, hasAtmosphere, initFromDictionary:withAtmosphere:andSeed:, miniaturize, setOrientation:, setRotationalVelocity:, setUpPlanetFromTexture:, and update:.
|
private |
Definition at line 82 of file PlanetEntity.h.
Referenced by drawUnconditionally.
|
private |
Definition at line 59 of file PlanetEntity.h.
Referenced by initFromDictionary:withAtmosphere:andSeed:, and isExplicitlyTextured.
|
private |
Definition at line 77 of file PlanetEntity.h.
Referenced by initFromDictionary:withAtmosphere:andSeed:, miniaturize, and update:.
|
private |
Definition at line 57 of file PlanetEntity.h.
Referenced by drawUnconditionally.
|
private |
Definition at line 927 of file PlanetEntity.m.
Referenced by initFromDictionary:withAtmosphere:andSeed:, and planet_seed.
|
private |
Definition at line 55 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 1008 of file PlanetEntity.m.
Referenced by initFromDictionary:withAtmosphere:andSeed:, and polar_color_factor.
|
private |
Definition at line 74 of file PlanetEntity.h.
Referenced by drawUnconditionally, and initFromDictionary:withAtmosphere:andSeed:.
|
private |
Definition at line 66 of file PlanetEntity.h.
Referenced by initFromDictionary:withAtmosphere:andSeed:, miniaturize, rotationalVelocity, setRotationalVelocity:, and update:.
|
private |
Definition at line 86 of file PlanetEntity.h.
Referenced by initFromDictionary:withAtmosphere:andSeed:, miniaturize, setOrientation:, and update:.
|
private |
Definition at line 78 of file PlanetEntity.h.
Referenced by initFromDictionary:withAtmosphere:andSeed:, miniaturize, and update:.
|
private |
Definition at line 76 of file PlanetEntity.h.
Referenced by initFromDictionary:withAtmosphere:andSeed:, miniaturize, update:, and welcomeShuttle:.
|
private |
Definition at line 80 of file PlanetEntity.h.
Referenced by drawUnconditionally, and update:.
|
private |
Definition at line 58 of file PlanetEntity.h.
|
private |
Definition at line 83 of file PlanetEntity.h.
Referenced by initFromDictionary:withAtmosphere:andSeed:.
|
private |
Definition at line 84 of file PlanetEntity.h.
Referenced by drawUnconditionally.