Space Engineers
Public Member Functions | Properties | List of all members
VRage.ModAPI.IMyVoxelBase Interface Reference
Inheritance diagram for VRage.ModAPI.IMyVoxelBase:
VRage.ModAPI.IMyEntity VRage.Game.ModAPI.Interfaces.IMyDecalProxy VRage.Game.ModAPI.Ingame.IMyEntity Sandbox.Game.Entities.MyVoxelBase VRage.Game.ModAPI.IMyVoxelMap Sandbox.Game.Entities.MyPlanet Sandbox.Game.Entities.MyVoxelMap Sandbox.Game.Entities.MyVoxelMap

Public Member Functions

bool IsBoxIntersectingBoundingBoxOfThisVoxelMap (ref BoundingBoxD boundingBox)
 
bool AreAllAabbCornersInside (MatrixD aabbWorldTransform, BoundingBoxD aabb)
 Returns true if all corners of a boundingbox are inside a voxel. More...
 
bool IsAnyAabbCornerInside (MatrixD aabbWorldTransform, BoundingBoxD aabb)
 Returns true if all corners of a boundingbox are inside a voxel. More...
 
int CountCornersInside (MatrixD aabbWorldTransform, BoundingBoxD aabb)
 Returns the count of how many corners of a boundingbox are inside a voxel. More...
 
bool IsOverlapOverThreshold (BoundingBoxD worldAabb, float thresholdPercentage=0.9f)
 Returns true if the bounding box contains at least the specified amount (as a percent) of voxel material. More...
 
void VoxelCutoutSphere (Vector3D center, float radius, bool createDebris, bool damage)
 Cuts out the request volume from the voxel. More...
 
void VoxelOperationCapsule (Vector3D A, Vector3D B, float radius, MatrixD Transformation, byte material, OperationType operation)
 Perform voxel operation using a capsule shape. More...
 
void VoxelOperationBox (BoundingBoxD box, MatrixD Transformation, byte material, OperationType operation)
 Perform voxel operation using a box shape. More...
 
void VoxelOperationElipsoid (Vector3 radius, MatrixD Transformation, byte material, OperationType operation)
 Perform voxel operation using a ellipsoid shape. More...
 
void VoxelOperationRamp (BoundingBoxD box, Vector3D rampNormal, double rampNormalW, MatrixD Transformation, byte material, OperationType operation)
 Perform voxel operation using a ramp shape. More...
 
void VoxelOperationSphere (Vector3D center, float radius, byte material, OperationType operation)
 Perform voxel operation using a sphere shape. More...
 
void CreateMeteorCrater (Vector3D center, float radius, Vector3 normal, byte materialIdx)
 Creates a meteor crater on a voxel, depositing the specified material. Call on server. More...
 
- Public Member Functions inherited from VRage.ModAPI.IMyEntity
string GetFriendlyName ()
 
void Close ()
 
void Delete ()
 
MyObjectBuilder_EntityBase GetObjectBuilder (bool copy=false)
 
void BeforeSave ()
 
IMyEntity GetTopMostParent (Type type=null)
 
void SetLocalMatrix (VRageMath.Matrix localMatrix, object source=null)
 
void GetChildren (List< IMyEntity > children, Func< IMyEntity, bool > collect=null)
 
MyEntitySubpart GetSubpart (string name)
 
bool TryGetSubpart (string name, out MyEntitySubpart subpart)
 
VRageMath.Vector3 GetDiffuseColor ()
 
bool IsVisible ()
 
void DebugDraw ()
 
void DebugDrawInvalidTriangles ()
 
void EnableColorMaskForSubparts (bool enable)
 
void SetColorMaskForSubparts (VRageMath.Vector3 colorMaskHsv)
 
void SetEmissiveParts (string emissiveName, Color emissivePartColor, float emissivity)
 Sets the emissive value of a specific emissive material on entity. More...
 
void SetEmissivePartsForSubparts (string emissiveName, Color emissivePartColor, float emissivity)
 Sets the emissive value of a specific emissive material on all entity subparts. More...
 
float GetDistanceBetweenCameraAndBoundingSphere ()
 
float GetDistanceBetweenCameraAndPosition ()
 
float GetLargestDistanceBetweenCameraAndBoundingSphere ()
 
float GetSmallestDistanceBetweenCameraAndBoundingSphere ()
 
void OnRemovedFromScene (object source)
 
void OnAddedToScene (object source)
 
MatrixD GetViewMatrix ()
 
MatrixD GetWorldMatrixNormalizedInv ()
 
void SetWorldMatrix (VRageMath.MatrixD worldMatrix, object source=null)
 
void SetPosition (VRageMath.Vector3D pos)
 
bool GetIntersectionWithLine (ref LineD line, out VRage.Game.Models.MyIntersectionResultLineTriangleEx?tri, IntersectionFlags flags)
 
Vector3 GetIntersectionWithLineAndBoundingSphere (ref LineD line, float boundingSphereRadiusMultiplier)
 
