HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GEO_HedgeInterface Class Reference

#include <GEO_HedgeInterface.h>

Public Member Functions

 GEO_HedgeInterface (GA_Detail *gdp, bool use_hedge_topology=true)
 
 ~GEO_HedgeInterface ()
 
void destroyHedgeTopologyLinks ()
 
bool haveHedgeTopology () const
 
void setWranglerCache (GA_ElementWranglerCache *wc)
 
GEO_PrimitivehedgePrimitive (GEO_Hedge e) const
 
GA_Offset hedgePrimitiveOffset (GEO_Hedge e) const
 
bool isValidHedge (GEO_Hedge &e) const
 
SYS_FORCE_INLINE GA_Offset vertexPoint (GA_Offset vtx) const
 
SYS_FORCE_INLINE GA_Offset vertexPrimitive (GA_Offset vtx) const
 
SYS_FORCE_INLINE GA_Offset vertexToNextVertex (GA_Offset vtx) const
 
SYS_FORCE_INLINE GA_Offset pointVertex (GA_Offset vtx) const
 
bool isPrimary (GEO_Hedge e) const
 
GA_Offset srcVertex (GEO_Hedge e) const
 Returns the src vertex of the hedge. More...
 
GA_Offset dstVertex (GEO_Hedge e) const
 Returns the dst vertex of the hedge. More...
 
GA_Offset preSrcVertex (GEO_Hedge e) const
 
GA_Offset postDstVertex (GEO_Hedge e) const
 
GA_Offset srcPoint (GEO_Hedge e) const
 Returns the point to which the src vertex is wired. More...
 
GA_Offset dstPoint (GEO_Hedge e) const
 Returns the point to which the dst vertex is wired. More...
 
GA_Offset preSrcPoint (GEO_Hedge e) const
 
GA_Offset postDstPoint (GEO_Hedge e) const
 
GEO_Hedge nextPrimitiveHedge (GEO_Hedge e) const
 
SYS_FORCE_INLINE GEO_Hedge lnext (GEO_Hedge e) const
 
GEO_Hedge prevPrimitiveHedge (GEO_Hedge h) const
 
SYS_FORCE_INLINE GEO_Hedge lprev (GEO_Hedge h) const
 
GEO_Hedge otherPrimitiveHedgeAtPoint (GEO_Hedge h, GA_Offset pt) const
 
GEO_Hedge nextEquivalentHedge (GEO_Hedge e) const
 
SYS_FORCE_INLINE GEO_Hedge sym (GEO_Hedge e) const
 
GEO_Hedge primaryEquivalentHedge (GEO_Hedge e) const
 Returns the primary hedge equivalent to the argument hedge. More...
 
SYS_FORCE_INLINE GEO_Hedge primary (GEO_Hedge e) const
 
GEO_Hedge firstIncidentHedge (GA_Offset pt) const
 
GEO_Hedge nextIncidentHedge (GEO_Hedge e, GA_Offset pt) const
 
GEO_Hedge firstIncidentEdge (GA_Offset pt) const
 
GEO_Hedge nextIncidentEdge (GEO_Hedge e, GA_Offset pt) const
 
GEO_Hedge firstOutgoingHedge (GA_Offset pt) const
 
GEO_Hedge nextOutgoingHedge (GEO_Hedge e) const
 
GEO_Hedge firstIncomingHedge (GA_Offset pt) const
 
GEO_Hedge nextIncomingHedge (GEO_Hedge e) const
 
GEO_Hedge firstManifoldIncomingHedge (GEO_Hedge e) const
 Manifold Scan Methods: More...
 
SYS_FORCE_INLINE GEO_Hedge dfirst (GEO_Hedge e) const
 
GEO_Hedge prevManifoldIncomingHedge (GEO_Hedge e) const
 
SYS_FORCE_INLINE GEO_Hedge dprev (GEO_Hedge e) const
 
GEO_Hedge nextManifoldIncomingHedge (GEO_Hedge e) const
 
