Midnight Blue Game and Engine
Public Member Functions | Properties | List of all members
MidnightBlue.Planet Class Reference

A fully-generated planet in a star system with associated texture maps. More...

Collaboration diagram for MidnightBlue.Planet:
Collaboration graph

Public Member Functions

 Planet (PlanetMetadata meta, int seed)
 Initializes a new instance of the T:MidnightBlue.Planet class and sets up all noise maps ready for generation. More...
 
void Generate (Random rand)
 Generates the planet after setting up with pre-defined metadata parameters. More...
 
void CreateMapTexture (ContentManager content)
 Creates the biome map texture and planet mask texture to use for rendering to star system view and to use as maps. More...
 
Texture2D GetMapLayer (string layerName)
 Gets one of the planets generated noise map textures More...
 

Properties

PlanetTile [,] Tiles [get]
 Gets all the tiles in the generated planet More...
 
Point Size [get]
 Gets the rectangular size of the planets tile map More...
 
string Name [get]
 Gets the name of the planet More...
 
PlanetMetadata Meta [get]
 Gets the planets assigned metadata parameters More...
 
Vector2 Position [get, set]
 Gets or sets the planets position in the star system scene More...
 
bool Generated [get]
 Gets a value indicating whether this T:MidnightBlue.Planet is generated or only setup ready to be generated. More...
 

Detailed Description

A fully-generated planet in a star system with associated texture maps.

Constructor & Destructor Documentation

§ Planet()

MidnightBlue.Planet.Planet ( PlanetMetadata  meta,
int  seed 
)
inline

Initializes a new instance of the T:MidnightBlue.Planet class and sets up all noise maps ready for generation.

Parameters
metaMetadata received from the planet view to act as parameters for generation.
seedSeed to use in generating the map.

Member Function Documentation

§ CreateMapTexture()

void MidnightBlue.Planet.CreateMapTexture ( ContentManager  content)
inline

Creates the biome map texture and planet mask texture to use for rendering to star system view and to use as maps.

Parameters
contentContent manager for loading textures.
Here is the call graph for this function:

§ Generate()

void MidnightBlue.Planet.Generate ( Random  rand)
inline

Generates the planet after setting up with pre-defined metadata parameters.

Parameters
randRandom number generator from galaxy view to use in generating the planet.
Here is the call graph for this function:
Here is the caller graph for this function:

§ GetMapLayer()

Texture2D MidnightBlue.Planet.GetMapLayer ( string  layerName)
inline

Gets one of the planets generated noise map textures

Returns
The map layer.
Parameters
layerNameLayer name.
Here is the caller graph for this function:

Property Documentation

§ Generated

bool MidnightBlue.Planet.Generated
get

Gets a value indicating whether this T:MidnightBlue.Planet is generated or only setup ready to be generated.

true if generated; otherwise, false.

§ Meta

PlanetMetadata MidnightBlue.Planet.Meta
get

Gets the planets assigned metadata parameters

The metadata.

§ Name

string MidnightBlue.Planet.Name
get

Gets the name of the planet

The name.

§ Position

Vector2 MidnightBlue.Planet.Position
getset

Gets or sets the planets position in the star system scene

The position.

§ Size

Point MidnightBlue.Planet.Size
get

Gets the rectangular size of the planets tile map

The size of the planet.

§ Tiles

PlanetTile [,] MidnightBlue.Planet.Tiles
get

Gets all the tiles in the generated planet

The tiles.


The documentation for this class was generated from the following file: