Space Engineers
Classes | Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
Sandbox.Engine.Voxels.Planet.MyHeightmapFace Class Reference
Inheritance diagram for Sandbox.Engine.Voxels.Planet.MyHeightmapFace:
Sandbox.Engine.Voxels.IMyWrappedCubemapFace

Classes

struct  HeightmapLevel
 
struct  HeightmapNode
 

Public Member Functions

 MyHeightmapFace (int resolution)
 
void Zero ()
 
void GetValue (int x, int y, out ushort value)
 
unsafe void Get4Row (int linearOfft, float *values, ushort *map)
 
unsafe void Get4Row (int linearOfft, float *values)
 
unsafe void GetHermiteSliceRow (int linearOfft, float *values)
 
ushort GetValue (int x, int y)
 
float GetValuef (int x, int y)
 
void GetNormal (int x, int y, out MyHeightmapNormal normal)
 
void SetValue (int x, int y, ushort value)
 
int GetRowStart (int y)
 
void CopyRange (Vector2I start, Vector2I end, MyHeightmapFace other, Vector2I oStart, Vector2I oEnd)
 
void CopyRange (Vector2I start, Vector2I end, IMyWrappedCubemapFace other, Vector2I oStart, Vector2I oEnd)
 
void FinishFace (string faceName)
 
void CreatePruningTree (string mapName)
 
ContainmentType QueryHeight (ref BoundingBox query)
 
void GetBounds (ref BoundingBox query)
 
bool QueryLine (ref Vector3 from, ref Vector3 to, out float startOffset, out float endOffset)
 

Public Attributes

ushort[] Data
 
MyHeightmapNormal[] NormalData
 
HeightmapNode Root
 
HeightmapLevel[] PruningTree
 

Static Public Attributes

static readonly MyHeightmapFace Default
 

Properties

int Resolution [get, set]
 
int ResolutionMinusOne [get, set]
 
int RowStride [get]
 
- Properties inherited from Sandbox.Engine.Voxels.IMyWrappedCubemapFace
int Resolution [get]
 
int ResolutionMinusOne [get]
 

Detailed Description

Definition at line 62 of file MyHeightCubemap.cs.

Constructor & Destructor Documentation

Sandbox.Engine.Voxels.Planet.MyHeightmapFace.MyHeightmapFace ( int  resolution)
inline

Definition at line 77 of file MyHeightCubemap.cs.

Member Function Documentation

void Sandbox.Engine.Voxels.Planet.MyHeightmapFace.CopyRange ( Vector2I  start,
Vector2I  end,
MyHeightmapFace  other,
Vector2I  oStart,
Vector2I  oEnd 
)
inline

Definition at line 181 of file MyHeightCubemap.cs.

void Sandbox.Engine.Voxels.Planet.MyHeightmapFace.CopyRange ( Vector2I  start,
Vector2I  end,
IMyWrappedCubemapFace  other,
Vector2I  oStart,
Vector2I  oEnd 
)
inline

Implements Sandbox.Engine.Voxels.IMyWrappedCubemapFace.

Definition at line 197 of file MyHeightCubemap.cs.

void Sandbox.Engine.Voxels.Planet.MyHeightmapFace.CreatePruningTree ( string  mapName)
inline

Definition at line 320 of file MyHeightCubemap.cs.

void Sandbox.Engine.Voxels.Planet.MyHeightmapFace.FinishFace ( string  faceName)
inline

Implements Sandbox.Engine.Voxels.IMyWrappedCubemapFace.

Definition at line 204 of file MyHeightCubemap.cs.

unsafe void Sandbox.Engine.Voxels.Planet.MyHeightmapFace.Get4Row ( int  linearOfft,
float *  values,
ushort *  map 
)
inline

Definition at line 115 of file MyHeightCubemap.cs.

unsafe void Sandbox.Engine.Voxels.Planet.MyHeightmapFace.Get4Row ( int  linearOfft,
float *  values 
)
inline

Definition at line 124 of file MyHeightCubemap.cs.

void Sandbox.Engine.Voxels.Planet.MyHeightmapFace.GetBounds ( ref BoundingBox  query)
inline

Definition at line 725 of file MyHeightCubemap.cs.