SYS_FORCE_INLINE GEO_Hedge dnext (GEO_Hedge e) const
 
GEO_Hedge firstManifoldOutgoingHedge (GEO_Hedge e) const
 
SYS_FORCE_INLINE GEO_Hedge ofirst (GEO_Hedge e) const
 
GEO_Hedge prevManifoldOutgoingHedge (GEO_Hedge e) const
 Returns the previous hedge with the same src as e in a counterclockwise. More...
 
SYS_FORCE_INLINE GEO_Hedge oprev (GEO_Hedge e) const
 
GEO_Hedge nextManifoldOutgoingHedge (GEO_Hedge e) const
 
SYS_FORCE_INLINE GEO_Hedge onext (GEO_Hedge e) const
 
fpreal length (GEO_Hedge e) const
 
UT_Vector3 srcPos3 (GEO_Hedge e) const
 Returns the positions of the source point of e. More...
 
UT_Vector3 dstPos3 (GEO_Hedge e) const
 Returns the positions of the destination point of e. More...
 
UT_Vector3 hedgeVector (GEO_Hedge e) const
 Returns the vector defined by the end-points of e. More...
 
fpreal dstPrimitiveAngle (GEO_Hedge e, UT_Vector3 *nml=0) const
 
fpreal srcPrimitiveAngle (GEO_Hedge e, UT_Vector3 *nml=0) const
 
fpreal dstPrimitiveAngleCos (GEO_Hedge e) const
 Returns the primitives angle at dst of the hedge. More...
 
fpreal srcPrimitiveAngleCos (GEO_Hedge e) const
 Returns the primitives angle at src of the hedge. More...
 
bool isManifoldHedge (GEO_Hedge e, bool accept_bd=false) const
 
bool isBoundaryHedge (GEO_Hedge e) const
 
bool isBridgeHedge (GEO_Hedge e) const
 
bool areOpposite (GEO_Hedge e1, GEO_Hedge e2) const
 
bool areEquivalent (GEO_Hedge e1, GEO_Hedge e2) const
 Returns true if e1 and e2 are equivalent hedges. More...
 
GA_Size numEquivalentHedges (GEO_Hedge e) const
 Returns the number of hedges in the equivalence class of e. More...
 
GA_Size numIncidentEdges (GA_Offset pt) const
 
GA_Size numIncidentHedges (GA_Offset pt) const
 Returns the number of distinct hedges incident to pt. More...
 
GEO_Hedge findHedgeWithEndpoints (GA_Offset p0, GA_Offset p1) const
 Find a hedge with the given endpoints or return GEO_INVLAID_HEDGE. More...
 
GA_Size numIncidentHedgeSupportingPrims (GA_Offset pt) const
 
GEO_Hedge rotateForward (GEO_Hedge e)
 
GEO_Hedge rotateBackward (GEO_Hedge e)
 
bool isFlippable (GEO_Hedge e) const
 
GEO_Hedge flip (GEO_Hedge e)
 
GEO_Hedge unflip (GEO_Hedge e)
 
bool isContractible (GEO_Hedge e) const
 multiple components. More...
 
GA_Offset contract (GEO_Hedge e, bool on_dst=true, fpreal ratio=1.0, bool check_contractible=true)
 
GEO_Hedge split (GEO_Hedge e, fpreal ratio, bool and_equivalent=true, GA_Offset poff=GA_INVALID_OFFSET)
 
GEO_Hedge reversibleSplit (GEO_Hedge e, fpreal ratio, bool and_equivalent=true, GA_Offset poff=GA_INVALID_OFFSET)
 
GEO_Hedge divideHedge (GEO_Hedge e, fpreal ratio, bool and_equivalent=true, GA_Offset poff=GA_INVALID_OFFSET)
 
GEO_Hedge divideHedgePrimitive (GEO_Hedge ekeep, GEO_Hedge edrop)
 
GA_Offset splitHedgePrimitive (GEO_Hedge e, GA_Offset pt=GA_INVALID_OFFSET)
 Subdivides the polygon of e at its barycenter or the supplied point. More...
 
