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

class Curve in Tinman.Terrain.Util

Abstract base class for ICurve implementations.

abstract class Curve implements ICurve
  extends SerializableBase

Configuration

Config

The configurator object for this type.

public static property Config { get }
type IConfigurator<ICurve>
value [not-null] The configurator object.

ToConfig

Returns the configuration value that describes this object.

public method ToConfig ()
type ConfigValue
returns [not-null] The configuration value.
implements 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.

Public / Attributes

Continuity

The continuity type of this curve.

public abstract property Continuity { get }
type Continuity
value The continuity of this curve.
implements ICurve.Continuity

Count

The number of control points.

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

SerialType

Returns the serial type of this object.

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

SerialVersion

Returns the serial data version.

public virtual property SerialVersion { get }
type int32
value [>=1] The serial data version tag.
inherited SerializableBase.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.

public abstract property ValidRange { get }
type RangeI
value The valid control point index range.
implements ICurve.ValidRange

Remarks:

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

Public / Constructors

New

Creates an ICurve instance that provides the given continuity.

public static method New (Continuity continuity)
type ICurve
params continuity The requested continuity.
returns [not-null] The ICurve instance.

Public / Methods

Add

Adds a control point to this curve.

public 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
implements ICurve.Add

Clear

Removes all control points from this curve.

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

Compute1D

Computes a 1D point along this curve.

public abstract 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.
implements ICurve.Compute1D

Compute2D

Computes a 2D point along this curve.

public abstract 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.
implements ICurve.Compute2D

Compute3D

Computes a 3D point along this curve.

public abstract 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.
implements ICurve.Compute3D

Compute4D

Computes a 4D point along this curve.

public abstract 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.
implements ICurve.Compute4D

Deserialize

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

public override 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).
overrides SerializableBase.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

Equals

Compares this object with the given one.

[Pure]
public virtual method Equals (ICurve other)
type bool
params other The object to compare to.
returns true if this object is equal to other, false if not.
implements IEquatable.Equals

GetAt

Returns a control point.

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

Serialize

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

public override method Serialize (ISerializer data)
params data [not-null] The serial data stream.
overrides SerializableBase.Serialize

See also:

ISerializable.Deserialize
ISerializable.SerialVersion

Protected / Attributes

count

The number of control points.

protected field count
type int32

max

Maximum control point index.

protected field max
type int32

w

W-coordinates of control points.

protected field w
type float64[]

x

X-coordinates of control points.

protected field x
type float64[]

y

Y-coordinates of control points.

protected field y
type float64[]

z

Z-coordinates of control points.

protected field z
type float64[]

Protected / Constructors

Curve

Creates a new instance of Curve.

protected constructor Curve (ISerialTypeInfo serialType)
params serialType The serial ID.