bool GetIntersectionWithSphere (ref BoundingSphereD sphere)
 
void GetTrianglesIntersectingSphere (ref BoundingSphereD sphere, Vector3?referenceNormalVector, float?maxAngle, System.Collections.Generic.List< MyTriangle_Vertex_Normals > retTriangles, int maxNeighbourTriangles)
 
bool DoOverlapSphereTest (float sphereRadius, Vector3D spherePos)
 
void AddToGamePruningStructure ()
 
void RemoveFromGamePruningStructure ()
 
void UpdateGamePruningStructure ()
 
- Public Member Functions inherited from VRage.Game.ModAPI.Ingame.IMyEntity
VRageMath.Vector3D GetPosition ()
 
- Public Member Functions inherited from VRage.Game.ModAPI.Interfaces.IMyDecalProxy
void AddDecals (MyHitInfo hitInfo, MyStringHash source, object customdata, IMyDecalHandler decalHandler, MyStringHash material)
 
Parameters
hitInfoHithinfo on world coordinates
More...
 

Properties

IMyStorage Storage [get]
 
VRageMath.Vector3D PositionLeftBottomCorner [get]
 Position of left/bottom corner of this voxel map, in world space (not relative to sector) More...
 
IMyVoxelBase RootVoxel [get]
 Gets root voxel, for asteroids and planets itself. For MyVoxelPhysics, should return owning planet. More...
 
Matrix Orientation [get]
 
string StorageName [get]
 
Vector3I Size [get]
 Size of voxel map (in voxels) More...
 
Vector3 SizeInMetres [get]
 Size of voxel map (in metres) More...
 
Vector3I StorageMin [get]
 
Vector3I StorageMax [get]
 
- Properties inherited from VRage.ModAPI.IMyEntity
MyEntityComponentContainer Components [get]
 
MyPhysicsComponentBase Physics [get, set]
 
MyPositionComponentBase PositionComp [get, set]
 
MyRenderComponentBase Render [get, set]
 
MyEntityComponentBase GameLogic [get, set]
 
MyHierarchyComponentBase Hierarchy [get, set]
 
MySyncComponentBase SyncObject [get]
 
MyModStorageComponentBase Storage [get, set]
 Custom storage for mods. Shared with all mods. More...
 
EntityFlags Flags [get, set]
 
long EntityId [get, set]
 
string Name [get, set]
 
bool MarkedForClose [get]
 
bool Closed [get]
 
bool DebugAsyncLoading [get]
 
bool Save [get, set]
 
MyPersistentEntityFlags2 PersistentFlags [get, set]
 
MyEntityUpdateEnum NeedsUpdate [get, set]
 
IMyEntity Parent [get]
 
Matrix LocalMatrix [get, set]
 
bool NearFlag [get, set]
 
bool CastShadows [get, set]
 
bool FastCastShadowResolve [get, set]
 
bool NeedsResolveCastShadow [get, set]
 
float MaxGlassDistSq [get]
 
bool NeedsDraw [get, set]
 
bool NeedsDrawFromParent [get, set]
 
bool Transparent [get, set]
 
bool ShadowBoxLod [get, set]
 
bool SkipIfTooSmall [get, set]
 
bool Visible [get, set]
 
bool InScene [get, set]
 
bool InvalidateOnMove [get]
 
new VRageMath.MatrixD WorldMatrix [get, set]
 
VRageMath.MatrixD WorldMatrixInvScaled [get]
 
VRageMath.MatrixD WorldMatrixNormalizedInv [get]
 
bool IsVolumetric [get]
 
BoundingBox LocalAABB [get, set]
 
BoundingBox LocalAABBHr [get]
 
BoundingSphere LocalVolume [get, set]
 
Vector3 LocalVolumeOffset [get, set]
 
Vector3 LocationForHudMarker [get]
 
bool IsCCDForProjectiles [get]
 
string DisplayName [get, set]
 
- Properties inherited from VRage.Game.ModAPI.Ingame.IMyEntity
MyEntityComponentContainer Components [get]
 
long EntityId [get]
 
VRageMath.BoundingBoxD WorldAABB [get]
 
VRageMath.BoundingBoxD WorldAABBHr [get]
 
VRageMath.MatrixD WorldMatrix [get]
 
VRageMath.BoundingSphereD WorldVolume [get]
 
VRageMath.BoundingSphereD WorldVolumeHr [get]
 

Additional Inherited Members

- Events inherited from VRage.ModAPI.IMyEntity
Action< IMyEntityOnClose
 
Action< IMyEntityOnClosing
 
Action< IMyEntityOnMarkForClose
 
Action< IMyEntityOnPhysicsChanged
 

Detailed Description

Definition at line 7 of file IMyVoxelBase.cs.

Member Function Documentation

bool VRage.ModAPI.IMyVoxelBase.AreAllAabbCornersInside ( MatrixD  aabbWorldTransform,
BoundingBoxD  aabb 
)

Returns true if all corners of a boundingbox are inside a voxel.