void deletePointStar (GA_Offset pt, bool patch_link=true, GA_Offset patch_prim=GA_INVALID_OFFSET)
 
GA_DetailgetDetail () const
 
SYS_FORCE_INLINE GA_Offset polyPrev (GA_Offset v) const
 
SYS_FORCE_INLINE GA_Offset polyNext (GA_Offset v) const
 
SYS_FORCE_INLINE GA_Offset polyNext (GA_Offset v, GA_Offset &vprev) const
 

Detailed Description

GEO_HedgeInterface provides the interface to deal with a detail's half-edges. Ultimately it's expected to replace GQ. By default the constructor of the class adds two additional half-edge topology attributes to the detail if they're not already present (unless the second parameter is set to false, in which case all operations are handled without the topology attributes and can therefore be much much slower). The destructor of GEO_HedgeInterface removes these topology attributes from detail if they were added by the constructor but leaves them there if they already existed when the class was created.

NOTE: The merge code for topology attributes is not tested and is quite like to fail. It is therefore highly advisable to remove the topology attributes when you're done with them and thereby prevent them from being passed to details downstream.

Definition at line 632 of file GEO_HedgeInterface.h.

Constructor & Destructor Documentation

GEO_HedgeInterface::GEO_HedgeInterface ( GA_Detail gdp,
bool  use_hedge_topology = true 
)
GEO_HedgeInterface::~GEO_HedgeInterface ( )

Member Function Documentation

bool GEO_HedgeInterface::areEquivalent ( GEO_Hedge  e1,
GEO_Hedge  e2 
) const
inline

Returns true if e1 and e2 are equivalent hedges.

Definition at line 950 of file GEO_HedgeInterface.h.

bool GEO_HedgeInterface::areOpposite ( GEO_Hedge  e1,
GEO_Hedge  e2 
) const
inline

Returns true if e1 and e2 are equivalent hedges with opposite orientation.

Definition at line 946 of file GEO_HedgeInterface.h.

GA_Offset GEO_HedgeInterface::contract ( GEO_Hedge  e,
bool  on_dst = true,
fpreal  ratio = 1.0,
bool  check_contractible = true 
)

Contracts e. on_dst, if true, causes the src point to move to the position of the dst point. Otherwise, the dst point is moved to the src point's position. ratio, if not equal to 1.0, places the point of contraction in a convex combination with biases ratio and 1.0 - ratio from src and dst (or the other way around if on_dst is false) respectively.

void GEO_HedgeInterface::deletePointStar ( GA_Offset  pt,
bool  patch_link = true,
GA_Offset  patch_prim = GA_INVALID_OFFSET 
)
void GEO_HedgeInterface::destroyHedgeTopologyLinks ( )
SYS_FORCE_INLINE GEO_Hedge GEO_HedgeInterface::dfirst ( GEO_Hedge  e) const
inline

Definition at line 826 of file GEO_HedgeInterface.h.

GEO_Hedge GEO_HedgeInterface::divideHedge ( GEO_Hedge  e,
fpreal  ratio,
bool  and_equivalent = true,
GA_Offset  poff = GA_INVALID_OFFSET 
)

Inserts a point in the middle of a hedge and divides into two hedges.

ratio determines the position of the new point at which the hedge is split. and_equivalent if true also divides all other hedges equivalent to e at the same point. poff is an optional point offset assumed to be located in

GEO_Hedge GEO_HedgeInterface::divideHedgePrimitive ( GEO_Hedge  ekeep,
GEO_Hedge  edrop 
)

Splits the primitive of a hedge into two primitives by cutting it along a diagonal. The hedges starting from ekeep and ending before edrop are kept in the current primitive while the edges hedges starting at edrop and ending before ekeep end up in the new primitive.

SYS_FORCE_INLINE GEO_Hedge GEO_HedgeInterface::dnext ( GEO_Hedge  e) const
inline

Definition at line 850 of file GEO_HedgeInterface.h.

