Space Engineers
Public Member Functions | Public Attributes | Properties | List of all members
VRage.Game.MyPlanetMaterialPlacementRule Class Reference
Inheritance diagram for VRage.Game.MyPlanetMaterialPlacementRule:
VRage.Game.MyPlanetMaterialDefinition

Public Member Functions

 MyPlanetMaterialPlacementRule ()
 
 MyPlanetMaterialPlacementRule (MyPlanetMaterialPlacementRule copyFrom)
 
bool Check (float height, float latitude, float slope)
 
object Clone ()
 
- Public Member Functions inherited from VRage.Game.MyPlanetMaterialDefinition
object Clone ()
 

Public Attributes

SerializableRange Height = new SerializableRange(0, 1)
 
SymetricSerializableRange Latitude = new SymetricSerializableRange(-90, 90)
 
SerializableRange Longitude = new SerializableRange(-180, 180)
 
SerializableRange Slope = new SerializableRange(0, 90)
 
- Public Attributes inherited from VRage.Game.MyPlanetMaterialDefinition
string Material
 
byte Value = 0
 
float MaxDepth = 1.0f
 
MyPlanetMaterialLayer[] Layers
 

Properties

override bool IsRule [get]
 
- Properties inherited from VRage.Game.MyPlanetMaterialDefinition
virtual bool IsRule [get]
 
bool HasLayers [get]
 
string FirstOrDefault [get]
 

Detailed Description

Important!

Due to the geometry in question the slope is stored as the cosine (used in dot product).

Meanwhile the dot product for the latitude yields the cosine of the modulus of the compliment of our angle. This means after the maths are done that what we have is the sine, so the latitude is stored as the sine.

Definition at line 89 of file MyObjectBuilder_PlanetGeneratorDefinition.cs.

Constructor & Destructor Documentation

VRage.Game.MyPlanetMaterialPlacementRule.MyPlanetMaterialPlacementRule ( )
inline
VRage.Game.MyPlanetMaterialPlacementRule.MyPlanetMaterialPlacementRule ( MyPlanetMaterialPlacementRule  copyFrom)
inline

Member Function Documentation

bool VRage.Game.MyPlanetMaterialPlacementRule.Check ( float  height,
float  latitude,
float  slope 
)
inline

Check that a rule matches terrain properties.

Parameters
heightHeight ration to the height map.
latitudeLatitude cosine
slopeSurface dominant angle sine.

Definition at line 131 of file MyObjectBuilder_PlanetGeneratorDefinition.cs.

object VRage.Game.MyPlanetMaterialPlacementRule.Clone ( )
inline

Member Data Documentation

SerializableRange VRage.Game.MyPlanetMaterialPlacementRule.Height = new SerializableRange(0, 1)

Definition at line 92 of file MyObjectBuilder_PlanetGeneratorDefinition.cs.

SymetricSerializableRange VRage.Game.MyPlanetMaterialPlacementRule.Latitude = new SymetricSerializableRange(-90, 90)

Definition at line 95 of file MyObjectBuilder_PlanetGeneratorDefinition.cs.

SerializableRange VRage.Game.MyPlanetMaterialPlacementRule.Longitude = new SerializableRange(-180, 180)

Definition at line 98 of file MyObjectBuilder_PlanetGeneratorDefinition.cs.

SerializableRange VRage.Game.MyPlanetMaterialPlacementRule.Slope = new SerializableRange(0, 90)

Property Documentation

override bool VRage.Game.MyPlanetMaterialPlacementRule.IsRule
get

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