Oolite 1.91.0.7604-240417-a536cbe
Loading...
Searching...
No Matches
Classes | Macros | Functions | Variables
PlanetEntity.m File Reference
import "PlanetEntity.h"
import "OOOpenGLExtensionManager.h"
import "Universe.h"
import "AI.h"
import "TextureStore.h"
import "OOTexture.h"
import "OOTextureInternal.h"
import "OOPixMapTextureLoader.h"
import "MyOpenGLView.h"
import "ShipEntityAI.h"
import "OOColor.h"
import "OOCharacter.h"
import "OOStringParsing.h"
import "PlayerEntity.h"
import "OOCollectionExtractors.h"
import "OODebugFlags.h"
import "OOGraphicsResetManager.h"
+ Include dependency graph for PlanetEntity.m:

Go to the source code of this file.

Classes

category  PlanetEntity(OOPrivate)
 
struct  BaseFace
 

Macros

#define NSIntegerMapKeyCallBacks   NSIntMapKeyCallBacks
 
#define NSIntegerMapValueCallBacks   NSIntMapValueCallBacks
 
#define CLEAR_SKY_ALPHA   0.05
 
#define CLOUD_ALPHA   0.50
 
#define POLAR_CLEAR_SKY_ALPHA   0.34
 
#define POLAR_CLOUD_ALPHA   0.75
 

Functions

static unsigned baseVertexIndexForEdge (GLushort va, GLushort vb, BOOL textured)
 

Variables

static Vector base_vertex_array [MAX_PLANET_VERTICES]
 
static int base_terrain_array [MAX_PLANET_VERTICES]
 
static unsigned next_free_vertex
 
static NSMapTable * sEdgeToVertex
 
static int n_triangles [MAX_SUBDIVIDE]
 
static int triangle_start [MAX_SUBDIVIDE]
 
static GLuint vertex_index_array [3 *(20+80+320+1280+5120+20480)]
 
static GLfloat texture_uv_array [MAX_PLANET_VERTICES *2]
 
static const Vector kUntexturedVertices []
 
static const BaseFace kUntexturedFaces [][3]
 
static const Vector kTexturedVertices []
 
static const BaseFace kTexturedFaces [][3]
 

Macro Definition Documentation

◆ CLEAR_SKY_ALPHA

#define CLEAR_SKY_ALPHA   0.05

◆ CLOUD_ALPHA

#define CLOUD_ALPHA   0.50

◆ NSIntegerMapKeyCallBacks

#define NSIntegerMapKeyCallBacks   NSIntMapKeyCallBacks

Definition at line 49 of file PlanetEntity.m.

◆ NSIntegerMapValueCallBacks

#define NSIntegerMapValueCallBacks   NSIntMapValueCallBacks

Definition at line 50 of file PlanetEntity.m.

◆ POLAR_CLEAR_SKY_ALPHA

#define POLAR_CLEAR_SKY_ALPHA   0.34

◆ POLAR_CLOUD_ALPHA

#define POLAR_CLOUD_ALPHA   0.75

Function Documentation

◆ baseVertexIndexForEdge()

static unsigned baseVertexIndexForEdge ( GLushort va,
GLushort vb,
BOOL textured )
static

Variable Documentation

◆ base_terrain_array

int base_terrain_array[MAX_PLANET_VERTICES]
static

Definition at line 56 of file PlanetEntity.m.

◆ base_vertex_array

Vector base_vertex_array[MAX_PLANET_VERTICES]
static

Definition at line 55 of file PlanetEntity.m.

Referenced by PlanetEntity::allTextures.

◆ kTexturedFaces

const BaseFace kTexturedFaces[][3]
static
Initial value:
=
{
{ { 1, +0.400000, +0.666667 }, { 0, +0.600000, +0.666667 }, { 6, +0.500000, +0.333333 } },
{ { 3, +0.100000, +0.333333 }, { 2, -0.100000, +0.333333 }, { 5, +0.000000, +0.666667 } },
{ { 4, +0.500000, +1.000000 }, { 0, +0.600000, +0.666667 }, { 1, +0.400000, +0.666667 } },
{ { 4, +0.500000, +1.000000 }, { 1, +0.400000, +0.666667 }, { 8, +0.200000, +0.666667 } },
{ { 12, +1.000000, +0.666667 }, { 13, +0.900000, +0.333333 }, { 9, +0.800000, +0.666667 } },
{ { 5, +0.000000, +0.666667 }, { 4, +0.500000, +1.000000 }, { 8, +0.200000, +0.666667 } },
{ { 6, +0.500000, +0.333333 }, { 0, +0.600000, +0.666667 }, { 11, +0.700000, +0.333333 } },
{ { 7, +0.500000, +0.000000 }, { 2, -0.100000, +0.333333 }, { 3, +0.100000, +0.333333 } },
{ { 7, +0.500000, +0.000000 }, { 3, +0.100000, +0.333333 }, { 10, +0.300000, +0.333333 } },
{ { 7, +0.500000, +0.000000 }, { 6, +0.500000, +0.333333 }, { 11, +0.700000, +0.333333 } },
{ { 8, +0.200000, +0.666667 }, { 1, +0.400000, +0.666667 }, { 10, +0.300000, +0.333333 } },
{ { 8, +0.200000, +0.666667 }, { 3, +0.100000, +0.333333 }, { 5, +0.000000, +0.666667 } },
{ { 9, +0.800000, +0.666667 }, { 0, +0.600000, +0.666667 }, { 4, +0.500000, +1.000000 } },
{ { 9, +0.800000, +0.666667 }, { 13, +0.900000, +0.333333 }, { 11, +0.700000, +0.333333 } },
{ { 9, +0.800000, +0.666667 }, { 4, +0.500000, +1.000000 }, { 12, +1.000000, +0.666667 } },
{ { 10, +0.300000, +0.333333 }, { 1, +0.400000, +0.666667 }, { 6, +0.500000, +0.333333 } },
{ { 10, +0.300000, +0.333333 }, { 3, +0.100000, +0.333333 }, { 8, +0.200000, +0.666667 } },
{ { 10, +0.300000, +0.333333 }, { 6, +0.500000, +0.333333 }, { 7, +0.500000, +0.000000 } },
{ { 11, +0.700000, +0.333333 }, { 0, +0.600000, +0.666667 }, { 9, +0.800000, +0.666667 } },
{ { 11, +0.700000, +0.333333 }, { 13, +0.900000, +0.333333 }, { 7, +0.500000, +0.000000 } }
}

Definition at line 165 of file PlanetEntity.m.