SYS_FORCE_INLINE GEO_Hedge GEO_HedgeInterface::dprev ( GEO_Hedge  e) const
inline

Definition at line 838 of file GEO_HedgeInterface.h.

GA_Offset GEO_HedgeInterface::dstPoint ( GEO_Hedge  e) const
inline

Returns the point to which the dst vertex is wired.

Definition at line 718 of file GEO_HedgeInterface.h.

UT_Vector3 GEO_HedgeInterface::dstPos3 ( GEO_Hedge  e) const
inline

Returns the positions of the destination point of e.

Definition at line 896 of file GEO_HedgeInterface.h.

fpreal GEO_HedgeInterface::dstPrimitiveAngle ( GEO_Hedge  e,
UT_Vector3 nml = 0 
) const
inline

Returns the primitives angle at dst of the hedge NB. If the angle in question is reflex, then its 2*pi complement is returned unless the normal of the primitive that contains e is passed using the optional nml parameter.

Definition at line 907 of file GEO_HedgeInterface.h.

fpreal GEO_HedgeInterface::dstPrimitiveAngleCos ( GEO_Hedge  e) const
inline

Returns the primitives angle at dst of the hedge.

Definition at line 918 of file GEO_HedgeInterface.h.

GA_Offset GEO_HedgeInterface::dstVertex ( GEO_Hedge  e) const
inline

Returns the dst vertex of the hedge.

Definition at line 700 of file GEO_HedgeInterface.h.

GEO_Hedge GEO_HedgeInterface::findHedgeWithEndpoints ( GA_Offset  p0,
GA_Offset  p1 
) const
inline

Find a hedge with the given endpoints or return GEO_INVLAID_HEDGE.

Definition at line 967 of file GEO_HedgeInterface.h.

GEO_Hedge GEO_HedgeInterface::firstIncidentEdge ( GA_Offset  pt) const
inline

Similar to first/nextIncidentHedge but stops over only one of the hedges in each equivalence class of hedges incident to the point

Definition at line 787 of file GEO_HedgeInterface.h.

GEO_Hedge GEO_HedgeInterface::firstIncidentHedge ( GA_Offset  pt) const
inline

Returns a first incidentHedge to a point. Together with nextIncidentHedge, one can enumerate circularly over all hedges incident to a point.

Definition at line 779 of file GEO_HedgeInterface.h.

GEO_Hedge GEO_HedgeInterface::firstIncomingHedge ( GA_Offset  pt) const
inline

Similar to first/nextIncidentHedge but using only incoming hedges. Note that nextOutgoingHedge does not need the parameter pt anymore.

Definition at line 803 of file GEO_HedgeInterface.h.

GEO_Hedge GEO_HedgeInterface::firstManifoldIncomingHedge ( GEO_Hedge  e) const
inline

Manifold Scan Methods:

A "manifold scan" around a point moves from one incoming (resp outgoing hedge incident to a point to the next in counterclockwise order as long as the hedge in question is a manifold hedge (i.e. it is equivalent to exactly one other hedge oriented oppositely). Returns the first hedge with the same dst as e that is reachable from e through a counterclockwise manifold scan around dst of e. Returns e itself if either: 1) e is already the first such hedge, or 2) the src of e is an interior point of a manifold, ie the counterclockwise scan reaches back at e.

Definition at line 822 of file GEO_HedgeInterface.h.

GEO_Hedge GEO_HedgeInterface::firstManifoldOutgoingHedge ( GEO_Hedge  e) const
inline

Similar to firstManifoldIncomingHedge but finds the first hedge with the same src as e in a counterclockwise scan from e.

Definition at line 855 of file GEO_HedgeInterface.h.

GEO_Hedge GEO_HedgeInterface::firstOutgoingHedge ( GA_Offset  pt) const
inline

Similar to first/nextIncidentHedge but using only outgoing hedges. Note that nextOutgoingHedge does not need the parameter pt anymore.

Definition at line 795 of file GEO_HedgeInterface.h.

GEO_Hedge GEO_HedgeInterface::flip ( GEO_Hedge  e)

