Class TopoTri3Hfr
Topological 3D triangle with Fraction<decimal> coordinates.
Maintains connectivity to points and lines.
Corresponds to C++ topo_tri3_t.
public class TopoTri3Hfr
- Inheritance
-
TopoTri3Hfr
- Inherited Members
- Extension Methods
Fields
Lines
Three directed edges. The index is aligned to the begin point: lines[0] = {P0=ps[0], P1=ps[1]}, lines[1] = {P0=ps[1], P1=ps[2]}, lines[2] = {P0=ps[2], P1=ps[0]}.
public readonly TopoLine3Hfr[] Lines
Field Value
Ps
Three apex points. ps[i] == lines[i].P0.
public readonly TopoPoint3Hfr[] Ps
Field Value
Properties
CachedCross
Gets or sets the cached cross product. Setting this is useful when the cross is computed externally (e.g. during construction).
public Vec3Hfr? CachedCross { get; set; }
Property Value
Methods
ApexAtc(int)
Gets the apex at the specified index.
public Vec3Hfr ApexAtc(int index)
Parameters
indexint
Returns
ClearCache()
Clears all cached values.
public void ClearCache()
GetCross()
Gets the cross product vector from line edges: lines[2].arrow x lines[0].arrow.
Cached after first computation.
Corresponds to C++ get_cross.
public Vec3Hfr GetCross()
Returns
GetCrossByTls(TopoLine3Hfr, TopoLine3Hfr)
Computes cross from line arrows: lines[2].arrow x lines[0].arrow.
public static Vec3Hfr GetCrossByTls(TopoLine3Hfr tl0, TopoLine3Hfr tl2)
Parameters
tl0TopoLine3Hfrtl2TopoLine3Hfr
Returns
GetIntegerNormal()
Gets the integer normal vector (cross scaled to integer-like fraction).
Corresponds to C++ get_integer_normal.
public Vec3Hfr GetIntegerNormal()
Returns
GetNormal()
Gets the normalized (unit length) normal vector in double precision.
Cached after first computation.
Corresponds to C++ get_normal.
public Vec3d GetNormal()
Returns
ResetCross()
Recomputes the cached cross product.
public void ResetCross()
ResetIntegerNormal()
Recomputes the cached integer normal. Also recomputes the cross.
public void ResetIntegerNormal()
ResetNormal()
Recomputes the cached normal. Also recomputes the integer normal and cross.
public void ResetNormal()
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
ToTri3d()
Converts to a Tri3d (double precision).
public Tri3d ToTri3d()