Support Forum       G3D Web Page     
Public Member Functions | List of all members
G3D::ConvexPolygon2D Class Reference

Public Member Functions

 ConvexPolygon2D ()
 
 ConvexPolygon2D (const Array< Vector2 > &pts, bool reverse=false)
 
Points are counter-clockwise in a Y = down, X = right coordinate system. More...
 
bool contains (const Vector2 &p, bool reverseWinding=false) const
 
int numVertices () const
 
const Vector2vertex (int index) const
 

Constructor & Destructor Documentation

◆ ConvexPolygon2D() [1/2]

G3D::ConvexPolygon2D::ConvexPolygon2D ( )
inline

◆ ConvexPolygon2D() [2/2]

G3D::ConvexPolygon2D::ConvexPolygon2D ( const Array< Vector2 > &  pts,
bool  reverse = false 
)


Points are counter-clockwise in a Y = down, X = right coordinate system.

Parameters
reverseIf true, the points are reversed (i.e. winding direction is changed) before the polygon is created.

Member Function Documentation

◆ contains()

bool G3D::ConvexPolygon2D::contains ( const Vector2 p,
bool  reverseWinding = false 
) const
Parameters
reverseWindingIf true, the winding direction of the polygon is reversed for this test.

◆ numVertices()

int G3D::ConvexPolygon2D::numVertices ( ) const
inline

◆ vertex()

const Vector2& G3D::ConvexPolygon2D::vertex ( int  index) const
inline

documentation generated on Wed Nov 24 2021 08:01:54 using doxygen 1.8.15