Properties

FormatLabel

#
protected string FormatLabel { get; }
Gets the name of this field condensed into a single word, which is how the name appears in formatted values.

Name

#
public abstract string Name { get; }
Gets the name of this field.

Type

#
public abstract FieldType Type { get; }
Gets the type of this field.

Methods

Format

#
public virtual string Format()
Create a string representation of this field.

ModifierArguments

#
protected Fragments ModifierArguments(string text)
Reduce modifier notation to just the arguments. The labelled form written by Format() ("ScalarNoise min:0 max:1"), the bracketed form ("Scalar Noise (0, 1)") and a bare list of arguments ("0, 1") are all accepted, so that a displayed value can be edited by changing only the parts which matter.
text (string)Modifier notation.

ScalarAt

#
public abstract double ScalarAt(Point3d point)
Evaluate the field scalar component at a specific point in space. If this is a vector-field, the returned value is *probably* the magnitude of the vector, but this is not guaranteed.
point (Point3d)The point at which to evaluate the field.
The scalar value at the given coordinate.

Store

#
public abstract void Store(IWriter writer)
Serialisation.
writer (IWriter)
Store

Trace

#
public IEnumerable<Point3d> Trace(Point3d start, Angle maximumAngle, DifferentialSolver solver)
Approximate a trajectory through a vector field.
start (Point3d)Start point of trajectory.
maximumAngle (Angle)Maximum allowed kink angle between segments.
solver (DifferentialSolver)Differential interpolation scheme to use.
Points along the trajectory.

Trace

#
public IEnumerable<Point3d> Trace(Point3d start, double stepSize, DifferentialSolver solver)
Approximate a trajectory through a vector field.
start (Point3d)Start point of trajectory.
stepSize (double)Size of intermediate steps.
solver (DifferentialSolver)Differential interpolation scheme to use.
Points along the trajectory.

Trace

#
public Polyline Trace(Point3d start, double accuracy, double targetLength, DifferentialSolver solver)
Approximate a trajectory through a vector field.
start (Point3d)Start point of trajectory.
accuracy (double)Accuracy of intermediate steps. When negative, trajectory is traced backwards.
targetLength (double)Length of trajectory.
solver (DifferentialSolver)Differential interpolation scheme to use.
Point at end of trajectory.

TryModify

#
public virtual Result<Field> TryModify(string text)
Try and create a new field based on this field and modifier notation.

Only the salient properties of a field are exposed to text, the rest are copied from this instance. That is why there is no way to write a field of a specific type from nothing; there has to be one already to serve as the template. Constant scalar and vector fields are the exception, they are entirely described by a number or a vector.

Implementations are expected to accept whatever their Format() writes, so a value can be edited by changing the text it is displayed as. ModifierArguments(string) deals with the label in front of the arguments.

text (string)Modifier notation.
Result of parsing operation.

VectorAt

#
public abstract Vector3d VectorAt(Point3d point)
Evaluate the field vector component at a specific point in space. If this is a scalar-field, the returned value is *probably* a vector in the form (0,0,scalar), but this is not guaranteed.
point (Point3d)The point at which to evaluate the field.
The vector value at the given coordinate

Operators

OperationResultDescription
Field+FieldFieldAdd two fields together.
Field/FieldFieldDivide one field by another.
Field*FieldFieldMultiply two fields together.
Field-FieldFieldSubtract one field from another.

Convertors

OperationResultDescription
implicitBigIntegerFieldConvert an integer into a constant field.
implicitdoubleFieldConvert a double into a constant field.
implicitintFieldConvert an integer into a constant field.
implicitVector3dFieldConvert a vector into a constant field.