Flip e (provided that e is shared between two triangles) and is flippable. Returns the resulting (flipped) hedge (equal to e) or GEO_INVALID_HEDGE if e is not flippable.

GA_Detail* GEO_HedgeInterface::getDetail ( ) const
inline

Definition at line 1105 of file GEO_HedgeInterface.h.

bool GEO_HedgeInterface::haveHedgeTopology ( ) const
inline

Definition at line 641 of file GEO_HedgeInterface.h.

GEO_Primitive* GEO_HedgeInterface::hedgePrimitive ( GEO_Hedge  e) const
inline

Return the polygon to which the hedge belongs. NOTE: may need to modify this if other primitives support hedges.

Definition at line 653 of file GEO_HedgeInterface.h.

GA_Offset GEO_HedgeInterface::hedgePrimitiveOffset ( GEO_Hedge  e) const
inline

Definition at line 659 of file GEO_HedgeInterface.h.

UT_Vector3 GEO_HedgeInterface::hedgeVector ( GEO_Hedge  e) const
inline

Returns the vector defined by the end-points of e.

Definition at line 900 of file GEO_HedgeInterface.h.

bool GEO_HedgeInterface::isBoundaryHedge ( GEO_Hedge  e) const
inline

Returns true if the hedge e is a boundary hedge, i.e. if its equivalence class is singleton.

Definition at line 935 of file GEO_HedgeInterface.h.

bool GEO_HedgeInterface::isBridgeHedge ( GEO_Hedge  e) const
inline

Returns true if the hedge e is a bridge hedge, i.e. if is a manifold hedge and its other equivalent hedge belongs to the same primitive as e does.

Definition at line 941 of file GEO_HedgeInterface.h.

bool GEO_HedgeInterface::isContractible ( GEO_Hedge  e) const

multiple components.

Returns true if the hedge e is contractible, i.e. contracting e does not force a a non-trivial (separating) cycle to collapse. A separating cycle is a closed sequence of edges that if removed (together with their incident geometry elements) the number of connected components

bool GEO_HedgeInterface::isFlippable ( GEO_Hedge  e) const

Returns true if e can be flipped without the result overlapping an existing hedge. In other words, e is flippable if its endpoints are not endpoints of an existing edge in the geometry before the flip that is not equivalent to e.

bool GEO_HedgeInterface::isManifoldHedge ( GEO_Hedge  e,
bool  accept_bd = false 
) const
inline

Returns true if the hedge e is a manifold hedge, if accept_bd is false, this means that the equivalence class of e consists of exactly two hedges oriented oppositely. If accept_bd is true, then the equivalence class of e can also consist of a single (boundary) half-edge.

Definition at line 930 of file GEO_HedgeInterface.h.

bool GEO_HedgeInterface::isPrimary ( GEO_Hedge  e) const

returns true of e is the primary hedge in its equivalence class. Each equivalence class of hedges at any time has a unique primary hedge. This is used for example to enumerate over all edges in the detail (as opposed to over all hedges).

bool GEO_HedgeInterface::isValidHedge ( GEO_Hedge e) const

Check whether a hedge is valid: a hedge is valid if 1: its src vertex belongs to a primitive that supports hedges, and 2: the primitive returns a valid next boundary vertex for its dst vertex.

See Also
: GA_Topology.h
fpreal GEO_HedgeInterface::length ( GEO_Hedge  e) const
inline

Returns the length of the hedge e. Note that it requires the endpoints of e to be determined.

Definition at line 888 of file GEO_HedgeInterface.h.

SYS_FORCE_INLINE GEO_Hedge GEO_HedgeInterface::lnext ( GEO_Hedge  e) const
inline

Definition at line 737 of file GEO_HedgeInterface.h.

SYS_FORCE_INLINE GEO_Hedge GEO_HedgeInterface::lprev ( GEO_Hedge  h) const
inline

Definition at line 747 of file GEO_HedgeInterface.h.

GEO_Hedge GEO_HedgeInterface::nextEquivalentHedge ( GEO_Hedge  e) const

