TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class Points in Tinman.Terrain.Util

Helper class that performs common computations on a list of points in 3D space.

sealed class Points  

Public / Attributes

Count

public property Count { get }
type int32
value

Public / Constructors

Points

Creates a new instance of Points.

public constructor Points ()

Public / Methods

Add

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.

AveragePlane

Computes an average plane for the given points.

public method AveragePlane ()
type Plane
returns The average plane.

BoundingBox

Computes the smallest axis-aligned bounding box that contains all points.

public method BoundingBox ()
type Box3D
returns The axis-aligned bounding box.

BoundingCuboid

Computes a bounding cuboid aligned to the principal axes that contain all points.

public method BoundingCuboid ()
type Cuboid
returns The bounding cuboid.

BoundingSphere

Computes a bounding sphere that contains all points.

public method BoundingSphere ()
type Sphere
returns The bounding sphere.

Clear

public method Clear ()

Get

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.

MeanPosition

Computes the mean point position.

public method MeanPosition ()
type Vec3D
returns The mean point position.

PrincipalAxis

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.