Space Engineers
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Static Protected Attributes | Properties | List of all members
VRageRender.Voxels.MyClipmap Class Reference

Classes

struct  VoxelKey
 

Public Types

enum  CellState { CellState.Invalid, CellState.Pending, CellState.Loaded }
 

Public Member Functions

delegate VRageMath.ContainmentType PruningFunc (ref BoundingBox bb, bool lazy)
 
 MyClipmap (uint id, MyClipmapScaleEnum scaleGroup, MatrixD worldMatrix, Vector3I sizeLod0, IMyClipmapCellHandler cellProvider, Vector3D massiveCenter, float massiveRadius, PruningFunc prunningFunc)
 
void UpdateWorldAABB (out BoundingBoxD worldAabb)
 
void UpdateWorldMatrix (ref MatrixD worldMatrix, bool sortCellsIntoCullObjects)
 
void LoadContent ()
 
void UnloadContent ()
 
void InvalidateRange (Vector3I minCellLod0, Vector3I maxCellLod0)
 
void UpdateCell (MyRenderMessageUpdateClipmapCell msg)
 
void DebugDraw ()
 
bool IsDitheringInProgress ()
 
Vector3I LodSizeMinusOne (int lod)
 

Static Public Member Functions

static void UnloadCache ()
 
static bool UpdateLodRanges (float[][] lodDistances)
 
static void ComputeLodViewBounds (MyClipmapScaleEnum scale, int lod, out float min, out float max)
 
static void AddToUpdate (Vector3D cameraPos, MyClipmap clipmap)
 
static void RemoveFromUpdate (MyClipmap clipmap)
 
static void UpdateQueued (Vector3D cameraPos, Vector3 cameraForward, float farPlaneDistance, float largeDistanceFarPlane)
 
static void DebugDrawClipmaps ()
 

Static Public Attributes

static Func< BoundingFrustumDCameraFrustumGetter
 
static bool UseCache = true
 
static bool NeedsResetCache = false
 
static LRUCache< UInt64, MyClipmap_CellDataCellsCache
 
static bool UseDithering = true
 
static bool UseLodCut = true
 
static bool UseQueries = true
 
static readonly Vector4[] LOD_COLORS
 
static float[][] DebugRanges
 

Static Protected Attributes

static Dictionary< UInt64, MyClipmap_CellDataPendingCacheCellData = new Dictionary<UInt64, MyClipmap_CellData>()
 
static int ClippingCacheHits = 0
 
static int ClippingCacheMisses = 0
 

Properties

MatrixD WorldMatrix [get]
 
uint Id [get]
 
static float[][] LodRangeGroups [get]
 

Detailed Description

Definition at line 13 of file MyClipmap.cs.

Member Enumeration Documentation

Enumerator
Invalid 
Pending 
Loaded 

Definition at line 31 of file MyClipmap.LodLevel.cs.

Constructor & Destructor Documentation

VRageRender.Voxels.MyClipmap.MyClipmap ( uint  id,
MyClipmapScaleEnum  scaleGroup,
MatrixD  worldMatrix,
Vector3I  sizeLod0,
IMyClipmapCellHandler  cellProvider,
Vector3D  massiveCenter,
float  massiveRadius,
PruningFunc  prunningFunc 
)
inline

Definition at line 70 of file MyClipmap.cs.

Member Function Documentation

static void VRageRender.Voxels.MyClipmap.AddToUpdate ( Vector3D  cameraPos,
MyClipmap  clipmap 
)
inlinestatic

Definition at line 77 of file MyClipmap.Update.cs.

static void VRageRender.Voxels.MyClipmap.ComputeLodViewBounds ( MyClipmapScaleEnum  scale,
int  lod,
out float  min,
out float  max 
)
inlinestatic

Definition at line 69 of file MyClipmap.Update.cs.

void VRageRender.Voxels.MyClipmap.DebugDraw ( )
inline

Definition at line 287 of file MyClipmap.cs.

static void VRageRender.Voxels.MyClipmap.DebugDrawClipmaps ( )
inlinestatic

Definition at line 165 of file MyClipmap.Update.cs.

void VRageRender.Voxels.MyClipmap.InvalidateRange ( Vector3I  minCellLod0,
Vector3I  maxCellLod0 
)
inline
Parameters
minCellLod0Inclusive.
maxCellLod0Inclusive.

Definition at line 124 of file MyClipmap.cs.

bool VRageRender.Voxels.MyClipmap.IsDitheringInProgress ( )
inline

Definition at line 308 of file MyClipmap.cs.

void VRageRender.Voxels.MyClipmap.LoadContent ( )
inline

Definition at line 109 of file MyClipmap.cs.

Vector3I VRageRender.Voxels.MyClipmap.LodSizeMinusOne ( int  lod)
inline

Definition at line 319 of file MyClipmap.cs.