Returns the "next" equivalent hedge to e: two hedges are equivalent if either their dsts and srcs are respectively wired to the same points or if the dst of each is wired to the same point as the src of the other. calling nextEquivalentHedge() repeatedly returns back to the original hedge. Thus to check if hedge e is manifold hedge one can check that: nextEquivalentHedge(e) != e && nextEquivalentHedge(nextEquivalentHedge(e)) == e

GEO_Hedge GEO_HedgeInterface::nextIncidentEdge ( GEO_Hedge  e,
GA_Offset  pt 
) const
inline

Definition at line 790 of file GEO_HedgeInterface.h.

GEO_Hedge GEO_HedgeInterface::nextIncidentHedge ( GEO_Hedge  e,
GA_Offset  pt 
) const
inline

Definition at line 782 of file GEO_HedgeInterface.h.

GEO_Hedge GEO_HedgeInterface::nextIncomingHedge ( GEO_Hedge  e) const
inline

Definition at line 806 of file GEO_HedgeInterface.h.

GEO_Hedge GEO_HedgeInterface::nextManifoldIncomingHedge ( GEO_Hedge  e) const
inline

Returns the next hedge with the same dst as e in a counterclockwise manifold scan, returns GEO_INVALID_HEDGE if no such hedge exists.

NOTE: This is equivalent to dnext() operation in Quad-Edge terminology, which is also used in GQ.

Definition at line 846 of file GEO_HedgeInterface.h.

GEO_Hedge GEO_HedgeInterface::nextManifoldOutgoingHedge ( GEO_Hedge  e) const
inline

Returns the next hedge with the same src as e in a counterclockwise manifold scan, returns GEO_INVALID_HEDGE if no such hedge exists.

NOTE: This is equivalent to onext() operation in Quad-Edge terminology, which is also used in GQ.

Definition at line 879 of file GEO_HedgeInterface.h.

GEO_Hedge GEO_HedgeInterface::nextOutgoingHedge ( GEO_Hedge  e) const
inline

Definition at line 798 of file GEO_HedgeInterface.h.

GEO_Hedge GEO_HedgeInterface::nextPrimitiveHedge ( GEO_Hedge  e) const
inline

Returns the next hedge (hedge with src equal to the dst of the parameter hedge) in the polygon that contains the parameter hedge

Definition at line 733 of file GEO_HedgeInterface.h.

GA_Size GEO_HedgeInterface::numEquivalentHedges ( GEO_Hedge  e) const
inline

Returns the number of hedges in the equivalence class of e.

Definition at line 954 of file GEO_HedgeInterface.h.

GA_Size GEO_HedgeInterface::numIncidentEdges ( GA_Offset  pt) const
inline

Returns the number if edges incident to a point (equivalent hedges count as 1).

Definition at line 959 of file GEO_HedgeInterface.h.

GA_Size GEO_HedgeInterface::numIncidentHedges ( GA_Offset  pt) const
inline

Returns the number of distinct hedges incident to pt.

Definition at line 963 of file GEO_HedgeInterface.h.

GA_Size GEO_HedgeInterface::numIncidentHedgeSupportingPrims ( GA_Offset  pt) const

Returns the number of primitives that have pt as a vertex and support hedges.

SYS_FORCE_INLINE GEO_Hedge GEO_HedgeInterface::ofirst ( GEO_Hedge  e) const
inline

Definition at line 859 of file GEO_HedgeInterface.h.

SYS_FORCE_INLINE GEO_Hedge GEO_HedgeInterface::onext ( GEO_Hedge  e) const
inline

Definition at line 883 of file GEO_HedgeInterface.h.

SYS_FORCE_INLINE GEO_Hedge GEO_HedgeInterface::oprev ( GEO_Hedge  e) const
inline

Definition at line 871 of file GEO_HedgeInterface.h.

GEO_Hedge GEO_HedgeInterface::otherPrimitiveHedgeAtPoint ( GEO_Hedge  h,
GA_Offset  pt 
) const
inline

