![]() |
PolyLink
A library to allow manipulation of geometry from within Mathematica
|
The building blocks of a geometric model, a HalfEdge consists of a reference to a start and end point, and links to the counter-clockwise Next, Previous, and Oppostie HalfEdges. More...
Public Member Functions | |
HalfEdge[] | DetourToVertex (PointRef p) |
Create a pair of Half-Edges following this one, which go from this's End to p, and back again More... | |
Dictionary< HalfEdge, HalfEdge > | LinkNext (HalfEdge he) |
Links a HalfEdge to this one and saves references to possibly unlinked HalfEdges More... | |
void | MergeAcross () |
Removes this HalfEdge and joins two neighboring facets More... | |
override string | ToString () |
HalfEdge (PointRef start, PointRef end) | |
void | Unfold (IEnumerable< PointRef > stowaways=null, IEnumerable< HalfEdge > stowawayHalfEdges=null) |
Moves the entire Facet so that it is coplanar with the neighbor opposite this HalfEdge. More... | |
void | TransformFacet (Expr matrix) |
Transforms every HalfEdge in the facet by a matrix. More... | |
void | UselessTransform () |
Transforms the facet by translating it {0,0,0}. In other words, doesn't move the facet at all. More... | |
void | Anchor (IEnumerable< PointRef > stowaways) |
Moves the facet so that this HalfEdge's start point is at the origin, the EndPoint is in the direction {1,0,0}, and the whole facet is in the xy plane. More... | |
void | Transform (Expr transform, bool includeStart=true, bool includeEnd=true) |
Transforms just this HalfEdge. More... | |
void | NegativeTranslate (Vector v) |
Translates this HalfEdge in the opposite direction as the vector v. More... | |
Expr | Label (int i) |
Returns a Mathematica graphics primitive for an inset label above this HalfEdge. More... | |
void | MoveStartPoint (Expr p) |
IEnumerable< HalfEdge > | BreadthFirstGrab (bool includeTorn=false) |
Creates a list of all connected half-edges in Breadth-First order, starting from here. More... | |
void | CascadingUnfold (Polyhedron p) |
Unfolds along a halfedge and moves whole sections of the polyhedron with it. More... | |
IEnumerable< PointRef > | BreadthFirstPoints () |
IEnumerable< HalfEdge > | BreadthFirstGrabAll () |
![]() | |
MathLinked () | |
Protected Attributes | |
PointRef | _start |
PointRef | _end |
HalfEdge | _opposite |
HalfEdge | _next |
HalfEdge | _prev |
Properties | |
Facet | Facet [get, set] |
Reference to the Facet that owns this HalfEdge. More... | |
string | Tag [get] |
A string used to identify this HalfEdge. Not used in code, but useful for debugging. More... | |
EndPointPacket | EndPointPacket [get] |
Exports the EndpointPacket for this HalfEdge More... | |
EndPointPacket | OppositesEndPointPacket [get] |
Exports the OppositeEndpointPacket for this HalfEdge More... | |
PointRef | Start [get, set] |
Reference to the start point of this HalfEdge. More... | |
PointRef | End [get, set] |
Reference to the end point of this HalfEdge. More... | |
HalfEdge | Opposite [get, set] |
The HalfEdge which represnts the same edge but bounds a neighboring facet More... | |
HalfEdge | Next [get] |
The next HalfEdge going counterclockwise More... | |
HalfEdge | Prev [get] |
The previous Halfedge More... | |
IEnumerable< HalfEdge > | HEsFromHere [get] |
Enumerates the halfedges around the facet that this binds More... | |
IEnumerable< HalfEdge > | HEsFromHereReversed [get] |
Enumerates the halfedges around the facet that this binds, but in reverse order. More... | |
Expr | AsVectorExpr [get] |
Gives the displacement vector from Start to End More... | |
Vector | AsVector [get] |
Gives the displacement vector from Start to End, as a Vector object. More... | |
Plane | Plane [get] |
Gives the plane containing this HalfEdge More... | |
Expr | DotOpposite [get] |
Dots this halfedge's facet with the facet's neighbor along this halfedge. More... | |
bool | OppIsNull [get] |
Returns true iff opposite is null More... | |
bool | DontCycle [get, set] |
Designates that this HalfEdge should break the cycle if the CycleBoutEndPoint property is called. Useful for if a HalfEdge is a working copy that references a real HalfEdge. More... | |
IEnumerable< HalfEdge > | CycleAboutEndPoint [get] |
Enumerates all HalfEdges which have End as their end point More... | |
Expr | DotNext [get] |
Turns the dot product of this and next More... | |
Expr | AngleToNext [get] |
Angle between this and next More... | |
Expr | SumAngles [get] |
Sum of all angles around this vertex More... | |
Expr | Curvature [get] |
Curvature of this vertex More... | |
Expr | Highlight [get] |
A graphics primitive that indicates this HalfEdge with a Thick Red Arrow. More... | |
static HalfEdge | LittleLine [get] |
For testing More... | |
static HalfEdge | Facetable [get] |
For testing More... | |
Expr | NormalGraphics [get] |
Graphics Primitive to visualize the Normal of this HalfEdge. More... | |
bool | Torn [get] |
Returns true iff this HalfEdge's opposite is not made of the same point reference as this. More... | |
Expr | Graphics [get] |
Give a graphical representation of the link between this HalfEdge and its opposite. More... | |
HalfEdge | FacetCloneWithOriginalOpposites [get] |
Clones all the HalfEdges in this HalfEdge's facet, then gives each HalfEdge a link to the (original) opposite. More... | |
HalfEdge | FacetRingClone [get] |
Clones all the HalfEdges in this HalfEdge's facet More... | |
HalfEdge | ShallowClone [get] |
Creates a "Shallow Clone" of this HalfEdge, using the original Start, End, Next, and Prev. Opposite is set to null. More... | |
Expr | Midpoint [get] |
Gives the midpoint between Start and End. More... | |
Facet | ForceNewFacet [get] |
IEnumerable< PointRef > | StartPointsFromHere [get] |
![]() | |
IKernelDispatch | ML [get, set] |
The building blocks of a geometric model, a HalfEdge consists of a reference to a start and end point, and links to the counter-clockwise Next, Previous, and Oppostie HalfEdges.
Definition at line 14 of file HalfEdge.cs.
Definition at line 365 of file HalfEdge.cs.
void PolyLink.HalfEdge.Anchor | ( | IEnumerable< PointRef > | stowaways | ) |
Moves the facet so that this HalfEdge's start point is at the origin, the EndPoint is in the direction {1,0,0}, and the whole facet is in the xy plane.
Definition at line 492 of file HalfEdge.cs.
IEnumerable<HalfEdge> PolyLink.HalfEdge.BreadthFirstGrab | ( | bool | includeTorn = false | ) |
Creates a list of all connected half-edges in Breadth-First order, starting from here.
includeTorn |
Definition at line 690 of file HalfEdge.cs.
IEnumerable<HalfEdge> PolyLink.HalfEdge.BreadthFirstGrabAll | ( | ) |
Definition at line 759 of file HalfEdge.cs.
IEnumerable<PointRef> PolyLink.HalfEdge.BreadthFirstPoints | ( | ) |
Definition at line 754 of file HalfEdge.cs.
void PolyLink.HalfEdge.CascadingUnfold | ( | Polyhedron | p | ) |
Unfolds along a halfedge and moves whole sections of the polyhedron with it.
p |
Definition at line 730 of file HalfEdge.cs.
Create a pair of Half-Edges following this one, which go from this's End to p, and back again
p |
Definition at line 181 of file HalfEdge.cs.
Expr PolyLink.HalfEdge.Label | ( | int | i | ) |
Returns a Mathematica graphics primitive for an inset label above this HalfEdge.
i | The number for the label |
Definition at line 665 of file HalfEdge.cs.
Links a HalfEdge to this one and saves references to possibly unlinked HalfEdges
he | HalfEdge which will become the new next |
Definition at line 212 of file HalfEdge.cs.
void PolyLink.HalfEdge.MergeAcross | ( | ) |
Removes this HalfEdge and joins two neighboring facets
Definition at line 233 of file HalfEdge.cs.
void PolyLink.HalfEdge.MoveStartPoint | ( | Expr | p | ) |
Definition at line 672 of file HalfEdge.cs.
void PolyLink.HalfEdge.NegativeTranslate | ( | Vector | v | ) |
Translates this HalfEdge in the opposite direction as the vector v.
v |
Definition at line 584 of file HalfEdge.cs.
override string PolyLink.HalfEdge.ToString | ( | ) |
Definition at line 245 of file HalfEdge.cs.
void PolyLink.HalfEdge.Transform | ( | Expr | transform, |
bool | includeStart = true , |
||
bool | includeEnd = true |
||
) |
Transforms just this HalfEdge.
transform | A transform matrix by which to transform the start and end points of this HalfEdge. |
Definition at line 550 of file HalfEdge.cs.
void PolyLink.HalfEdge.TransformFacet | ( | Expr | matrix | ) |
Transforms every HalfEdge in the facet by a matrix.
matrix | matrix to transform this facet |
Definition at line 465 of file HalfEdge.cs.
void PolyLink.HalfEdge.Unfold | ( | IEnumerable< PointRef > | stowaways = null , |
IEnumerable< HalfEdge > | stowawayHalfEdges = null |
||
) |
Moves the entire Facet so that it is coplanar with the neighbor opposite this HalfEdge.
Definition at line 388 of file HalfEdge.cs.
void PolyLink.HalfEdge.UselessTransform | ( | ) |
Transforms the facet by translating it {0,0,0}. In other words, doesn't move the facet at all.
Definition at line 482 of file HalfEdge.cs.
|
protected |
Definition at line 71 of file HalfEdge.cs.
|
protected |
Definition at line 87 of file HalfEdge.cs.
|
protected |
Definition at line 73 of file HalfEdge.cs.
|
protected |
Definition at line 88 of file HalfEdge.cs.
|
protected |
Definition at line 70 of file HalfEdge.cs.
|
get |
Angle between this and next
Definition at line 290 of file HalfEdge.cs.
|
get |
Gives the displacement vector from Start to End, as a Vector object.
Definition at line 152 of file HalfEdge.cs.
|
get |
Gives the displacement vector from Start to End
Definition at line 144 of file HalfEdge.cs.
|
get |
Curvature of this vertex
Definition at line 313 of file HalfEdge.cs.
|
get |
Enumerates all HalfEdges which have End as their end point
Definition at line 260 of file HalfEdge.cs.
|
getset |
Designates that this HalfEdge should break the cycle if the CycleBoutEndPoint property is called. Useful for if a HalfEdge is a working copy that references a real HalfEdge.
Definition at line 254 of file HalfEdge.cs.
|
get |
Turns the dot product of this and next
Definition at line 282 of file HalfEdge.cs.
|
get |
Dots this halfedge's facet with the facet's neighbor along this halfedge.
Definition at line 173 of file HalfEdge.cs.
|
getset |
Reference to the end point of this HalfEdge.
Definition at line 65 of file HalfEdge.cs.
|
get |
Exports the EndpointPacket for this HalfEdge
Definition at line 34 of file HalfEdge.cs.
|
getset |
Reference to the Facet that owns this HalfEdge.
Definition at line 20 of file HalfEdge.cs.
|
staticget |
For testing
Definition at line 343 of file HalfEdge.cs.
|
get |
Clones all the HalfEdges in this HalfEdge's facet, then gives each HalfEdge a link to the (original) opposite.
Definition at line 594 of file HalfEdge.cs.
|
get |
Clones all the HalfEdges in this HalfEdge's facet
Definition at line 613 of file HalfEdge.cs.
|
get |
Definition at line 678 of file HalfEdge.cs.
|
get |
Give a graphical representation of the link between this HalfEdge and its opposite.
Definition at line 569 of file HalfEdge.cs.
|
get |
Enumerates the halfedges around the facet that this binds
Definition at line 110 of file HalfEdge.cs.
|
get |
Enumerates the halfedges around the facet that this binds, but in reverse order.
Definition at line 127 of file HalfEdge.cs.
|
get |
A graphics primitive that indicates this HalfEdge with a Thick Red Arrow.
Definition at line 321 of file HalfEdge.cs.
|
staticget |
For testing
Definition at line 335 of file HalfEdge.cs.
|
get |
Gives the midpoint between Start and End.
Definition at line 655 of file HalfEdge.cs.
|
get |
The next HalfEdge going counterclockwise
Definition at line 94 of file HalfEdge.cs.
|
get |
Graphics Primitive to visualize the Normal of this HalfEdge.
Definition at line 360 of file HalfEdge.cs.
|
get |
Returns true iff opposite is null
Definition at line 226 of file HalfEdge.cs.
|
getset |
The HalfEdge which represnts the same edge but bounds a neighboring facet
Definition at line 79 of file HalfEdge.cs.
|
get |
Exports the OppositeEndpointPacket for this HalfEdge
Definition at line 45 of file HalfEdge.cs.
|
get |
Gives the plane containing this HalfEdge
Definition at line 160 of file HalfEdge.cs.
|
get |
The previous Halfedge
Definition at line 102 of file HalfEdge.cs.
|
getprotected |
Creates a "Shallow Clone" of this HalfEdge, using the original Start, End, Next, and Prev. Opposite is set to null.
Definition at line 637 of file HalfEdge.cs.
|
getset |
Reference to the start point of this HalfEdge.
Definition at line 56 of file HalfEdge.cs.
|
get |
Definition at line 722 of file HalfEdge.cs.
|
get |
Sum of all angles around this vertex
Definition at line 302 of file HalfEdge.cs.
|
get |
A string used to identify this HalfEdge. Not used in code, but useful for debugging.
Definition at line 26 of file HalfEdge.cs.
|
get |
Returns true iff this HalfEdge's opposite is not made of the same point reference as this.
Definition at line 376 of file HalfEdge.cs.