delegate VRageMath.ContainmentType VRageRender.Voxels.MyClipmap.PruningFunc ( ref BoundingBox  bb,
bool  lazy 
)
static void VRageRender.Voxels.MyClipmap.RemoveFromUpdate ( MyClipmap  clipmap)
inlinestatic

Definition at line 87 of file MyClipmap.Update.cs.

static void VRageRender.Voxels.MyClipmap.UnloadCache ( )
inlinestatic

Definition at line 295 of file MyClipmap.cs.

void VRageRender.Voxels.MyClipmap.UnloadContent ( )
inline

Definition at line 114 of file MyClipmap.cs.

void VRageRender.Voxels.MyClipmap.UpdateCell ( MyRenderMessageUpdateClipmapCell  msg)
inline

Definition at line 152 of file MyClipmap.cs.

static bool VRageRender.Voxels.MyClipmap.UpdateLodRanges ( float  lodDistances[][])
inlinestatic

Definition at line 46 of file MyClipmap.Update.cs.

static void VRageRender.Voxels.MyClipmap.UpdateQueued ( Vector3D  cameraPos,
Vector3  cameraForward,
float  farPlaneDistance,
float  largeDistanceFarPlane 
)
inlinestatic

Definition at line 111 of file MyClipmap.Update.cs.

void VRageRender.Voxels.MyClipmap.UpdateWorldAABB ( out BoundingBoxD  worldAabb)
inline

Definition at line 93 of file MyClipmap.cs.

void VRageRender.Voxels.MyClipmap.UpdateWorldMatrix ( ref MatrixD  worldMatrix,
bool  sortCellsIntoCullObjects 
)
inline

Definition at line 99 of file MyClipmap.cs.

Member Data Documentation

Func<BoundingFrustumD> VRageRender.Voxels.MyClipmap.CameraFrustumGetter
static

Definition at line 29 of file MyClipmap.cs.

LRUCache<UInt64, MyClipmap_CellData> VRageRender.Voxels.MyClipmap.CellsCache
static

Definition at line 58 of file MyClipmap.cs.

int VRageRender.Voxels.MyClipmap.ClippingCacheHits = 0
staticprotected

Definition at line 60 of file MyClipmap.cs.

int VRageRender.Voxels.MyClipmap.ClippingCacheMisses = 0
staticprotected

Definition at line 61 of file MyClipmap.cs.

float [][] VRageRender.Voxels.MyClipmap.DebugRanges
static

Definition at line 21 of file MyClipmap.Update.cs.

readonly Vector4 [] VRageRender.Voxels.MyClipmap.LOD_COLORS
static
Initial value:
=
{
new Vector4( 1, 0, 0, 1 ),
new Vector4( 0, 1, 0, 1 ),
new Vector4( 0, 0, 1, 1 ),
new Vector4( 1, 1, 0, 1 ),
new Vector4( 0, 1, 1, 1 ),
new Vector4( 1, 0, 1, 1 ),
new Vector4( 0.5f, 0, 1, 1 ),
new Vector4( 0.5f, 1, 0, 1 ),
new Vector4( 1, 0, 0.5f, 1 ),
new Vector4( 0, 1, 0.5f, 1 ),
new Vector4( 1, 0.5f, 0, 1 ),
new Vector4( 0, 0.5f, 1, 1 ),
new Vector4( 0.5f, 1, 1, 1 ),
new Vector4( 1, 0.5f, 1, 1 ),
new Vector4( 1, 1, 0.5f, 1 ),
new Vector4( 0.5f, 0.5f, 1, 1 ),
}

Definition at line 263 of file MyClipmap.cs.

bool VRageRender.Voxels.MyClipmap.NeedsResetCache = false
static

Definition at line 57 of file MyClipmap.cs.

Dictionary<UInt64, MyClipmap_CellData> VRageRender.Voxels.MyClipmap.PendingCacheCellData = new Dictionary<UInt64, MyClipmap_CellData>()
staticprotected

Definition at line 59 of file MyClipmap.cs.

bool VRageRender.Voxels.MyClipmap.UseCache = true
static

Definition at line 56 of file MyClipmap.cs.

bool VRageRender.Voxels.MyClipmap.UseDithering = true
static

Definition at line 63 of file MyClipmap.cs.

bool VRageRender.Voxels.MyClipmap.UseLodCut = true
static

Definition at line 64 of file MyClipmap.cs.

bool VRageRender.Voxels.MyClipmap.UseQueries = true
static

Definition at line 65 of file MyClipmap.cs.

Property Documentation

uint VRageRender.Voxels.MyClipmap.Id
get

Definition at line 91 of file MyClipmap.cs.

float [][] VRageRender.Voxels.MyClipmap.LodRangeGroups
staticget

Definition at line 75 of file MyClipmap.Update.cs.

MatrixD VRageRender.Voxels.MyClipmap.WorldMatrix
get

Definition at line 68 of file MyClipmap.cs.


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