Space Engineers
Classes | Public Member Functions | Protected Member Functions | Properties | List of all members
Sandbox.Engine.Voxels.MyPlanetStorageProvider Class Reference
Inheritance diagram for Sandbox.Engine.Voxels.MyPlanetStorageProvider:
Sandbox.Engine.Voxels.IMyStorageDataProvider

Classes

struct  SurfacePropertiesExtended
 

Public Member Functions

void WriteTo (System.IO.Stream stream)
 
void ReadFrom (ref MyOctreeStorage.ChunkHeader header, System.IO.Stream stream, ref bool isOldFormat)
 
void Init (long seed, MyPlanetGeneratorDefinition generator, double radius)
 
void Init (long seed, string generator, double radius)
 
void Close ()
 
void ReadRange (MyStorageData target, MyStorageDataTypeFlags dataType, ref Vector3I writeOffset, int lodIndex, ref Vector3I minInLod, ref Vector3I maxInLod)
 
float GetDistanceToPoint (ref Vector3D localPos)
 
MyVoxelMaterialDefinition GetMaterialAtPosition (ref Vector3D localPosition)
 
void ReadRange (ref MyVoxelDataRequest req)
 
ContainmentType Intersect (BoundingBoxI box, bool lazy)
 
bool Intersect (ref LineD line, out double startOffset, out double endOffset)
 
MyVoxelRequestFlags SupportedFlags ()
 
void DebugDraw (ref MatrixD worldMatrix)
 
void ReindexMaterials (Dictionary< byte, byte > oldToNewIndexMap)
 
void ComputeCombinedMaterialAndSurface (Vector3 position, bool useCache, out MySurfaceParams props)
 
void ComputeCombinedMaterialAndSurfaceExtended (Vector3 position, out SurfacePropertiesExtended props)
 
- Public Member Functions inherited from Sandbox.Engine.Voxels.IMyStorageDataProvider
void WriteTo (Stream stream)
 
void ReadFrom (ref MyOctreeStorage.ChunkHeader header, Stream stream, ref bool isOldFormat)
 

Protected Member Functions

void Init ()
 

Properties

MyPlanetGeneratorDefinition Generator [get]
 
int SerializedSize [get]
 
bool Closed [get]
 
MyPlanetShapeProvider Shape [get]
 
MyPlanetMaterialProvider Material [get]
 
Vector3I StorageSize [get]
 
float Radius [get]
 
bool ProvidesAmbient [get]
 
- Properties inherited from Sandbox.Engine.Voxels.IMyStorageDataProvider
int SerializedSize [get]
 
bool ProvidesAmbient [get]
 

Detailed Description

Definition at line 14 of file MyPlanetStorageProvider.cs.

Member Function Documentation

void Sandbox.Engine.Voxels.MyPlanetStorageProvider.Close ( )
inline
void Sandbox.Engine.Voxels.MyPlanetStorageProvider.ComputeCombinedMaterialAndSurface ( Vector3  position,
bool  useCache,
out MySurfaceParams  props 
)
inline

All mighty method for computing material, surface position and surface parameters in a single pass.

If material and surface position are required this is the best way to obtain that information.

When using the coefficient cache be sure to have it properly set up. (MyPlanetShapeProvider.PrepareCache())

Definition at line 345 of file MyPlanetStorageProvider.cs.

void Sandbox.Engine.Voxels.MyPlanetStorageProvider.ComputeCombinedMaterialAndSurfaceExtended ( Vector3  position,
out SurfacePropertiesExtended  props 
)
inline

All mighty method for computing material, surface position and surface parameters in a single pass.

If material and surface position are required this is the best way to obtain that information.

When using the coefficient cache be sure to have it properly set up. (MyPlanetShapeProvider.PrepareCache())

This versio provides extremelly detailed data about a surface position and should be used for debugging only.

Definition at line 423 of file MyPlanetStorageProvider.cs.

void Sandbox.Engine.Voxels.MyPlanetStorageProvider.DebugDraw ( ref MatrixD  worldMatrix)
inline
float Sandbox.Engine.Voxels.MyPlanetStorageProvider.GetDistanceToPoint ( ref Vector3D  localPos)
inline
MyVoxelMaterialDefinition Sandbox.Engine.Voxels.MyPlanetStorageProvider.GetMaterialAtPosition ( ref Vector3D  localPosition)
inline

Get the material at a given position in the voxel storage.

Position is in storage local space.

