C# 클래스 SEToolbox.Interop.Asteroids.MyVoxelMap

파일 보기 프로젝트 열기: midspace/SEToolbox 1 사용 예제들

공개 메소드들

메소드 설명
CalculateMaterialCellAssets ( IList &materialAssetList, long>.Dictionary &materialVoxelCells ) : void
Compress ( string sourceFilename, string destinationFilename ) : void
CountAssets ( long>.Dictionary assetCount ) : long>.Dictionary
CountAssets ( IList materialAssets ) : long>.Dictionary
ForceBaseMaterial ( string defaultMaterial, string materialName ) : void

This will replace all the materials inside the asteroid with specified material.

ForceShellMaterial ( string materialName, byte tgtThickness ) : void

Force the material of the outermost mixed voxcells to the given material

ForceVoxelFaceMaterial ( string materialName ) : void

Changes all the min and max face materials to a default to overcome the the hiding rare ore inside of nonrare ore.

GetMaterialAssetDetails ( string filename ) : long>.Dictionary
GetPreview ( string filename, Vector3I &size, BoundingBoxD &contentBounds, long &voxCells, bool &isValid ) : void
GetVoxelMaterialContent ( Vector3I &voxelCoord, string &materialName, byte &content ) : void
Init ( Vector3D position, Vector3I size, string material ) : void
IsVoxelMapFile ( string filename ) : bool

check for Magic Number: 1f 8b

Load ( string filename, string defaultMaterial ) : void
Load ( string filename, string defaultMaterial, bool loadMaterial ) : void
LoadUncompressed ( int initialVersion, Vector3D position, BinaryReader reader, string defaultMaterial, bool loadMaterial ) : void
LoadVoxelSize ( string filename ) : Vector3I

Loads the header details only for voxel files, without having to decompress the entire file.

RemoveContent ( ) : void
RemoveContent ( string materialName, string replaceFillMaterial ) : void
RemoveMaterial ( int xMin, int xMax, int yMin, int yMax, int zMin, int zMax ) : void
ReplaceMaterial ( string materialName, string replaceFillMaterial ) : void
Save ( int initialVersion, BinaryWriter writer, bool saveMaterialContent ) : void
Save ( string filename ) : void

Saves the asteroid to the specified filename.

SeedMaterialSphere ( string materialName, byte radius ) : void

Set a material for a random voxel cell and possibly nearest ones to it.

SetMaterialAssets ( IList materialsList ) : void
SetVoxelContentRegion ( byte content, int xMin, int xMax, int yMin, int yMax, int zMin, int zMax ) : void
SetVoxelMaterialAndIndestructibleContent ( string materialName, byte indestructibleContent, Vector3I &voxelCoord ) : void
SetVoxelMaterialRegion ( string materialName, Vector3I &cellCoord ) : void

Change the material of the voxel cell with the given coordinates

SumFullCells ( ) : long
SumPartCells ( ) : long
SumVoxelCells ( ) : long
Uncompress ( string sourceFilename, int numberBytes ) : byte[]
Uncompress ( string sourceFilename, string destinationFilename ) : void
UpdateContentBounds ( ) : void

비공개 메소드들

메소드 설명
AddCell ( Vector3I &cellCoord ) : MyVoxelContentCell
CheckCellType ( MyVoxelContentCell &cell, MyVoxelCellType type ) : bool

Check the given cell type against a possible cell contents state (full, empty, mixed)

CheckIfCellChangedToFull ( MyVoxelContentCell voxelCell, Vector3I &cellCoord ) : void
CheckVoxelCoord ( Vector3I &cellCoord ) : bool
GetCell ( Vector3I &cellCoord ) : MyVoxelContentCell
GetDataCellCoordinate ( Vector3I &voxelCoord ) : Vector3I
GetVoxelContent ( Vector3I &voxelCoord ) : byte
GetVoxelCoordinatesInDataCell ( Vector3I &voxelCoord ) : Vector3I
InitVoxelMap ( Vector3D position, Vector3I size, string materialName, bool defineMemory ) : void
IsVoxelAtBorder ( Vector3I &voxelCoord ) : bool
LoadUncompressedV1 ( BinaryReader reader, bool loadMaterial ) : void
LoadUncompressedV2 ( BinaryReader reader, bool loadMaterial, int materialBaseCount ) : void
SaveV1 ( BinaryWriter writer, bool saveMaterialContent ) : void
SaveV2 ( BinaryWriter writer, bool saveMaterialContent ) : void
SetVoxelContent ( byte content, Vector3I &voxelCoord, bool needLock = true ) : void

메소드 상세

CalculateMaterialCellAssets() 공개 메소드

public CalculateMaterialCellAssets ( IList &materialAssetList, long>.Dictionary &materialVoxelCells ) : void
materialAssetList IList
materialVoxelCells long>.Dictionary
리턴 void

Compress() 공개 정적인 메소드

public static Compress ( string sourceFilename, string destinationFilename ) : void
sourceFilename string
destinationFilename string
리턴 void

CountAssets() 공개 메소드

public CountAssets ( long>.Dictionary assetCount ) : long>.Dictionary
assetCount long>.Dictionary
리턴 long>.Dictionary

CountAssets() 공개 메소드

public CountAssets ( IList materialAssets ) : long>.Dictionary
materialAssets IList
리턴 long>.Dictionary

ForceBaseMaterial() 공개 메소드

This will replace all the materials inside the asteroid with specified material.
public ForceBaseMaterial ( string defaultMaterial, string materialName ) : void
defaultMaterial string
materialName string
리턴 void

