A line in 3D space. Just a start and end point plus a color, but you can add more points.
View code on GitHub
Inheritance Hierarchy
DeltaEngine.Entities Entity
DeltaEngine.Entities DrawableEntity
DeltaEngine.Rendering3D Entity3D
DeltaEngine.Rendering3D.Shapes Line3D
Namespace: DeltaEngine.Rendering3D.Shapes
Assembly: DeltaEngine.Rendering3D.Shapes (in DeltaEngine.Rendering3D.Shapes.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The Line3D type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() | Line3D | Initializes a new instance of the Line3D class |
Methods
Fields
Name | Description | |
---|---|---|
![]() | components | (Inherited from Entity.) |
![]() | lastOrientation | (Inherited from Entity3D.) |
![]() | lastPosition | (Inherited from Entity3D.) |
![]() | lastTickLerpComponents |
Each element can either be a Lerp, a Lerp List or an array of Lerp objects.
View code on GitHub (Inherited from DrawableEntity.) |
Properties
Name | Description | |
---|---|---|
![]() | EndPoint | |
![]() | IsActive | (Inherited from DrawableEntity.) |
![]() | IsPauseable | (Inherited from Entity.) |
![]() | IsVisible | (Inherited from DrawableEntity.) |
![]() | NumberOfComponents | (Inherited from Entity.) |
![]() | Orientation | (Inherited from Entity3D.) |
![]() | Points | |
![]() | Position | (Inherited from Entity3D.) |
![]() | RenderLayer | (Inherited from DrawableEntity.) |
![]() | Scale | (Inherited from Entity3D.) |
![]() | StartPoint | |
![]() | UpdatePriority | (Inherited from Entity.) |
Remarks
Examples
[Test] public void RenderCoordinateSystemCross() { CreateLookAtCamera(Vector3D.One * 4.0f, Vector3D.Zero); new Line3D(-Vector3D.UnitX, Vector3D.UnitX * 3, Color.Red); new Line3D(-Vector3D.UnitY, Vector3D.UnitY * 3, Color.Green); new Line3D(-Vector3D.UnitZ, Vector3D.UnitZ * 3, Color.Blue); }
[Test] public void RenderGrid() { const int GridSize = 10; const float GridScale = 0.5f; const float HalfGridSize = GridSize * 0.5f; var axisXz = new Vector2D(-HalfGridSize, -HalfGridSize); CreateLookAtCamera(Vector3D.One * 4.0f, Vector3D.Zero); for (int i = 0; i <= GridSize; i++, axisXz.X += 1, axisXz.Y += 1) { new Line3D(new Vector3D(-HalfGridSize * GridScale, axisXz.Y * GridScale, 0.0f), new Vector3D(HalfGridSize * GridScale, axisXz.Y * GridScale, 0.0f), Color.White); new Line3D(new Vector3D(axisXz.X * GridScale, -HalfGridSize * GridScale, 0.0f), new Vector3D(axisXz.X * GridScale, HalfGridSize * GridScale, 0.0f), Color.White); } }
[Test] public void RenderRedLine() { CreateLookAtCamera(Vector3D.UnitY, Vector3D.Zero); new Line3D(-Vector3D.UnitX, Vector3D.UnitX, Color.Red); }
See Also