Implements Sandbox.Engine.Voxels.IMyStorageDataProvider.

Definition at line 206 of file MyPlanetStorageProvider.cs.

void Sandbox.Engine.Voxels.MyPlanetStorageProvider.Init ( long  seed,
MyPlanetGeneratorDefinition  generator,
double  radius 
)
inline

Definition at line 103 of file MyPlanetStorageProvider.cs.

void Sandbox.Engine.Voxels.MyPlanetStorageProvider.Init ( long  seed,
string  generator,
double  radius 
)
inline

Definition at line 123 of file MyPlanetStorageProvider.cs.

void Sandbox.Engine.Voxels.MyPlanetStorageProvider.Init ( )
inlineprotected

Definition at line 145 of file MyPlanetStorageProvider.cs.

ContainmentType Sandbox.Engine.Voxels.MyPlanetStorageProvider.Intersect ( BoundingBoxI  box,
bool  lazy 
)
inline
bool Sandbox.Engine.Voxels.MyPlanetStorageProvider.Intersect ( ref LineD  line,
out double  startOffset,
out double  endOffset 
)
inline

Intersect line with storage.

Returnas the tightest line interval that does intersect the storage. The precision of this method varies from storage to storage.

The offsets are normalised.

Implements Sandbox.Engine.Voxels.IMyStorageDataProvider.

Definition at line 263 of file MyPlanetStorageProvider.cs.

void Sandbox.Engine.Voxels.MyPlanetStorageProvider.ReadFrom ( ref MyOctreeStorage.ChunkHeader  header,
System.IO.Stream  stream,
ref bool  isOldFormat 
)
inline

Definition at line 57 of file MyPlanetStorageProvider.cs.

void Sandbox.Engine.Voxels.MyPlanetStorageProvider.ReadRange ( MyStorageData  target,
MyStorageDataTypeFlags  dataType,
ref Vector3I  writeOffset,
int  lodIndex,
ref Vector3I  minInLod,
ref Vector3I  maxInLod 
)
inline
void Sandbox.Engine.Voxels.MyPlanetStorageProvider.ReadRange ( ref MyVoxelDataRequest  request)
inline

Read range of data.

The data for the request, providing any optimizations that are requested in there.

Implements Sandbox.Engine.Voxels.IMyStorageDataProvider.

Definition at line 216 of file MyPlanetStorageProvider.cs.

void Sandbox.Engine.Voxels.MyPlanetStorageProvider.ReindexMaterials ( Dictionary< byte, byte >  oldToNewIndexMap)
inline
MyVoxelRequestFlags Sandbox.Engine.Voxels.MyPlanetStorageProvider.SupportedFlags ( )
inline

What optimizations this storage supports, the caller will never request for an optimization the storage does not support.

Implements Sandbox.Engine.Voxels.IMyStorageDataProvider.

Definition at line 281 of file MyPlanetStorageProvider.cs.

void Sandbox.Engine.Voxels.MyPlanetStorageProvider.WriteTo ( System.IO.Stream  stream)
inline

Definition at line 49 of file MyPlanetStorageProvider.cs.

Property Documentation

bool Sandbox.Engine.Voxels.MyPlanetStorageProvider.Closed
get

Definition at line 81 of file MyPlanetStorageProvider.cs.

MyPlanetGeneratorDefinition Sandbox.Engine.Voxels.MyPlanetStorageProvider.Generator
get

Definition at line 30 of file MyPlanetStorageProvider.cs.

MyPlanetMaterialProvider Sandbox.Engine.Voxels.MyPlanetStorageProvider.Material
get

Definition at line 90 of file MyPlanetStorageProvider.cs.

bool Sandbox.Engine.Voxels.MyPlanetStorageProvider.ProvidesAmbient
get

Definition at line 167 of file MyPlanetStorageProvider.cs.

float Sandbox.Engine.Voxels.MyPlanetStorageProvider.Radius
get

Definition at line 101 of file MyPlanetStorageProvider.cs.

int Sandbox.Engine.Voxels.MyPlanetStorageProvider.SerializedSize
get

Definition at line 36 of file MyPlanetStorageProvider.cs.

MyPlanetShapeProvider Sandbox.Engine.Voxels.MyPlanetStorageProvider.Shape
get

Definition at line 84 of file MyPlanetStorageProvider.cs.

Vector3I Sandbox.Engine.Voxels.MyPlanetStorageProvider.StorageSize
get

Definition at line 96 of file MyPlanetStorageProvider.cs.


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