ofDocsdocumentation graphics ofPolyline (functions)

ofPolyline (functions)


ofInsidePoly( ... )

bool ofInsidePoly(const T &p, const int &poly)

Determine if an glm::vec3 is within the polygon defined by a vector of glm::vec3s.

Parameters:

p A point to check.

poly A vector of glm::vec3s defining a polygon.

Returns: True if the glm::vec3 is enclosed, false otherwise.


ofInsidePoly( ... )

bool ofInsidePoly(float x, float y, const int &polygon)

Determine if an (x,y) coordinate is within the polygon defined by a vector of glm::vec3s.

Parameters:

x The x dimension of the coordinate.

y The y dimension of the coordinate.

poly a vector of glm::vec3s defining a polygon.

Returns: True if the point defined by the coordinates is enclosed, false otherwise.