unsafe void Sandbox.Engine.Voxels.Planet.MyHeightmapFace.GetHermiteSliceRow ( int  linearOfft,
float *  values 
)
inline

Definition at line 135 of file MyHeightCubemap.cs.

void Sandbox.Engine.Voxels.Planet.MyHeightmapFace.GetNormal ( int  x,
int  y,
out MyHeightmapNormal  normal 
)
inline

Definition at line 159 of file MyHeightCubemap.cs.

int Sandbox.Engine.Voxels.Planet.MyHeightmapFace.GetRowStart ( int  y)
inline

Compute that starting position of a row in the heightmap.

Definition at line 176 of file MyHeightCubemap.cs.

void Sandbox.Engine.Voxels.Planet.MyHeightmapFace.GetValue ( int  x,
int  y,
out ushort  value 
)
inline

Definition at line 109 of file MyHeightCubemap.cs.

ushort Sandbox.Engine.Voxels.Planet.MyHeightmapFace.GetValue ( int  x,
int  y 
)
inline

Definition at line 144 of file MyHeightCubemap.cs.

float Sandbox.Engine.Voxels.Planet.MyHeightmapFace.GetValuef ( int  x,
int  y 
)
inline

Definition at line 154 of file MyHeightCubemap.cs.

ContainmentType Sandbox.Engine.Voxels.Planet.MyHeightmapFace.QueryHeight ( ref BoundingBox  query)
inline

Scan pruning tree for intersection with a bounding box.

This method is a iterative implementation of the following algorithm:

procedure scan(level, box, result) for each $cell in $level $inter = intersects($cell, $box)

if $inter = INTERSECTS and $cell is not contained and $level != 0 $inter = scan($level -1, box, $result)

switch on $inter case INTERSECTS return INTERSECTS

case CONTAINED if $result == DISJOINT return INTERSECTS $result = CONTAINED

case DISJOINT if $result == CONTAINED return INTERSECTS $result = DISJOINT return $result

Definition at line 564 of file MyHeightCubemap.cs.

bool Sandbox.Engine.Voxels.Planet.MyHeightmapFace.QueryLine ( ref Vector3  from,
ref Vector3  to,
out float  startOffset,
out float  endOffset 
)
inline

Query a line over the heightmap for intersection.

The line is the segment that starts in 'from' and ends in 'to'

'xy' components of the vectors are the texture coordinates. The 'z' component is the height in [0,1] range.

If either height is above or bellow the plane more than int16.MaxValue units this algorithm may yield incorrect results.

Definition at line 803 of file MyHeightCubemap.cs.

void Sandbox.Engine.Voxels.Planet.MyHeightmapFace.SetValue ( int  x,
int  y,
ushort  value 
)
inline

Definition at line 164 of file MyHeightCubemap.cs.

void Sandbox.Engine.Voxels.Planet.MyHeightmapFace.Zero ( )
inline

Definition at line 101 of file MyHeightCubemap.cs.

Member Data Documentation

ushort [] Sandbox.Engine.Voxels.Planet.MyHeightmapFace.Data

Definition at line 169 of file MyHeightCubemap.cs.

readonly MyHeightmapFace Sandbox.Engine.Voxels.Planet.MyHeightmapFace.Default
static

Definition at line 93 of file MyHeightCubemap.cs.

MyHeightmapNormal [] Sandbox.Engine.Voxels.Planet.MyHeightmapFace.NormalData

Definition at line 171 of file MyHeightCubemap.cs.

HeightmapLevel [] Sandbox.Engine.Voxels.Planet.MyHeightmapFace.PruningTree

Definition at line 318 of file MyHeightCubemap.cs.

HeightmapNode Sandbox.Engine.Voxels.Planet.MyHeightmapFace.Root

Definition at line 316 of file MyHeightCubemap.cs.

Property Documentation

int Sandbox.Engine.Voxels.Planet.MyHeightmapFace.Resolution
getset

Definition at line 64 of file MyHeightCubemap.cs.

int Sandbox.Engine.Voxels.Planet.MyHeightmapFace.ResolutionMinusOne
getset

Definition at line 65 of file MyHeightCubemap.cs.

int Sandbox.Engine.Voxels.Planet.MyHeightmapFace.RowStride
get

Definition at line 67 of file MyHeightCubemap.cs.


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