Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
/
struct Geo RastFragment

    This is the documentation for Enlighten.

    struct Geo RastFragment

    Sept 09, 2025

    struct Geo::RastFragment

    stores a fragment of a triangle i.e. a triangle clipped to a pixel box

    Variables

    Name Description
    Geo::u32 m_NumPts

    number of points in fragment polygon

    const RastVert * m_Points

    fragment polygon points; coordinates are in [0,1]x[0,1] i.e.

    const RastTri * m_Tri

    reference to triangle that owns this fragment

    Geo::s32 m_X

    integer coordinates of (top-left of) pixel

    Geo::s32 m_Y

    integer coordinates of (top-left of) pixel

    Functions

    Name Description
    GetArea()

    get signed area of fragment polygon; it's flipped if area < 0

    GetBarycentricCoords(float, float, float &, float &)

    get barycentric coordinates of a point in the pixel

    GetCentroid(RastVert &)

    get centroid of fragment polygon (average of vertex positions)

    IsPtInPoly(float, float)

    is a given point in the fragment polygon?


    float Geo::RastFragment::GetArea


    public: float GetArea() const


    get signed area of fragment polygon; it's flipped if area < 0


    void Geo::RastFragment::GetBarycentricCoords


    public: void GetBarycentricCoords
    (
        float x,
        float y,
        float & u,
        float & v
    ) const


    get barycentric coordinates of a point in the pixel


    void Geo::RastFragment::GetCentroid


    public: void GetCentroid
    (
        RastVert & out
    ) const


    get centroid of fragment polygon (average of vertex positions)


    bool Geo::RastFragment::IsPtInPoly


    public: bool IsPtInPoly
    (
        float x,
        float y
    ) const


    is a given point in the fragment polygon?

    , multiple selections available,

    Enlighten API 4.03 Documentation
    Results will update as you type.
      Calendars

    You‘re viewing this with anonymous access, so some content might be blocked.
    {"serverDuration": 11, "requestCorrelationId": "d09b21971ddc420abf47677fc3483b14"}