Abstract base class for ICurve implementations.
abstract class
|
Curve
|
implements
|
ICurve
|
||
extends
|
SerializableBase
|
The configurator object for this type.
public
static
property
|
Config
{
get
}
|
||
type
|
IConfigurator<ICurve>
|
||
value
|
|
The configurator object. |
Returns the configuration value that describes this object.
public
method
|
ToConfig
()
|
||
type
|
ConfigValue
|
||
returns
|
|
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.
The continuity type of this curve.
public
abstract
property
|
Continuity
{
get
}
|
||
type
|
Continuity
|
||
value
|
The continuity of this curve. | ||
implements
|
ICurve.Continuity
|
The number of control points.
public
property
|
Count
{
get
}
|
||
type
|
int32
|
||
value
|
|
The number of control points. | |
implements
|
ICurve.Count
|
Returns the serial type of this object.
public
property
|
SerialType
{
get
}
|
||
type
|
ISerialTypeInfo
|
||
value
|
|
The serial type. | |
inherited
|
SerializableBase.SerialType
|
Returns the serial data version.
public
virtual
property
|
SerialVersion
{
get
}
|
||
type
|
int32
|
||
value
|
|
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.SerializeReturns 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.
Creates an ICurve instance that provides the given continuity.
public
static
method
|
New
(Continuity continuity)
|
||
type
|
ICurve
|
||
params
|
continuity
|
The requested continuity. | |
returns
|
|
The ICurve instance. |
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
|
|
this | |
implements
|
ICurve.Add
|
Removes all control points from this curve.
public
method
|
Clear
()
|
||
type
|
ICurve
|
||
returns
|
|
this | |
implements
|
ICurve.Clear
|
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
|
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
|
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
|
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
|
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
|
|
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.SerializeCompares 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
|
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
|
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.DeserializeThe number of control points.
protected
field
|
count
|
||
type
|
int32
|
Maximum control point index.
protected
field
|
max
|
||
type
|
int32
|
W-coordinates of control points.
protected
field
|
w
|
||
type
|
float64[]
|
X-coordinates of control points.
protected
field
|
x
|
||
type
|
float64[]
|
Y-coordinates of control points.
protected
field
|
y
|
||
type
|
float64[]
|
Z-coordinates of control points.
protected
field
|
z
|
||
type
|
float64[]
|
Creates a new instance of Curve.
protected
constructor
|
Curve
(ISerialTypeInfo serialType)
|
||
params
|
serialType
|
The serial ID. |