Returns the "other" (than h) hedge in the polygon of h that has the pt as an endpoint.

Definition at line 752 of file GEO_HedgeInterface.h.

SYS_FORCE_INLINE GA_Offset GEO_HedgeInterface::pointVertex ( GA_Offset  vtx) const
inline

Definition at line 685 of file GEO_HedgeInterface.h.

GA_Offset GEO_HedgeInterface::polyNext ( GA_Offset  v) const

Definition at line 1135 of file GEO_HedgeInterface.h.

GA_Offset GEO_HedgeInterface::polyNext ( GA_Offset  v,
GA_Offset vprev 
) const

Definition at line 1143 of file GEO_HedgeInterface.h.

GA_Offset GEO_HedgeInterface::polyPrev ( GA_Offset  v) const

Definition at line 1126 of file GEO_HedgeInterface.h.

GA_Offset GEO_HedgeInterface::postDstPoint ( GEO_Hedge  e) const
inline

Returns the point to which the post-dst vertex is wired

See Also
: postDstVertex()

Definition at line 728 of file GEO_HedgeInterface.h.

GA_Offset GEO_HedgeInterface::postDstVertex ( GEO_Hedge  e) const
inline

Returns the vertex after the dst of the vertex of the hedge in the poly to which the hedge belongs

Definition at line 710 of file GEO_HedgeInterface.h.

GA_Offset GEO_HedgeInterface::preSrcPoint ( GEO_Hedge  e) const
inline

Returns the point to which the pre-src vertex is wired.

See Also
: preSrcVertex()

Definition at line 723 of file GEO_HedgeInterface.h.

GA_Offset GEO_HedgeInterface::preSrcVertex ( GEO_Hedge  e) const
inline

Returns the vertex before the src vertex of the hedge in the poly to which the hedge belongs

Definition at line 705 of file GEO_HedgeInterface.h.

GEO_Hedge GEO_HedgeInterface::prevManifoldIncomingHedge ( GEO_Hedge  e) const
inline

Returns the previous hedge with the same dst as e in a counterclockwise manifold scan, returns GEO_INVALID_HEDGE if no such hedge exists.

NOTE: This is equivalent to dprev() operation in Quad-Edge terminology, which is also used in GQ.

Definition at line 834 of file GEO_HedgeInterface.h.

GEO_Hedge GEO_HedgeInterface::prevManifoldOutgoingHedge ( GEO_Hedge  e) const
inline

Returns the previous hedge with the same src as e in a counterclockwise.

NOTE: This is equivalent to oprev() operation in Quad-Edge terminology, which is also used in GQ.

Definition at line 867 of file GEO_HedgeInterface.h.

GEO_Hedge GEO_HedgeInterface::prevPrimitiveHedge ( GEO_Hedge  h) const
inline

Returns the previous hedge (hedge whose dst is the same as the src of the parameter hedge) in the polygon that contains the parameter hedge.

Definition at line 743 of file GEO_HedgeInterface.h.

SYS_FORCE_INLINE GEO_Hedge GEO_HedgeInterface::primary ( GEO_Hedge  e) const
inline

Definition at line 773 of file GEO_HedgeInterface.h.

GEO_Hedge GEO_HedgeInterface::primaryEquivalentHedge ( GEO_Hedge  e) const

Returns the primary hedge equivalent to the argument hedge.

GEO_Hedge GEO_HedgeInterface::reversibleSplit ( GEO_Hedge  e,
fpreal  ratio,
bool  and_equivalent = true,
GA_Offset  poff = GA_INVALID_OFFSET 
)
GEO_Hedge GEO_HedgeInterface::rotateBackward ( GEO_Hedge  e)

Complete reverse of rotateForward (all the point, vertex, and primitive offsets are restored). When the incident primitives are triangles, rotating forward or backward result in the same edge but they are not exactly identical. In particular, two consecutive flips on the same edge will reverse the orientation of the edge.

GEO_Hedge GEO_HedgeInterface::rotateForward ( GEO_Hedge  e)