ForceShellMaterial() 공개 메소드

Force the material of the outermost mixed voxcells to the given material
public ForceShellMaterial ( string materialName, byte tgtThickness ) : void
materialName string
tgtThickness byte
리턴 void

ForceVoxelFaceMaterial() 공개 메소드

Changes all the min and max face materials to a default to overcome the the hiding rare ore inside of nonrare ore.
public ForceVoxelFaceMaterial ( string materialName ) : void
materialName string
리턴 void

GetMaterialAssetDetails() 공개 정적인 메소드

public static GetMaterialAssetDetails ( string filename ) : long>.Dictionary
filename string
리턴 long>.Dictionary

GetPreview() 공개 정적인 메소드

public static GetPreview ( string filename, Vector3I &size, BoundingBoxD &contentBounds, long &voxCells, bool &isValid ) : void
filename string
size Vector3I
contentBounds BoundingBoxD
voxCells long
isValid bool
리턴 void

GetVoxelMaterialContent() 공개 메소드

public GetVoxelMaterialContent ( Vector3I &voxelCoord, string &materialName, byte &content ) : void
voxelCoord Vector3I
materialName string
content byte
리턴 void

Init() 공개 메소드

public Init ( Vector3D position, Vector3I size, string material ) : void
position Vector3D
size Vector3I
material string
리턴 void

IsVoxelMapFile() 공개 정적인 메소드

check for Magic Number: 1f 8b
public static IsVoxelMapFile ( string filename ) : bool
filename string
리턴 bool

Load() 공개 메소드

public Load ( string filename, string defaultMaterial ) : void
filename string
defaultMaterial string
리턴 void

Load() 공개 메소드

public Load ( string filename, string defaultMaterial, bool loadMaterial ) : void
filename string
defaultMaterial string
loadMaterial bool
리턴 void

LoadUncompressed() 공개 메소드

public LoadUncompressed ( int initialVersion, Vector3D position, BinaryReader reader, string defaultMaterial, bool loadMaterial ) : void
initialVersion int
position Vector3D
reader System.IO.BinaryReader
defaultMaterial string
loadMaterial bool
리턴 void

LoadVoxelSize() 공개 정적인 메소드

Loads the header details only for voxel files, without having to decompress the entire file.
public static LoadVoxelSize ( string filename ) : Vector3I
filename string
리턴 Vector3I

RemoveContent() 공개 메소드

public RemoveContent ( ) : void
리턴 void

RemoveContent() 공개 메소드

public RemoveContent ( string materialName, string replaceFillMaterial ) : void
materialName string
replaceFillMaterial string
리턴 void

RemoveMaterial() 공개 메소드

public RemoveMaterial ( int xMin, int xMax, int yMin, int yMax, int zMin, int zMax ) : void
xMin int
xMax int
yMin int
yMax int
zMin int
zMax int
리턴 void

ReplaceMaterial() 공개 메소드

public ReplaceMaterial ( string materialName, string replaceFillMaterial ) : void
materialName string
replaceFillMaterial string
리턴 void

Save() 공개 메소드

public Save ( int initialVersion, BinaryWriter writer, bool saveMaterialContent ) : void
initialVersion int
writer System.IO.BinaryWriter
saveMaterialContent bool
리턴 void

Save() 공개 메소드

Saves the asteroid to the specified filename.
public Save ( string filename ) : void
filename string the file extension indicates the version of file been saved.
리턴 void

SeedMaterialSphere() 공개 메소드

Set a material for a random voxel cell and possibly nearest ones to it.
public SeedMaterialSphere ( string materialName, byte radius ) : void
materialName string material name
radius byte radius in voxels, defaults to zero, meaning only a random grid.
리턴 void

SetMaterialAssets() 공개 메소드

public SetMaterialAssets ( IList materialsList ) : void
materialsList IList
리턴 void

SetVoxelContentRegion() 공개 메소드

public SetVoxelContentRegion ( byte content, int xMin, int xMax, int yMin, int yMax, int zMin, int zMax ) : void
content byte
xMin int
xMax int
yMin int
yMax int
zMin int
zMax int
리턴 void

SetVoxelMaterialAndIndestructibleContent() 공개 메소드

public SetVoxelMaterialAndIndestructibleContent ( string materialName, byte indestructibleContent, Vector3I &voxelCoord ) : void
materialName string
indestructibleContent byte
voxelCoord Vector3I
리턴 void

SetVoxelMaterialRegion() 공개 메소드

Change the material of the voxel cell with the given coordinates
public SetVoxelMaterialRegion ( string materialName, Vector3I &cellCoord ) : void
materialName string The material name to set the cell to
cellCoord Vector3I Cell coordinates vector (internal)
리턴 void

SumFullCells() 공개 메소드

public SumFullCells ( ) : long
리턴 long

SumPartCells() 공개 메소드

public SumPartCells ( ) : long
리턴 long

SumVoxelCells() 공개 메소드

public SumVoxelCells ( ) : long
리턴 long

Uncompress() 공개 정적인 메소드

public static Uncompress ( string sourceFilename, int numberBytes ) : byte[]
sourceFilename string
numberBytes int
리턴 byte[]

Uncompress() 공개 정적인 메소드

public static Uncompress ( string sourceFilename, string destinationFilename ) : void
sourceFilename string
destinationFilename string
리턴 void

UpdateContentBounds() 공개 메소드

public UpdateContentBounds ( ) : void
리턴 void