Class LineBuilder
- Namespace
- HelixToolkit.SharpDX
- Assembly
- HelixToolkit.SharpDX.dll
public class LineBuilder
- Inheritance
-
LineBuilder
- Inherited Members
Constructors
LineBuilder()
public LineBuilder()
Methods
Add(bool, params Vector3[])
public void Add(bool isClosed, params Vector3[] points)
Parameters
AddBox(Vector3, double, double, double)
public void AddBox(Vector3 center, double xlength, double ylength, double zlength)
Parameters
AddCircle(Vector3, Vector3, float, int)
Adds the circle.
public void AddCircle(Vector3 position, Vector3 normal, float radius, int segments)
Parameters
positionVector3The position.
normalVector3The normal.
radiusfloatThe radius.
segmentsintThe segments.
AddGrid(BoxFaces, int, int, float, float)
public void AddGrid(BoxFaces plane, int columns, int rows, float width, float height)
Parameters
AddLine(Vector3, Vector3)
public void AddLine(Vector3 p1, Vector3 p2)
Parameters
Clear()
Removes all the data from the current LineBuilder instance.
public void Clear()
GenerateBoundingBox(BoundingBox)
Returns a line geometry of the axis-aligned bounding-box.
public static LineGeometry3D GenerateBoundingBox(BoundingBox bb)
Parameters
bbBoundingBoxThe bounding-box
Returns
GenerateBoundingBox(Geometry3D)
Returns a line geometry of the axis-aligned bounding-box of the given mesh.
public static LineGeometry3D GenerateBoundingBox(Geometry3D mesh)
Parameters
meshGeometry3DInput mesh for the computation of the b-box
Returns
GenerateBoundingBox(Vector3[])
Returns a line geometry of the axis-aligned bounding-box of the given mesh.
public static LineGeometry3D GenerateBoundingBox(Vector3[] points)
Parameters
pointsVector3[]Input points for the computation of the b-box
Returns
GenerateCircle(Plane, float, int)
Generates the circle.
public static LineGeometry3D GenerateCircle(Plane plane, float radius, int segments)
Parameters
Returns
GenerateCircle(Vector3, float, int)
public static LineGeometry3D GenerateCircle(Vector3 plane, float radius, int segments)
Parameters
Returns
GenerateGrid(int)
Generates a square grid with a step of 1.0
public static LineGeometry3D GenerateGrid(int width = 10)
Parameters
widthint
Returns
GenerateGrid(Vector3, int, int)
Generates a square grid with a step of 1.0
public static LineGeometry3D GenerateGrid(Vector3 plane, int min = 0, int max = 10)
Parameters
Returns
GenerateGrid(Vector3, int, int, int, int)
Generates a square grid with a step of 1.0
public static LineGeometry3D GenerateGrid(Vector3 plane, int min0 = 0, int max0 = 10, int min1 = 0, int max1 = 10)
Parameters
Returns
GetLineToLineDistance(Vector3, Vector3, Vector3, Vector3, out Vector3, out Vector3, out float, out float, bool)
Source: http://geomalgorithms.com/a07-_distance.html ~2341920 tests per second
public static float GetLineToLineDistance(Vector3 s0, Vector3 s1, Vector3 t0, Vector3 t1, out Vector3 sp, out Vector3 tp, out float sc, out float tc, bool sIsRay = false)
Parameters
Returns
GetPointToLineDistance2D(ref Vector3, ref Vector3, ref Vector3, out Vector3, out float)
~7874015 tests per second, 3.36 times faster than GetRayToLineDistance()
public static float GetPointToLineDistance2D(ref Vector3 pt, ref Vector3 p0, ref Vector3 p1, out Vector3 closest, out float t)
Parameters
Returns
GetRayToLineDistance(Ray, Vector3, Vector3, out Vector3, out Vector3, out float, out float)
public static float GetRayToLineDistance(Ray ray, Vector3 t0, Vector3 t1, out Vector3 sp, out Vector3 tp, out float sc, out float tc)
Parameters
Returns
ToLineGeometry3D(bool)
Creates the resulting LineGeometry3D.
public LineGeometry3D ToLineGeometry3D(bool unshareVertices = false)
Parameters
unshareVerticesboolIf true, the resulting LineGeometry3D has no shared vertices.
Returns
- LineGeometry3D
Returns the resulting LineGeometry3D.