Helper class that performs common computations on a list of points in 3D space.
sealed class
|
Points
|
public
property
|
Count
{
get
}
|
||
type
|
int32
|
||
value
|
Creates a new instance of Points.
public
constructor
|
Points
()
|
Adds a point.
public
method
|
Add
(Vec3F point,
float64 weight = 1)
|
||
params
|
point
|
The point coordinates. | |
weight
|
[>=0]
|
Optional
point
weight.
Defaults
to
1 . |
Adds a point.
public
method
|
Add
(Vec3D point,
float64 weight = 1)
|
||
params
|
point
|
The point coordinates. | |
weight
|
[>=0]
|
Optional
point
weight.
Defaults
to
1 . |
Adds a point.
public
method
|
Add
(float64 x,
float64 y,
float64 z,
float64 weight = 1)
|
||
params
|
x
|
The point X-coordinate. | |
y
|
The point Y-coordinate. | ||
z
|
The point Z-coordinate. | ||
weight
|
[>=0]
|
Optional
point
weight.
Defaults
to
1 . |
Computes an average plane for the given points.
public
method
|
AveragePlane
()
|
||
type
|
Plane
|
||
returns
|
The average plane. |
Computes the smallest axis-aligned bounding box that contains all points.
public
method
|
BoundingBox
()
|
||
type
|
Box3D
|
||
returns
|
The axis-aligned bounding box. |
Computes a bounding cuboid aligned to the principal axes that contain all points.
public
method
|
BoundingCuboid
()
|
||
type
|
Cuboid
|
||
returns
|
The bounding cuboid. |
Computes a bounding sphere that contains all points.
public
method
|
BoundingSphere
()
|
||
type
|
Sphere
|
||
returns
|
The bounding sphere. |
public
method
|
Clear
()
|
Returns the idx-th point, as it has been added (without weight).
public
method
|
Get
(int32 idx)
|
||
type
|
Vec3D
|
||
params
|
idx
|
[0..Count-1]
|
The point index. |
returns
|
The point coordinates. |
Computes the mean point position.
public
method
|
MeanPosition
()
|
||
type
|
Vec3D
|
||
returns
|
The mean point position. |
Returns the principal axis of the points.
public
method
|
PrincipalAxis
(int32 n)
|
||
type
|
Vec3D
|
||
params
|
n
|
[0..2]
|
The
axis
to
return
(0 :
most
significant,
2 :
least
significant).
|
returns
|
The unit-length principal axis vector. |