Rotate e forward, provided that e is a manifold hedge (equivalent to exactly one other hedge f oppositely oriented. This is not checked and the topology may be corrupted if rotate is applied to non-manifold or boundary edges. Returns the resulting hedge which happens to be equal to e (The input hedge will be the hedge that rotates (same src vertex) and the same holds for the equivalent edge of e.

---—>---—> ---—>---—> ^ |^ | ^ /7| | || | | // | | e || | ===> | e // | | || | | // | | v| v | // v <---—<---— |L/<—<---—

Note that this operation is precisely an edge flip if the two primitives involved are triangles.

void GEO_HedgeInterface::setWranglerCache ( GA_ElementWranglerCache wc)
inline

If a wrangler cache is set, the operations involving hedges use it to wrangle attributes. To stop wrangling, the method can be called with NULL as parameter.

Definition at line 648 of file GEO_HedgeInterface.h.

GEO_Hedge GEO_HedgeInterface::split ( GEO_Hedge  e,
fpreal  ratio,
bool  and_equivalent = true,
GA_Offset  poff = GA_INVALID_OFFSET 
)

Splits the hedge e and its incident polygon (assumed to be a triangle, although it doesn't fail if it isn't). ratio determines the position of the new point at which the hedge is split. and_equivalent if true also splits all other hedges equivalent to e at the same point. poff is an optional point offset assumed to be located in

GA_Offset GEO_HedgeInterface::splitHedgePrimitive ( GEO_Hedge  e,
GA_Offset  pt = GA_INVALID_OFFSET 
)

Subdivides the polygon of e at its barycenter or the supplied point.

GA_Offset GEO_HedgeInterface::srcPoint ( GEO_Hedge  e) const
inline

Returns the point to which the src vertex is wired.

Definition at line 714 of file GEO_HedgeInterface.h.

UT_Vector3 GEO_HedgeInterface::srcPos3 ( GEO_Hedge  e) const
inline

Returns the positions of the source point of e.

Definition at line 892 of file GEO_HedgeInterface.h.

fpreal GEO_HedgeInterface::srcPrimitiveAngle ( GEO_Hedge  e,
UT_Vector3 nml = 0 
) const
inline

Returns the primitives angle at src of the hedge NB. If the angle in question is reflex, then its 2*pi complement is returned unless the normal of the primitive that contains e is passed using the optional nml parameter.

Definition at line 914 of file GEO_HedgeInterface.h.

fpreal GEO_HedgeInterface::srcPrimitiveAngleCos ( GEO_Hedge  e) const
inline

Returns the primitives angle at src of the hedge.

Definition at line 922 of file GEO_HedgeInterface.h.

GA_Offset GEO_HedgeInterface::srcVertex ( GEO_Hedge  e) const
inline

Returns the src vertex of the hedge.

Definition at line 696 of file GEO_HedgeInterface.h.

SYS_FORCE_INLINE GEO_Hedge GEO_HedgeInterface::sym ( GEO_Hedge  e) const
inline

Definition at line 766 of file GEO_HedgeInterface.h.

GEO_Hedge GEO_HedgeInterface::unflip ( GEO_Hedge  e)

unflip is the reverse of a flip. Doing a flip followed by an unflip should result in the same mesh with the same vertex/point/primitive offsets and indices (but the vertices within primitives may shift).

SYS_FORCE_INLINE GA_Offset GEO_HedgeInterface::vertexPoint ( GA_Offset  vtx) const
inline

Definition at line 671 of file GEO_HedgeInterface.h.

SYS_FORCE_INLINE GA_Offset GEO_HedgeInterface::vertexPrimitive ( GA_Offset  vtx) const
inline

Definition at line 675 of file GEO_HedgeInterface.h.

SYS_FORCE_INLINE GA_Offset GEO_HedgeInterface::vertexToNextVertex ( GA_Offset  vtx) const
inline

Definition at line 681 of file GEO_HedgeInterface.h.


The documentation for this class was generated from the following file: