Open Search
    PgonEdge Class Reference

    #include <lib_ngon.h>

    Public Member Functions

    Bool IsFirst () const
     
    Bool IsSegmentEnd () const
     
    Int32 ID () const
     
    Int32 State () const
     
    Int32 Edge () const
     
    Int32 EdgeIndex () const
     
    void GetEdge (const CPolygon *vadr, Int32 &p1, Int32 &p2) const
     
    void RemapPolygon (Int32 new_poly, Int32 new_edge)
     

    Public Attributes

    UInt32 edge_index
     

    Member Function Documentation

    ◆ IsFirst()

    Bool IsFirst ( ) const

    Checks if the polygon ID is the first occurrence in the array. This is useful to know which polygons form the N-gon.

    Returns
    true if the polygon ID is the first occurrence in the array, otherwise false.

    ◆ IsSegmentEnd()

    Bool IsSegmentEnd ( ) const

    Checks if the edge is the last in a segment.

    Returns
    true if the edge is the last in a segment, otherwise false.

    ◆ ID()

    Int32 ID ( ) const

    Gets the polygon ID.

    Returns
    The polygon ID.

    ◆ State()

    Int32 State ( ) const

    Gets the edge state.

    Returns
    The edge as a bit, or 0 if the polygon has no edge on the outer/inner of the N-gon.

    ◆ Edge()

    Int32 Edge ( ) const

    Gets the edge for the polygon.

    Returns
    The edge of the polygon, or NOTOK for no edge.

    ◆ EdgeIndex()

    Int32 EdgeIndex ( ) const

    Gets the edge index.

    Returns
    The edge index: 4 * polygon ID + edge.

    ◆ GetEdge()

    void GetEdge ( const CPolygon vadr,
    Int32 p1,
    Int32 p2 
    ) const

    Retrieves in p1 and p2 the point IDs for the edge or NOTINDEX if it is not an N-gon edge.

    Parameters
    [in]vadrThe polygon array. The caller owns the pointed array.
    [out]p1Assigned the first point ID.
    [out]p2Assigned the second point ID.

    ◆ RemapPolygon()

    void RemapPolygon ( Int32  new_poly,
    Int32  new_edge 
    )

    Sets the polygon ID and edge ID for the edge. Pass NOTINDEX to make no change.

    Parameters
    [in]new_polyThe new polygon ID.
    [in]new_edgeThe new edge ID.

    Member Data Documentation

    ◆ edge_index

    UInt32 edge_index

    Edge index.