166{
167 { { 1, +0.400000, +0.666667 }, { 0, +0.600000, +0.666667 }, { 6, +0.500000, +0.333333 } },
168 { { 3, +0.100000, +0.333333 }, { 2, -0.100000, +0.333333 }, { 5, +0.000000, +0.666667 } },
169 { { 4, +0.500000, +1.000000 }, { 0, +0.600000, +0.666667 }, { 1, +0.400000, +0.666667 } },
170 { { 4, +0.500000, +1.000000 }, { 1, +0.400000, +0.666667 }, { 8, +0.200000, +0.666667 } },
171 { { 12, +1.000000, +0.666667 }, { 13, +0.900000, +0.333333 }, { 9, +0.800000, +0.666667 } },
172 { { 5, +0.000000, +0.666667 }, { 4, +0.500000, +1.000000 }, { 8, +0.200000, +0.666667 } },
173 { { 6, +0.500000, +0.333333 }, { 0, +0.600000, +0.666667 }, { 11, +0.700000, +0.333333 } },
174 { { 7, +0.500000, +0.000000 }, { 2, -0.100000, +0.333333 }, { 3, +0.100000, +0.333333 } },
175 { { 7, +0.500000, +0.000000 }, { 3, +0.100000, +0.333333 }, { 10, +0.300000, +0.333333 } },
176 { { 7, +0.500000, +0.000000 }, { 6, +0.500000, +0.333333 }, { 11, +0.700000, +0.333333 } },
177 { { 8, +0.200000, +0.666667 }, { 1, +0.400000, +0.666667 }, { 10, +0.300000, +0.333333 } },
178 { { 8, +0.200000, +0.666667 }, { 3, +0.100000, +0.333333 }, { 5, +0.000000, +0.666667 } },
179 { { 9, +0.800000, +0.666667 }, { 0, +0.600000, +0.666667 }, { 4, +0.500000, +1.000000 } },
180 { { 9, +0.800000, +0.666667 }, { 13, +0.900000, +0.333333 }, { 11, +0.700000, +0.333333 } },
181 { { 9, +0.800000, +0.666667 }, { 4, +0.500000, +1.000000 }, { 12, +1.000000, +0.666667 } },
182 { { 10, +0.300000, +0.333333 }, { 1, +0.400000, +0.666667 }, { 6, +0.500000, +0.333333 } },
183 { { 10, +0.300000, +0.333333 }, { 3, +0.100000, +0.333333 }, { 8, +0.200000, +0.666667 } },
184 { { 10, +0.300000, +0.333333 }, { 6, +0.500000, +0.333333 }, { 7, +0.500000, +0.000000 } },
185 { { 11, +0.700000, +0.333333 }, { 0, +0.600000, +0.666667 }, { 9, +0.800000, +0.666667 } },
186 { { 11, +0.700000, +0.333333 }, { 13, +0.900000, +0.333333 }, { 7, +0.500000, +0.000000 } }
187};

◆ kTexturedVertices

const Vector kTexturedVertices[]
static
Initial value:
=
{
{ +0.525731, +0.000000, +0.850651 },
{ -0.525731, +0.000000, +0.850651 },
{ +0.525731, +0.000000, -0.850651 },
{ -0.525731, +0.000000, -0.850651 },
{ +0.000000, +0.850651, +0.525731 },
{ +0.000000, +0.850651, -0.525731 },
{ +0.000000, -0.850651, +0.525731 },
{ +0.000000, -0.850651, -0.525731 },
{ -0.850651, +0.525731, +0.000000 },
{ +0.850651, +0.525731, +0.000000 },
{ -0.850651, -0.525731, +0.000000 },
{ +0.850651, -0.525731, +0.000000 },
{ +0.000000, +0.850651, -0.525731 },
{ +0.525731, +0.000000, -0.850651 }
}

Definition at line 147 of file PlanetEntity.m.

148{
149 { +0.525731, +0.000000, +0.850651 },
150 { -0.525731, +0.000000, +0.850651 },
151 { +0.525731, +0.000000, -0.850651 },
152 { -0.525731, +0.000000, -0.850651 },
153 { +0.000000, +0.850651, +0.525731 },
154 { +0.000000, +0.850651, -0.525731 },
155 { +0.000000, -0.850651, +0.525731 },
156 { +0.000000, -0.850651, -0.525731 },
157 { -0.850651, +0.525731, +0.000000 },
158 { +0.850651, +0.525731, +0.000000 },
159 { -0.850651, -0.525731, +0.000000 },
160 { +0.850651, -0.525731, +0.000000 },
161 { +0.000000, +0.850651, -0.525731 },
162 { +0.525731, +0.000000, -0.850651 }
163};

◆ kUntexturedFaces

