2 using System.Threading.Tasks;
33 get {
return _startRef; }
41 get {
return _endRef; }
70 return "Sqrt".MsBracket(
71 "Dot".MsBracket(
new[] {this.AsVector, this.AsVector}));
81 private readonly Expr _point;
82 private readonly Expr _normal;
89 public Plane(Expr point, Expr normal) : this()
91 _normal =
"Normalize".MsBracket(normal);
100 get {
return _point; }
108 get {
return _normal; }
114 public static Expr
UpVec
116 get {
return _upVec; }
119 private static readonly Expr _upVec =
"{0,1,0}".MsEvalWith();
138 var vec =
"{0} - {1}".MsEvalWith(q,
Point);
139 var dist =
"Dot[{0},{1}]".MsEvalWith(vec,
Normal);
140 return "{0} - {1} * {2}".MsEvalWith(q, dist,
Normal);
PointRef StartRef
Reference to the Start Point of the EndPointPacket
EndPointPacket Opposite
An EndPointPacket with the start and end points swapped
Expr ProjectPoint(Expr q)
Projects point q onto the plane
PointRef EndRef
Reference to the End Point of the EndPointPacket
Plane(Expr point, Expr normal)
Constructor
Expr Point
Point that this plane passes throug
A container for a Halfedge's start and end points. An immutable container.
Holds a reference to a point in the form of a Mathematica expression
EndPointPacket(PointRef startRef, PointRef endRef)
Constructor
Expr AsVector
The displacement vector from Start to End
Expr Normal
Normal to the plane
Expr Magnitude
The distance from start to end
Point-normal representation of the plane containing this HalfEdge. An immutable container.
static Expr Origin
For testing use
static Plane TestOriginUp
Returns a vector seated at the origin pointing upwards in the Y direction