Class LineBatch3D
The 3D line batch.
Inherited Members
Namespace: Evergine.Framework.Graphics
Assembly: Evergine.Framework.dll
Syntax
public class LineBatch3D : LineBatch
Constructors
LineBatch3D(GraphicsContext, RenderLayerDescription)
Initializes a new instance of the LineBatch3D class.
Declaration
public LineBatch3D(GraphicsContext graphicsContext, RenderLayerDescription renderLayerDescription)
Parameters
Type | Name | Description |
---|---|---|
GraphicsContext | graphicsContext | The graphics context. |
RenderLayerDescription | renderLayerDescription | The render layer description. |
Methods
DrawArc(ref Vector3, float, float, ref Color)
Draws an arc.
Declaration
public void DrawArc(ref Vector3 center, float radius, float percentage, ref Color color)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | center | The circle's center. |
float | radius | The circle's radius. |
float | percentage | The percentage of the circle to draw (from 0f to 1f). |
Color | color | The circle's color. |
DrawArc(ref Vector3, float, float, ref Matrix4x4, ref Color)
Draws an arc.
Declaration
public void DrawArc(ref Vector3 center, float radius, float percentage, ref Matrix4x4 transform, ref Color color)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | center | The center. |
float | radius | The radius. |
float | percentage | The percentage of the circle to draw (from 0f to 1f). |
Matrix4x4 | transform | The transform. |
Color | color | The color. |
DrawAxis(Matrix4x4, float)
Draws three vectors representing the X, Y, and Z axes in a given transform.
Declaration
public void DrawAxis(Matrix4x4 transform, float size)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | transform | The transform matrix. |
float | size | The size of the lines representing the axis vectors. |
Remarks
Note that Forward is equivalent to the -Z axis. If Forward representation is needed, use DrawForward(Matrix4x4, float) instead.
DrawAxis(ref Matrix4x4, float)
Draws three vectors representing the X, Y, and Z axes in a given transform.
Declaration
public void DrawAxis(ref Matrix4x4 transform, float size)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | transform | The transform matrix. |
float | size | The size of the lines representing the axis vectors. |
Remarks
Note that Forward is equivalent to the -Z axis. If a Forward representation is needed, use DrawForward(ref Matrix4x4, float) instead.
DrawBoundingBox(BoundingBox, Color)
Draws the bounding box.
Declaration
public void DrawBoundingBox(BoundingBox boundingBox, Color color)
Parameters
Type | Name | Description |
---|---|---|
BoundingBox | boundingBox | The bounding box. |
Color | color | The color. |
DrawBoundingBox(ref BoundingBox, ref Color)
Draws the bounding box.
Declaration
public void DrawBoundingBox(ref BoundingBox boundingBox, ref Color color)
Parameters
Type | Name | Description |
---|---|---|
BoundingBox | boundingBox | The bounding box. |
Color | color | The color. |
DrawBoundingFrustum(BoundingFrustum, Color)
Draws the bounding frustum.
Declaration
public void DrawBoundingFrustum(BoundingFrustum boundingFrustum, Color color)
Parameters
Type | Name | Description |
---|---|---|
BoundingFrustum | boundingFrustum | The bounding frustum. |
Color | color | The color. |
DrawBoundingFrustum(ref BoundingFrustum, ref Color)
Draws the bounding frustum.
Declaration
public void DrawBoundingFrustum(ref BoundingFrustum boundingFrustum, ref Color color)
Parameters
Type | Name | Description |
---|---|---|
BoundingFrustum | boundingFrustum | The bounding frustum. |
Color | color | The color. |
DrawBoundingOrientedBox(BoundingOrientedBox, Color)
Draws the bounding oriented box.
Declaration
public void DrawBoundingOrientedBox(BoundingOrientedBox boundingOrientedBox, Color color)
Parameters
Type | Name | Description |
---|---|---|
BoundingOrientedBox | boundingOrientedBox | The bounding oriented box. |
Color | color | The color. |
DrawBoundingOrientedBox(ref BoundingOrientedBox, ref Color)
Draws the bounding oriented box.
Declaration
public void DrawBoundingOrientedBox(ref BoundingOrientedBox boundingOrientedBox, ref Color color)
Parameters
Type | Name | Description |
---|---|---|
BoundingOrientedBox | boundingOrientedBox | The bounding oriented box. |
Color | color | The color. |
DrawBoundingSphere(BoundingSphere, Color)
Draws the bounding sphere.
Declaration
public void DrawBoundingSphere(BoundingSphere boundingSphere, Color color)
Parameters
Type | Name | Description |
---|---|---|
BoundingSphere | boundingSphere | The bounding sphere. |
Color | color | The color. |
DrawBoundingSphere(BoundingSphere, Matrix4x4, Color)
Draws the bounding sphere.
Declaration
public void DrawBoundingSphere(BoundingSphere boundingSphere, Matrix4x4 transform, Color color)
Parameters
Type | Name | Description |
---|---|---|
BoundingSphere | boundingSphere | The bounding sphere. |
Matrix4x4 | transform | The transformation. |
Color | color | The color. |
DrawBoundingSphere(ref BoundingSphere, ref Color)
Draws the bounding sphere.
Declaration
public void DrawBoundingSphere(ref BoundingSphere boundingSphere, ref Color color)
Parameters
Type | Name | Description |
---|---|---|
BoundingSphere | boundingSphere | The bounding sphere. |
Color | color | The color. |
DrawBoundingSphere(ref BoundingSphere, ref Matrix4x4, ref Color)
Draws the bounding sphere.
Declaration
public void DrawBoundingSphere(ref BoundingSphere boundingSphere, ref Matrix4x4 transform, ref Color color)
Parameters
Type | Name | Description |
---|---|---|
BoundingSphere | boundingSphere | The bounding sphere. |
Matrix4x4 | transform | The transformation. |
Color | color | The color. |
DrawCircle(Vector3, float, Color)
Draws a circle.
Declaration
public void DrawCircle(Vector3 center, float radius, Color color)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | center | The center point of the circle. |
float | radius | The radius of the circle. |
Color | color | The color of the circle. |
DrawCircle(Vector3, float, Matrix4x4, Color)
Draws the circle.
Declaration
public void DrawCircle(Vector3 center, float radius, Matrix4x4 transform, Color color)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | center | The center point of the circle. |
float | radius | The radius of the circle. |
Matrix4x4 | transform | The transformation applied to the circle. |
Color | color | The color of the circle. |
DrawCircle(ref Vector3, float, ref Color)
Draws the circle.
Declaration
public void DrawCircle(ref Vector3 center, float radius, ref Color color)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | center | The center of the circle. |
float | radius | The radius of the circle. |
Color | color | The color of the circle. |
DrawCircle(ref Vector3, float, ref Matrix4x4, ref Color)
Draws the circle.
Declaration
public void DrawCircle(ref Vector3 center, float radius, ref Matrix4x4 transform, ref Color color)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | center | The center of the circle. |
float | radius | The radius of the circle. |
Matrix4x4 | transform | The transformation to be applied. |
Color | color | The color to use when drawing. |
DrawCone(float, float, Vector3, Vector3, Color)
Draws a cone.
Declaration
public void DrawCone(float radius, float height, Vector3 position, Vector3 forward, Color color)
Parameters
Type | Name | Description |
---|---|---|
float | radius | The radius of the cone. |
float | height | The height of the cone. |
Vector3 | position | The position of the cone. |
Vector3 | forward | The direction the cone is facing. |
Color | color | The color of the cone. |
DrawCone(float, float, ref Vector3, ref Vector3, ref Color)
Draws a cone.
Declaration
public void DrawCone(float radius, float height, ref Vector3 position, ref Vector3 forward, ref Color color)
Parameters
Type | Name | Description |
---|---|---|
float | radius | The radius of the cone. |
float | height | The height of the cone. |
Vector3 | position | The position of the cone. |
Vector3 | forward | The forward direction of the cone. |
Color | color | The color of the cone. |
DrawCube(Vector3, Vector3, Color)
Draws the cube.
Declaration
public void DrawCube(Vector3 min, Vector3 max, Color color)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | min | The minimum value. |
Vector3 | max | The maximum value. |
Color | color | The color. |
DrawCube(Vector3, Vector3, Matrix4x4, Color)
Draws the cube.
Declaration
public void DrawCube(Vector3 min, Vector3 max, Matrix4x4 transform, Color color)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | min | The minimum. |
Vector3 | max | The maximum. |
Matrix4x4 | transform | The transformation. |
Color | color | The color. |
DrawCube(ref Vector3, ref Vector3, ref Color)
Draws the cube.
Declaration
public void DrawCube(ref Vector3 min, ref Vector3 max, ref Color color)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | min | The minimum value. |
Vector3 | max | The maximum value. |
Color | color | The color. |
DrawCube(ref Vector3, ref Vector3, ref Matrix4x4, ref Color)
Draws the cube.
Declaration
public void DrawCube(ref Vector3 min, ref Vector3 max, ref Matrix4x4 transform, ref Color color)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | min | The minimum. |
Vector3 | max | The maximum. |
Matrix4x4 | transform | The transformation. |
Color | color | The color. |
DrawForward(Matrix4x4, float)
Declaration
public void DrawForward(Matrix4x4 transform, float size)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | transform | The transform matrix. |
float | size | The size of the lines representing the forward and up vectors. |
DrawForward(ref Matrix4x4, float)
Declaration
public void DrawForward(ref Matrix4x4 transform, float size)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | transform | The transform matrix. |
float | size | The size of the lines representing the forward and up vectors. |
DrawPoint(Vector3, Matrix4x4, float, Color)
Draws the point.
Declaration
public void DrawPoint(Vector3 position, Matrix4x4 matrix, float size, Color color)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | position | The position of the point. |
Matrix4x4 | matrix | The transformation matrix. |
float | size | The size of the point. |
Color | color | The color of the point. |
DrawPoint(Vector3, float, Color)
Draws the point.
Declaration
public void DrawPoint(Vector3 position, float size, Color color)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | position | The position of the point. |
float | size | The size of the point. |
Color | color | The color of the point. |
DrawPoint(ref Vector3, ref Matrix4x4, float, ref Color)
Draws the point.
Declaration
public void DrawPoint(ref Vector3 position, ref Matrix4x4 matrix, float size, ref Color color)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | position | The position of the point. |
Matrix4x4 | matrix | The transformation matrix. |
float | size | The size of the point. |
Color | color | The color of the point. |
DrawPoint(ref Vector3, float, ref Color)
Draws the point.
Declaration
public void DrawPoint(ref Vector3 position, float size, ref Color color)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | position | The position of the point. |
float | size | The size of the point. |
Color | color | The color of the point. |
DrawRay(ref Ray, ref Color)
Draws a ray.
Declaration
public void DrawRay(ref Ray ray, ref Color color)
Parameters
Type | Name | Description |
---|---|---|
Ray | ray | The ray to draw. |
Color | color | The color of the ray. |
DrawRay(Vector3, Vector3, Color)
Draws a ray.
Declaration
public void DrawRay(Vector3 position, Vector3 direction, Color color)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | position | The point. |
Vector3 | direction | The direction. |
Color | color | The color. |
DrawRay(ref Vector3, ref Vector3, ref Color)
Draws a ray.
Declaration
public void DrawRay(ref Vector3 position, ref Vector3 direction, ref Color color)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | position | The point. |
Vector3 | direction | The direction. |
Color | color | The color. |
DrawRectangle(Vector3, Vector3, Color)
Draws the rectangle.
Declaration
public void DrawRectangle(Vector3 min, Vector3 max, Color color)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | min | The minimum value. |
Vector3 | max | The maximum value. |
Color | color | The color. |
DrawRectangle(Vector3, Vector3, Matrix4x4, Color)
Draws the rectangle.
Declaration
public void DrawRectangle(Vector3 min, Vector3 max, Matrix4x4 transform, Color color)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | min | The minimum value. |
Vector3 | max | The maximum value. |
Matrix4x4 | transform | The transformation. |
Color | color | The color. |
DrawRectangle(ref Vector3, ref Vector3, ref Color)
Draws the rectangle.
Declaration
public void DrawRectangle(ref Vector3 min, ref Vector3 max, ref Color color)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | min | The minimum point. |
Vector3 | max | The maximum point. |
Color | color | The color. |
DrawRectangle(ref Vector3, ref Vector3, ref Matrix4x4, ref Color)
Draws the rectangle.
Declaration
public void DrawRectangle(ref Vector3 min, ref Vector3 max, ref Matrix4x4 transform, ref Color color)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | min | The minimum value. |
Vector3 | max | The maximum value. |
Matrix4x4 | transform | The transformation applied. |
Color | color | The color. |
DrawTriangle(Vector3, Vector3, Vector3, Color)
Draws the triangle.
Declaration
public void DrawTriangle(Vector3 a, Vector3 b, Vector3 c, Color color)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | a | Vertex A. |
Vector3 | b | Vertex B. |
Vector3 | c | Vertex C. |
Color | color | The color. |
DrawTriangle(Vector3, Vector3, Vector3, Matrix4x4, Color)
Draws the triangle.
Declaration
public void DrawTriangle(Vector3 a, Vector3 b, Vector3 c, Matrix4x4 transform, Color color)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | a | Vertex A. |
Vector3 | b | Vertex B. |
Vector3 | c | Vertex C. |
Matrix4x4 | transform | The transformation matrix. |
Color | color | The color. |
DrawTriangle(ref Vector3, ref Vector3, ref Vector3, ref Color)
Draws the triangle.
Declaration
public void DrawTriangle(ref Vector3 a, ref Vector3 b, ref Vector3 c, ref Color color)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | a | Vertex A. |
Vector3 | b | Vertex B. |
Vector3 | c | Vertex C. |
Color | color | The color. |
DrawTriangle(ref Vector3, ref Vector3, ref Vector3, ref Matrix4x4, ref Color)
Draws the triangle.
Declaration
public void DrawTriangle(ref Vector3 a, ref Vector3 b, ref Vector3 c, ref Matrix4x4 transform, ref Color color)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | a | Vertex A. |
Vector3 | b | Vertex B. |
Vector3 | c | Vertex C. |
Matrix4x4 | transform | The transformation. |
Color | color | The color. |