const BaseFace kUntexturedFaces[][3]
static
Initial value:
=
{
{ { 9, +0.600000, +0.666667 }, { 7, +0.800000, +0.666667 }, { 8, +0.800000, +0.333333 } },
{ { 8, +0.800000, +0.333333 }, { 4, +0.600000, +0.333333 }, { 9, +0.600000, +0.666667 } },
{ { 3, +0.400000, +0.666667 }, { 9, +0.600000, +0.666667 }, { 4, +0.600000, +0.333333 } },
{ { 8, +0.800000, +0.333333 }, { 0, +0.500000, +0.000000 }, { 4, +0.600000, +0.333333 } },
{ { 7, +0.800000, +0.666667 }, { 1, +1.000000, +0.333333 }, { 8, +0.800000, +0.333333 } },
{ { 2, +0.500000, +1.000000 }, { 7, +0.800000, +0.666667 }, { 9, +0.600000, +0.666667 } },
{ { 2, +0.500000, +1.000000 }, { 9, +0.600000, +0.666667 }, { 3, +0.400000, +0.666667 } },
{ { 1, +1.000000, +0.333333 }, { 0, +0.500000, +0.000000 }, { 8, +0.800000, +0.333333 } },
{ { 4, +0.600000, +0.333333 }, { 0, +0.500000, +0.000000 }, { 5, +0.400000, +0.333333 } },
{ { 5, +0.400000, +0.333333 }, { 3, +0.400000, +0.666667 }, { 4, +0.600000, +0.333333 } },
{ { 6, +1.000000, +0.666667 }, { 1, +1.000000, +0.333333 }, { 7, +0.800000, +0.666667 } },
{ { 7, +0.800000, +0.666667 }, { 2, +0.500000, +1.000000 }, { 6, +1.000000, +0.666667 } },
{ { 1, +0.000000, +0.333333 }, { 11, +0.200000, +0.333333 }, { 0, +0.500000, +0.000000 } },
{ { 3, +0.400000, +0.666667 }, { 10, +0.200000, +0.666667 }, { 2, +0.500000, +1.000000 } },
{ { 0, +0.500000, +0.000000 }, { 11, +0.200000, +0.333333 }, { 5, +0.400000, +0.333333 } },
{ { 5, +0.400000, +0.333333 }, { 10, +0.200000, +0.666667 }, { 3, +0.400000, +0.666667 } },
{ { 1, +0.000000, +0.333333 }, { 6, +0.000000, +0.666667 }, { 11, +0.200000, +0.333333 } },
{ { 6, +0.000000, +0.666667 }, { 2, +0.500000, +1.000000 }, { 10, +0.200000, +0.666667 } },
{ { 5, +0.400000, +0.333333 }, { 11, +0.200000, +0.333333 }, { 10, +0.200000, +0.666667 } },
{ { 11, +0.200000, +0.333333 }, { 6, +0.000000, +0.666667 }, { 10, +0.200000, +0.666667 } }
}

Definition at line 122 of file PlanetEntity.m.

123{
124 { { 9, +0.600000, +0.666667 }, { 7, +0.800000, +0.666667 }, { 8, +0.800000, +0.333333 } },
125 { { 8, +0.800000, +0.333333 }, { 4, +0.600000, +0.333333 }, { 9, +0.600000, +0.666667 } },
126 { { 3, +0.400000, +0.666667 }, { 9, +0.600000, +0.666667 }, { 4, +0.600000, +0.333333 } },
127 { { 8, +0.800000, +0.333333 }, { 0, +0.500000, +0.000000 }, { 4, +0.600000, +0.333333 } },
128 { { 7, +0.800000, +0.666667 }, { 1, +1.000000, +0.333333 }, { 8, +0.800000, +0.333333 } },
129 { { 2, +0.500000, +1.000000 }, { 7, +0.800000, +0.666667 }, { 9, +0.600000, +0.666667 } },
130 { { 2, +0.500000, +1.000000 }, { 9, +0.600000, +0.666667 }, { 3, +0.400000, +0.666667 } },
131 { { 1, +1.000000, +0.333333 }, { 0, +0.500000, +0.000000 }, { 8, +0.800000, +0.333333 } },
132 { { 4, +0.600000, +0.333333 }, { 0, +0.500000, +0.000000 }, { 5, +0.400000, +0.333333 } },
133 { { 5, +0.400000, +0.333333 }, { 3, +0.400000, +0.666667 }, { 4, +0.600000, +0.333333 } },
134 { { 6, +1.000000, +0.666667 }, { 1, +1.000000, +0.333333 }, { 7, +0.800000, +0.666667 } },
135 { { 7, +0.800000, +0.666667 }, { 2, +0.500000, +1.000000 }, { 6, +1.000000, +0.666667 } },
136 { { 1, +0.000000, +0.333333 }, { 11, +0.200000, +0.333333 }, { 0, +0.500000, +0.000000 } },
137 { { 3, +0.400000, +0.666667 }, { 10, +0.200000, +0.666667 }, { 2, +0.500000, +1.000000 } },
138 { { 0, +0.500000, +0.000000 }, { 11, +0.200000, +0.333333 }, { 5, +0.400000, +0.333333 } },
139 { { 5, +0.400000, +0.333333 }, { 10, +0.200000, +0.666667 }, { 3, +0.400000, +0.666667 } },
140 { { 1, +0.000000, +0.333333 }, { 6, +0.000000, +0.666667 }, { 11, +0.200000, +0.333333 } },
141 { { 6, +0.000000, +0.666667 }, { 2, +0.500000, +1.000000 }, { 10, +0.200000, +0.666667 } },
142 { { 5, +0.400000, +0.333333 }, { 11, +0.200000, +0.333333 }, { 10, +0.200000, +0.666667 } },
143 { { 11, +0.200000, +0.333333 }, { 6, +0.000000, +0.666667 }, { 10, +0.200000, +0.666667 } }
144};

