Class MySimpleObjectDraw
Inheritance
System.Object
MySimpleObjectDraw
Assembly: VRage.Game.dll
Syntax
public static class MySimpleObjectDraw : Object
Fields
ATTACHED_WIREFRAME_MAX_GRID_SIZE
Declaration
public static float ATTACHED_WIREFRAME_MAX_GRID_SIZE
Field Value
Type |
Description |
System.Single |
|
ATTACHED_WIREFRAME_MIN_GRID_SIZE
Declaration
public static float ATTACHED_WIREFRAME_MIN_GRID_SIZE
Field Value
Type |
Description |
System.Single |
|
Methods
DrawAttachedTransparentBox(ref MatrixD, ref BoundingBoxD, ref Color, UInt32, ref MatrixD, MySimpleObjectRasterizer, Int32, Single, Nullable<MyStringId>, Nullable<MyStringId>, Boolean)
Declaration
public static void DrawAttachedTransparentBox(ref MatrixD worldMatrix, ref BoundingBoxD localbox, ref Color color, uint renderObjectID, ref MatrixD worldToLocal, MySimpleObjectRasterizer rasterization, int wireDivideRatio, float lineWidth = 0.001F, Nullable<MyStringId> faceMaterial = null, Nullable<MyStringId> lineMaterial = null, bool onlyFrontFaces = false)
Parameters
DrawAttachedTransparentBox(ref MatrixD, ref BoundingBoxD, ref Color, UInt32, ref MatrixD, MySimpleObjectRasterizer, Vector3I, Single, Nullable<MyStringId>, Nullable<MyStringId>, Boolean, MyBillboard.BlendTypeEnum)
Declaration
public static void DrawAttachedTransparentBox(ref MatrixD worldMatrix, ref BoundingBoxD localbox, ref Color color, uint renderObjectID, ref MatrixD worldToLocal, MySimpleObjectRasterizer rasterization, Vector3I wireDivideRatio, float lineWidth = 0.001F, Nullable<MyStringId> faceMaterial = null, Nullable<MyStringId> lineMaterial = null, bool onlyFrontFaces = false, MyBillboard.BlendTypeEnum blendType)
Parameters
DrawLine(Vector3D, Vector3D, Nullable<MyStringId>, ref Vector4, Single, MyBillboard.BlendTypeEnum)
Declaration
public static void DrawLine(Vector3D start, Vector3D end, Nullable<MyStringId> material, ref Vector4 color, float thickness, MyBillboard.BlendTypeEnum blendtype)
Parameters
Type |
Name |
Description |
Vector3D |
start |
|
Vector3D |
end |
|
System.Nullable<MyStringId> |
material |
|
Vector4 |
color |
|
System.Single |
thickness |
|
VRageRender.MyBillboard.BlendTypeEnum |
blendtype |
|
DrawTransparentBox(ref MatrixD, ref BoundingBoxD, ref Color, MySimpleObjectRasterizer, Int32, Single, Nullable<MyStringId>, Nullable<MyStringId>, Boolean, Int32, MyBillboard.BlendTypeEnum, Single, List<MyBillboard>)
Declaration
public static void DrawTransparentBox(ref MatrixD worldMatrix, ref BoundingBoxD localbox, ref Color color, MySimpleObjectRasterizer rasterization, int wireDivideRatio, float lineWidth = 0.001F, Nullable<MyStringId> faceMaterial = null, Nullable<MyStringId> lineMaterial = null, bool onlyFrontFaces = false, int customViewProjection = -1, MyBillboard.BlendTypeEnum blendType, float intensity = 1F, List<MyBillboard> persistentBillboards = null)
Parameters
Type |
Name |
Description |
MatrixD |
worldMatrix |
|
BoundingBoxD |
localbox |
|
Color |
color |
|
MySimpleObjectRasterizer |
rasterization |
|
System.Int32 |
wireDivideRatio |
|
System.Single |
lineWidth |
|
System.Nullable<MyStringId> |
faceMaterial |
|
System.Nullable<MyStringId> |
lineMaterial |
|
System.Boolean |
onlyFrontFaces |
|
System.Int32 |
customViewProjection |
|
VRageRender.MyBillboard.BlendTypeEnum |
blendType |
|
System.Single |
intensity |
|
System.Collections.Generic.List<VRageRender.MyBillboard> |
persistentBillboards |
|
DrawTransparentBox(ref MatrixD, ref BoundingBoxD, ref Color, ref Color, MySimpleObjectRasterizer, Int32, Single, Nullable<MyStringId>, Nullable<MyStringId>, Boolean, Int32, MyBillboard.BlendTypeEnum, Single, List<MyBillboard>)
Declaration
public static void DrawTransparentBox(ref MatrixD worldMatrix, ref BoundingBoxD localbox, ref Color color, ref Color frontFaceColor, MySimpleObjectRasterizer rasterization, int wireDivideRatio, float lineWidth = 0.001F, Nullable<MyStringId> faceMaterial = null, Nullable<MyStringId> lineMaterial = null, bool onlyFrontFaces = false, int customViewProjection = -1, MyBillboard.BlendTypeEnum blendType, float intensity = 1F, List<MyBillboard> persistentBillboards = null)
Parameters
Type |
Name |
Description |
MatrixD |
worldMatrix |
|
BoundingBoxD |
localbox |
|
Color |
color |
|
Color |
frontFaceColor |
|
MySimpleObjectRasterizer |
rasterization |
|
System.Int32 |
wireDivideRatio |
|
System.Single |
lineWidth |
|
System.Nullable<MyStringId> |
faceMaterial |
|
System.Nullable<MyStringId> |
lineMaterial |
|
System.Boolean |
onlyFrontFaces |
|
System.Int32 |
customViewProjection |
|
VRageRender.MyBillboard.BlendTypeEnum |
blendType |
|
System.Single |
intensity |
|
System.Collections.Generic.List<VRageRender.MyBillboard> |
persistentBillboards |
|
DrawTransparentBox(ref MatrixD, ref BoundingBoxD, ref Color, ref Color, MySimpleObjectRasterizer, Vector3I, Single, Nullable<MyStringId>, Nullable<MyStringId>, Boolean, Int32, MyBillboard.BlendTypeEnum, Single, List<MyBillboard>)
Declaration
public static void DrawTransparentBox(ref MatrixD worldMatrix, ref BoundingBoxD localbox, ref Color color, ref Color frontFaceColor, MySimpleObjectRasterizer rasterization, Vector3I wireDivideRatio, float lineWidth = 0.001F, Nullable<MyStringId> faceMaterial = null, Nullable<MyStringId> lineMaterial = null, bool onlyFrontFaces = false, int customViewProjection = -1, MyBillboard.BlendTypeEnum blendType, float intensity = 1F, List<MyBillboard> persistentBillboards = null)
Parameters
Type |
Name |
Description |
MatrixD |
worldMatrix |
|
BoundingBoxD |
localbox |
|
Color |
color |
|
Color |
frontFaceColor |
|
MySimpleObjectRasterizer |
rasterization |
|
Vector3I |
wireDivideRatio |
|
System.Single |
lineWidth |
|
System.Nullable<MyStringId> |
faceMaterial |
|
System.Nullable<MyStringId> |
lineMaterial |
|
System.Boolean |
onlyFrontFaces |
|
System.Int32 |
customViewProjection |
|
VRageRender.MyBillboard.BlendTypeEnum |
blendType |
|
System.Single |
intensity |
|
System.Collections.Generic.List<VRageRender.MyBillboard> |
persistentBillboards |
|
DrawTransparentBox(ref MatrixD, ref BoundingBoxD, ref Color, ref Color, ref Color, ref Color, ref Color, ref Color, ref Color, MySimpleObjectRasterizer, Int32, Single, Nullable<MyStringId>, Nullable<MyStringId>, Boolean, Int32, MyBillboard.BlendTypeEnum, Single, List<MyBillboard>)
Declaration
public static void DrawTransparentBox(ref MatrixD worldMatrix, ref BoundingBoxD localbox, ref Color faceX_P, ref Color faceY_P, ref Color faceZ_P, ref Color faceX_N, ref Color faceY_N, ref Color faceZ_N, ref Color wire, MySimpleObjectRasterizer rasterization, int wireDivideRatio, float lineWidth = 0.001F, Nullable<MyStringId> faceMaterial = null, Nullable<MyStringId> lineMaterial = null, bool onlyFrontFaces = false, int customViewProjection = -1, MyBillboard.BlendTypeEnum blendType, float intensity = 1F, List<MyBillboard> persistentBillboards = null)
Parameters
Type |
Name |
Description |
MatrixD |
worldMatrix |
|
BoundingBoxD |
localbox |
|
Color |
faceX_P |
|
Color |
faceY_P |
|
Color |
faceZ_P |
|
Color |
faceX_N |
|
Color |
faceY_N |
|
Color |
faceZ_N |
|
Color |
wire |
|
MySimpleObjectRasterizer |
rasterization |
|
System.Int32 |
wireDivideRatio |
|
System.Single |
lineWidth |
|
System.Nullable<MyStringId> |
faceMaterial |
|
System.Nullable<MyStringId> |
lineMaterial |
|
System.Boolean |
onlyFrontFaces |
|
System.Int32 |
customViewProjection |
|
VRageRender.MyBillboard.BlendTypeEnum |
blendType |
|
System.Single |
intensity |
|
System.Collections.Generic.List<VRageRender.MyBillboard> |
persistentBillboards |
|
DrawTransparentBox(ref MatrixD, ref BoundingBoxD, ref Color, ref Color, ref Color, ref Color, ref Color, ref Color, ref Color, MySimpleObjectRasterizer, Vector3I, Single, Nullable<MyStringId>, Nullable<MyStringId>, Boolean, Int32, MyBillboard.BlendTypeEnum, Single, List<MyBillboard>)
Definitely not thread safe due to use shared temporary_faces to avoid reinitializations
Declaration
public static void DrawTransparentBox(ref MatrixD worldMatrix, ref BoundingBoxD localbox, ref Color faceX_P, ref Color faceY_P, ref Color faceZ_P, ref Color faceX_N, ref Color faceY_N, ref Color faceZ_N, ref Color wire, MySimpleObjectRasterizer rasterization, Vector3I wireDivideRatio, float lineWidth = 0.001F, Nullable<MyStringId> faceMaterial = null, Nullable<MyStringId> lineMaterial = null, bool onlyFrontFaces = false, int customViewProjection = -1, MyBillboard.BlendTypeEnum blendType, float intensity = 1F, List<MyBillboard> persistentBillboards = null)
Parameters
Type |
Name |
Description |
MatrixD |
worldMatrix |
|
BoundingBoxD |
localbox |
|
Color |
faceX_P |
|
Color |
faceY_P |
|
Color |
faceZ_P |
|
Color |
faceX_N |
|
Color |
faceY_N |
|
Color |
faceZ_N |
|
Color |
wire |
|
MySimpleObjectRasterizer |
rasterization |
|
Vector3I |
wireDivideRatio |
|
System.Single |
lineWidth |
|
System.Nullable<MyStringId> |
faceMaterial |
|
System.Nullable<MyStringId> |
lineMaterial |
|
System.Boolean |
onlyFrontFaces |
|
System.Int32 |
customViewProjection |
|
VRageRender.MyBillboard.BlendTypeEnum |
blendType |
|
System.Single |
intensity |
|
System.Collections.Generic.List<VRageRender.MyBillboard> |
persistentBillboards |
|
DrawTransparentCapsule(ref MatrixD, Single, Single, ref Color, Int32, Nullable<MyStringId>, Int32, MyBillboard.BlendTypeEnum)
Declaration
public static void DrawTransparentCapsule(ref MatrixD worldMatrix, float radius, float height, ref Color color, int wireDivideRatio, Nullable<MyStringId> faceMaterial = null, int customViewProjectionMatrix = -1, MyBillboard.BlendTypeEnum blendType)
Parameters
Type |
Name |
Description |
MatrixD |
worldMatrix |
|
System.Single |
radius |
|
System.Single |
height |
|
Color |
color |
|
System.Int32 |
wireDivideRatio |
|
System.Nullable<MyStringId> |
faceMaterial |
|
System.Int32 |
customViewProjectionMatrix |
|
VRageRender.MyBillboard.BlendTypeEnum |
blendType |
|
DrawTransparentCone(ref MatrixD, Single, Single, ref Color, Int32, Nullable<MyStringId>, Int32)
Declaration
public static void DrawTransparentCone(ref MatrixD worldMatrix, float radius, float height, ref Color color, int wireDivideRatio, Nullable<MyStringId> faceMaterial = null, int customViewProjectionMatrix = -1)
Parameters
Type |
Name |
Description |
MatrixD |
worldMatrix |
|
System.Single |
radius |
|
System.Single |
height |
|
Color |
color |
|
System.Int32 |
wireDivideRatio |
|
System.Nullable<MyStringId> |
faceMaterial |
|
System.Int32 |
customViewProjectionMatrix |
|
DrawTransparentCuboid(ref MatrixD, MyCuboid, ref Vector4, Boolean, Single, Nullable<MyStringId>)
Declaration
public static void DrawTransparentCuboid(ref MatrixD worldMatrix, MyCuboid cuboid, ref Vector4 vctColor, bool bWireFramed, float thickness, Nullable<MyStringId> lineMaterial = null)
Parameters
Type |
Name |
Description |
MatrixD |
worldMatrix |
|
MyCuboid |
cuboid |
|
Vector4 |
vctColor |
|
System.Boolean |
bWireFramed |
|
System.Single |
thickness |
|
System.Nullable<MyStringId> |
lineMaterial |
|
DrawTransparentCylinder(ref MatrixD, Single, Single, Single, ref Vector4, Boolean, Int32, Single, Nullable<MyStringId>)
Declaration
public static void DrawTransparentCylinder(ref MatrixD worldMatrix, float radius1, float radius2, float length, ref Vector4 vctColor, bool bWireFramed, int wireDivideRatio, float thickness, Nullable<MyStringId> lineMaterial = null)
Parameters
Type |
Name |
Description |
MatrixD |
worldMatrix |
|
System.Single |
radius1 |
|
System.Single |
radius2 |
|
System.Single |
length |
|
Vector4 |
vctColor |
|
System.Boolean |
bWireFramed |
|
System.Int32 |
wireDivideRatio |
|
System.Single |
thickness |
|
System.Nullable<MyStringId> |
lineMaterial |
|
DrawTransparentPyramid(ref Vector3D, ref MyQuad, ref Vector4, Int32, Single, Nullable<MyStringId>)
Declaration
public static void DrawTransparentPyramid(ref Vector3D start, ref MyQuad backQuad, ref Vector4 vctColor, int divideRatio, float thickness, Nullable<MyStringId> lineMaterial = null)
Parameters
Type |
Name |
Description |
Vector3D |
start |
|
MyQuad |
backQuad |
|
Vector4 |
vctColor |
|
System.Int32 |
divideRatio |
|
System.Single |
thickness |
|
System.Nullable<MyStringId> |
lineMaterial |
|
DrawTransparentRamp(ref MatrixD, ref BoundingBoxD, ref Color, Nullable<MyStringId>, Boolean, Int32, MyBillboard.BlendTypeEnum)
Declaration
public static void DrawTransparentRamp(ref MatrixD worldMatrix, ref BoundingBoxD localbox, ref Color color, Nullable<MyStringId> faceMaterial = null, bool onlyFrontFaces = false, int customViewProjection = -1, MyBillboard.BlendTypeEnum blendType)
Parameters
Type |
Name |
Description |
MatrixD |
worldMatrix |
|
BoundingBoxD |
localbox |
|
Color |
color |
|
System.Nullable<MyStringId> |
faceMaterial |
|
System.Boolean |
onlyFrontFaces |
|
System.Int32 |
customViewProjection |
|
VRageRender.MyBillboard.BlendTypeEnum |
blendType |
|
DrawTransparentRoundedCorner(ref MatrixD, ref BoundingBoxD, ref Color, Nullable<MyStringId>, Int32)
Declaration
public static void DrawTransparentRoundedCorner(ref MatrixD worldMatrix, ref BoundingBoxD localbox, ref Color color, Nullable<MyStringId> faceMaterial = null, int customViewProjection = -1)
Parameters
DrawTransparentSphere(List<Vector3D>, Single, ref Color, MySimpleObjectRasterizer, Nullable<MyStringId>, Nullable<MyStringId>, Single, Int32, List<MyBillboard>, MyBillboard.BlendTypeEnum, Single)
Declaration
public static void DrawTransparentSphere(List<Vector3D> verticesBuffer, float radius, ref Color color, MySimpleObjectRasterizer rasterization, Nullable<MyStringId> faceMaterial = null, Nullable<MyStringId> lineMaterial = null, float lineThickness = -1F, int customViewProjectionMatrix = -1, List<MyBillboard> persistentBillboards = null, MyBillboard.BlendTypeEnum blendType, float intensity = 1F)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<Vector3D> |
verticesBuffer |
|
System.Single |
radius |
|
Color |
color |
|
MySimpleObjectRasterizer |
rasterization |
|
System.Nullable<MyStringId> |
faceMaterial |
|
System.Nullable<MyStringId> |
lineMaterial |
|
System.Single |
lineThickness |
|
System.Int32 |
customViewProjectionMatrix |
|
System.Collections.Generic.List<VRageRender.MyBillboard> |
persistentBillboards |
|
VRageRender.MyBillboard.BlendTypeEnum |
blendType |
|
System.Single |
intensity |
|
DrawTransparentSphere(ref MatrixD, Single, ref Color, MySimpleObjectRasterizer, Int32, Nullable<MyStringId>, Nullable<MyStringId>, Single, Int32, List<MyBillboard>, MyBillboard.BlendTypeEnum, Single)
Declaration
public static void DrawTransparentSphere(ref MatrixD worldMatrix, float radius, ref Color color, MySimpleObjectRasterizer rasterization, int wireDivideRatio, Nullable<MyStringId> faceMaterial = null, Nullable<MyStringId> lineMaterial = null, float lineThickness = -1F, int customViewProjectionMatrix = -1, List<MyBillboard> persistentBillboards = null, MyBillboard.BlendTypeEnum blendType, float intensity = 1F)
Parameters
Type |
Name |
Description |
MatrixD |
worldMatrix |
|
System.Single |
radius |
|
Color |
color |
|
MySimpleObjectRasterizer |
rasterization |
|
System.Int32 |
wireDivideRatio |
|
System.Nullable<MyStringId> |
faceMaterial |
|
System.Nullable<MyStringId> |
lineMaterial |
|
System.Single |
lineThickness |
|
System.Int32 |
customViewProjectionMatrix |
|
System.Collections.Generic.List<VRageRender.MyBillboard> |
persistentBillboards |
|
VRageRender.MyBillboard.BlendTypeEnum |
blendType |
|
System.Single |
intensity |
|
FaceVisible(Vector3D, Vector3D)
Declaration
public static bool FaceVisible(Vector3D center, Vector3D normal)
Parameters
Returns
Type |
Description |
System.Boolean |
|
FaceVisibleRelative(Vector3D, Vector3D)
Declaration
public static bool FaceVisibleRelative(Vector3D center, Vector3D normal)
Parameters
Returns
Type |
Description |
System.Boolean |
|