Empeld
Empeld plugin documentation.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
pluginbase.Helpers.Geometry.Segment Struct Reference

A line segment More...

Public Member Functions

 Segment (Vector3d start, Vector3d end)
 Initializes a new instance of the pluginbase.Helpers.Geometry.Segment struct. More...
 
 Segment (Vector3d start, Vector3d direction, double length)
 Initializes a new instance of the pluginbase.Helpers.Geometry.Segment struct. More...
 
 Segment (Ray ray, double length)
 Create a segment from a ray and a length More...
 
override string ToString ()
 Creates a human-readable string representing the line segment More...
 

Public Attributes

Vector3d Start
 The start coordinate of the line segment More...
 
Vector3d End
 The end coordinate of the line segment More...
 

Properties

double Length [get]
 Gets the length of the line segment More...
 
double LengthFast [get]
 Gets the length of a line segment, computing fastly More...
 
Vector3d Difference [get]
 Get the vector or a line direction More...
 
Vector3d Direction [get]
 Get the normalized line direction Returns zero if the start and end are equal More...
 

Detailed Description

A line segment

Constructor & Destructor Documentation

pluginbase.Helpers.Geometry.Segment.Segment ( Vector3d  start,
Vector3d  end 
)

Initializes a new instance of the pluginbase.Helpers.Geometry.Segment struct.

Parameters
startStart.
endEnd.
27  {
28  Start = start;
29  End = end;
30  }
Vector3d End
The end coordinate of the line segment
Definition: Segment.cs:19
Vector3d Start
The start coordinate of the line segment
Definition: Segment.cs:14
pluginbase.Helpers.Geometry.Segment.Segment ( Vector3d  start,
Vector3d  direction,
double  length 
)

Initializes a new instance of the pluginbase.Helpers.Geometry.Segment struct.

Parameters
startStart.
directionDirection.
lengthLength.
39  {
40  Start = start;
41  End = start + direction * length;
42  }
Vector3d End
The end coordinate of the line segment
Definition: Segment.cs:19
Vector3d Start
The start coordinate of the line segment
Definition: Segment.cs:14
pluginbase.Helpers.Geometry.Segment.Segment ( Ray  ray,
double  length 
)

Create a segment from a ray and a length

Parameters
rayRay.
lengthLength.
50  :this(ray.Point, ray.Direction, length)
51  { }

Member Function Documentation

override string pluginbase.Helpers.Geometry.Segment.ToString ( )

Creates a human-readable string representing the line segment

Returns
A System.String that represents the current pluginbase.Helpers.Geometry.Segment.
108  {
109  return string.Format("[Segment: {0} -> {1}]", Start, End);
110  }
Vector3d End
The end coordinate of the line segment
Definition: Segment.cs:19
Vector3d Start
The start coordinate of the line segment
Definition: Segment.cs:14

Member Data Documentation

Vector3d pluginbase.Helpers.Geometry.Segment.End

The end coordinate of the line segment

Vector3d pluginbase.Helpers.Geometry.Segment.Start

The start coordinate of the line segment

Property Documentation

Vector3d pluginbase.Helpers.Geometry.Segment.Difference
get

Get the vector or a line direction

The diff vector.

Vector3d pluginbase.Helpers.Geometry.Segment.Direction
get

Get the normalized line direction Returns zero if the start and end are equal

The direction.

double pluginbase.Helpers.Geometry.Segment.Length
get

Gets the length of the line segment

The length.

double pluginbase.Helpers.Geometry.Segment.LengthFast
get

Gets the length of a line segment, computing fastly

The length of the fast.


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