◆ kUntexturedVertices

const Vector kUntexturedVertices[]
static
Initial value:
=
{
{ +0.000000, -0.850664, -0.525710 },
{ +0.000000, -0.850664, +0.525710 },
{ +0.000000, +0.850664, +0.525710 },
{ +0.000000, +0.850664, -0.525710 },
{ -0.525710, +0.000000, -0.850664 },
{ +0.525710, +0.000000, -0.850664 },
{ +0.525710, +0.000000, +0.850664 },
{ -0.525710, +0.000000, +0.850664 },
{ -0.850664, -0.525710, +0.000000 },
{ -0.850664, +0.525710, +0.000000 },
{ +0.850664, +0.525710, +0.000000 },
{ +0.850664, -0.525710, +0.000000 }
}

Definition at line 106 of file PlanetEntity.m.

107{
108 { +0.000000, -0.850664, -0.525710 },
109 { +0.000000, -0.850664, +0.525710 },
110 { +0.000000, +0.850664, +0.525710 },
111 { +0.000000, +0.850664, -0.525710 },
112 { -0.525710, +0.000000, -0.850664 },
113 { +0.525710, +0.000000, -0.850664 },
114 { +0.525710, +0.000000, +0.850664 },
115 { -0.525710, +0.000000, +0.850664 },
116 { -0.850664, -0.525710, +0.000000 },
117 { -0.850664, +0.525710, +0.000000 },
118 { +0.850664, +0.525710, +0.000000 },
119 { +0.850664, -0.525710, +0.000000 }
120};

◆ n_triangles

int n_triangles[MAX_SUBDIVIDE]
static

Definition at line 60 of file PlanetEntity.m.

◆ next_free_vertex

unsigned next_free_vertex
static

Definition at line 57 of file PlanetEntity.m.

Referenced by PlanetEntity::allTextures.

◆ sEdgeToVertex

NSMapTable* sEdgeToVertex
static

Definition at line 58 of file PlanetEntity.m.

Referenced by PlanetEntity::allTextures.

◆ texture_uv_array

GLfloat texture_uv_array[MAX_PLANET_VERTICES *2]
static

Definition at line 64 of file PlanetEntity.m.

Referenced by PlanetEntity::allTextures.

◆ triangle_start

int triangle_start[MAX_SUBDIVIDE]
static

Definition at line 61 of file PlanetEntity.m.

◆ vertex_index_array

GLuint vertex_index_array[3 *(20+80+320+1280+5120+20480)]
static

Definition at line 62 of file PlanetEntity.m.