Parameters
aabbWorldTransformVoxelMap transform
aabbArea to check
Returns
int VRage.ModAPI.IMyVoxelBase.CountCornersInside ( MatrixD  aabbWorldTransform,
BoundingBoxD  aabb 
)

Returns the count of how many corners of a boundingbox are inside a voxel.

Parameters
aabbWorldTransformVoxelMap transform
aabbArea to check
Returns
void VRage.ModAPI.IMyVoxelBase.CreateMeteorCrater ( Vector3D  center,
float  radius,
Vector3  normal,
byte  materialIdx 
)

Creates a meteor crater on a voxel, depositing the specified material. Call on server.

Parameters
center
radius
normalDirection crater opens (eg. towards meteor source)
materialIdxMaterial to deposit.
bool VRage.ModAPI.IMyVoxelBase.IsAnyAabbCornerInside ( MatrixD  aabbWorldTransform,
BoundingBoxD  aabb 
)

Returns true if all corners of a boundingbox are inside a voxel.

Parameters
aabbWorldTransformVoxelMap transform
aabbArea to check
Returns
bool VRage.ModAPI.IMyVoxelBase.IsBoxIntersectingBoundingBoxOfThisVoxelMap ( ref BoundingBoxD  boundingBox)
bool VRage.ModAPI.IMyVoxelBase.IsOverlapOverThreshold ( BoundingBoxD  worldAabb,
float  thresholdPercentage = 0.9f 
)

Returns true if the bounding box contains at least the specified amount (as a percent) of voxel material.

Parameters
worldAabb
thresholdPercentage
Returns

Implemented in Sandbox.Game.Entities.MyVoxelBase, and Sandbox.Game.Entities.MyVoxelMap.

void VRage.ModAPI.IMyVoxelBase.VoxelCutoutSphere ( Vector3D  center,
float  radius,
bool  createDebris,
bool  damage 
)

Cuts out the request volume from the voxel.

Parameters
center
radius
createDebris
damage
void VRage.ModAPI.IMyVoxelBase.VoxelOperationBox ( BoundingBoxD  box,
MatrixD  Transformation,
byte  material,
OperationType  operation 
)

Perform voxel operation using a box shape.

Parameters
box
Transformation
material
operation
void VRage.ModAPI.IMyVoxelBase.VoxelOperationCapsule ( Vector3D  A,
Vector3D  B,
float  radius,
MatrixD  Transformation,
byte  material,
OperationType  operation 
)

Perform voxel operation using a capsule shape.

Parameters
A
B
radius
Transformation
material
operation
void VRage.ModAPI.IMyVoxelBase.VoxelOperationElipsoid ( Vector3  radius,
MatrixD  Transformation,
byte  material,
OperationType  operation 
)

Perform voxel operation using a ellipsoid shape.

Parameters
radius
Transformation
material
operation
void VRage.ModAPI.IMyVoxelBase.VoxelOperationRamp ( BoundingBoxD  box,
Vector3D  rampNormal,
double  rampNormalW,
MatrixD  Transformation,
byte  material,
OperationType  operation 
)

Perform voxel operation using a ramp shape.

Parameters
box
rampNormal
rampNormalW
Transformation
material
operation
void VRage.ModAPI.IMyVoxelBase.VoxelOperationSphere ( Vector3D  center,
float  radius,
byte  material,
OperationType  operation 
)

Perform voxel operation using a sphere shape.

Parameters
center
radius
material
operation

Property Documentation

Matrix VRage.ModAPI.IMyVoxelBase.Orientation
get

Definition at line 24 of file IMyVoxelBase.cs.

VRageMath.Vector3D VRage.ModAPI.IMyVoxelBase.PositionLeftBottomCorner
get

Position of left/bottom corner of this voxel map, in world space (not relative to sector)

Definition at line 14 of file IMyVoxelBase.cs.

IMyVoxelBase VRage.ModAPI.IMyVoxelBase.RootVoxel
get

Gets root voxel, for asteroids and planets itself. For MyVoxelPhysics, should return owning planet.

Definition at line 22 of file IMyVoxelBase.cs.

Vector3I VRage.ModAPI.IMyVoxelBase.Size
get

Size of voxel map (in voxels)

Definition at line 34 of file IMyVoxelBase.cs.

Vector3 VRage.ModAPI.IMyVoxelBase.SizeInMetres
get

Size of voxel map (in metres)

Definition at line 39 of file IMyVoxelBase.cs.

IMyStorage VRage.ModAPI.IMyVoxelBase.Storage
get

Definition at line 9 of file IMyVoxelBase.cs.

Vector3I VRage.ModAPI.IMyVoxelBase.StorageMax
get

Definition at line 42 of file IMyVoxelBase.cs.

Vector3I VRage.ModAPI.IMyVoxelBase.StorageMin
get

Definition at line 41 of file IMyVoxelBase.cs.

string VRage.ModAPI.IMyVoxelBase.StorageName
get

Definition at line 27 of file IMyVoxelBase.cs.


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