[IoId("00000000-3b2e-4dce-a283-5315cb5b29c6")] public class FleeField : ShapeField
A field with vectors pointing away from one or more shapes.

Constructors

FleeField

#
public FleeField(Function falloff, bool nearestOnly, IPear[] shapes)
Create a fleeing field for various shapes.
falloff (Function)Falloff based on distance
nearestOnly (bool)If true only the nearest shape is considered.
shapes (IPear[])Shapes to flee.

FleeField

#
public FleeField(IReader reader)
reader (IReader)

Properties

Count

protected int Count { get; }
inherited fromShapeField

Falloff

#
public Function Falloff { get; }

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.
inherited fromField

Name

#
public override string Name { get; }
Field.Name

NearestOnly

#
public bool NearestOnly { get; }

Type

#
public override FieldType Type { get; }
Field.Type

Methods

Distance

protected double Distance(int index, Point3d point)
inherited fromShapeField
index (int)
point (Point3d)

Filter

protected int Filter(params ShapeType[] allowedTypes)
Remove all shape which are of a different type.
inherited fromShapeField
allowedTypes (params ShapeField.ShapeType[])All allowed types.
Number of shapes removed.

Format

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

ModifierArguments

protected Fragments ModifierArguments(string text)
Reduce modifier notation to just the arguments. The labelled form written by Field.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.
inherited fromField
text (string)Modifier notation.

NearestShape

protected int NearestShape(Point3d point, out double distance)
inherited fromShapeField
point (Point3d)
distance (out double)

NearestShape

protected int NearestShape(Point3d point, out Point3d closestPoint, out Vector3d closestNormal)
inherited fromShapeField
point (Point3d)
closestPoint (out Point3d)
closestNormal (out Vector3d)

Project

protected (Point3d point, Vector3d normal) Project(int index, Point3d point)
inherited fromShapeField
index (int)
point (Point3d)

ScalarAt

#
public override double ScalarAt(Point3d point)
point (Point3d)
Field.ScalarAt

Store

#
public override void Store(IWriter writer)
writer (IWriter)
ShapeField.Store

Trace

public IEnumerable<Point3d> Trace(Point3d start, Angle maximumAngle, DifferentialSolver solver)
Approximate a trajectory through a vector field.
inherited fromField
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.
inherited fromField
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.
inherited fromField
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 Field.Format() writes, so a value can be edited by changing the text it is displayed as. Field.ModifierArguments(string) deals with the label in front of the arguments.

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

VectorAt

#
public override Vector3d VectorAt(Point3d point)
point (Point3d)
Field.VectorAt