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

interface ICurve in Tinman.Terrain.Util

Base interface for classes that represent a curve that interpolates through a sequence of control points.

interface ICurve extends IConfigurable
  IEquatable<ICurve>
  ISerializable
  base of Curve

Attributes

Continuity

The continuity type of this curve.

property Continuity { get }
type Continuity
value The continuity of this curve.

Count

The number of control points.

property Count { get }
type int32
value [>=0] The number of control points.

SerialType

Returns the serial type of this object.

property SerialType { get }
type ISerialTypeInfo
value [not-null] The serial type.
inherited ISerializable.SerialType

SerialVersion

Returns the serial data version.

property SerialVersion { get }
type int32
value [>=1] The serial data version tag.
inherited ISerializable.SerialVersion

Remarks:

An ISerializable implementation is required to support all versions up to the one returned by SerialVersion.

See also:

ISerializable.Serialize
ISerializable.Deserialize

ValidRange

Returns the range of valid control point indices.

property ValidRange { get }
type RangeI
value The valid control point index range.

Remarks:

Control points within this range can be used to compute points on the curve without the need to duplicate any control points.

Methods

Add

Adds a control point to this curve.

method Add (float64 x, float64 y = 0, float64 z = 0, float64 w = 0)
type ICurve
params x X-coordinate of the control point.
  y Y-coordinate of the control point. Defaults to 0.
  z Z-coordinate of the control point. Defaults to 0.
  w W-coordinate of the control point. Defaults to 0.
returns [not-null] this

Clear

Removes all control points from this curve.

method Clear ()
type ICurve
returns [not-null] this

Compute1D

Computes a 1D point along this curve.

method Compute1D (float64 index)
type float64
params index The control point index.
returns The computed point or NanD if the curve has no control points.

Compute2D

Computes a 2D point along this curve.

method Compute2D (float64 index)
type Vec2D
params index The control point index.
returns The computed point or Undefined if the curve has no control points.

Compute3D

Computes a 3D point along this curve.

method Compute3D (float64 index)
type Vec3D
params index The control point index.
returns The computed point or Undefined if the curve has no control points.

Compute4D

Computes a 4D point along this curve.

method Compute4D (float64 index)
type Vec4D
params index The control point index.
returns The computed point or Undefined if the curve has no control points.

Deserialize

Initializes the state of this object from the given data stream.

method Deserialize (int32 serialVersion, ISerializer data)
type ISerializable
params serialVersion [>=1] The serial data version.
  data [not-null] The serial data stream.
returns [not-null] The deserialized object. This will typically be this, but in some circumstances, another instance may be returned (e.g. singletons).
inherited ISerializable.Deserialize

Remarks:

The Deserialize method will be called immediately after the object has been instantiated via its default constructor.

The provided serialVersion number is guaranteed to be equal to or less than the SerialVersion returned by this object (i.e. ISerializable object must provide backwards compatibility).

See also:

ISerializable.Serialize
ISerializable.SerialVersion

GetAt

Returns a control point.

method GetAt (int32 index)
type Vec4D
params index [0..Count-1] The control point index.
returns The control point.

Serialize

Serializes the current state of this object to the given data stream.

method Serialize (ISerializer data)
params data [not-null] The serial data stream.
inherited ISerializable.Serialize

See also:

ISerializable.Deserialize
ISerializable.SerialVersion

ToConfig

Returns the configuration value that describes this object.

method ToConfig ()
type ConfigValue
returns [not-null] The configuration value.
inherited IConfigurable.ToConfig

Remarks:

All configurable objects need to implement this interface. For simple types, it is preferable to delegate to ToValue.

The returned value may be of type Invalid, which means that this object in its current state cannot be described with the configuration API.

Before returning the resulting configuration value, Cache must be called on it, passing this IConfigurable object as parameter.

Extensions

Add

Adds a control point to this curve.

method Add (Vec2D v)
type ICurve
params v The control point.
returns [not-null] this

Adds a control point to this curve.

method Add (Vec3D v)
type ICurve
params v The control point.
returns [not-null] this

Adds a control point to this curve.

method Add (Vec4D v)
type ICurve
params v The control point.
returns [not-null] this