34 inline Polygon(
const vector<Point> &vertices)
46 for (
typename vector<Point>::const_iterator it = poly.
getVertices().begin();
87 for (
typename vector<Point>::iterator it =
_vertices.begin(); it !=
_vertices.end(); it++) {
107 for (
typename vector<Point>::const_iterator it = vertices.begin(); it != vertices.end(); it++)
133 for (
typename vector<Point>::iterator it =
_vertices.begin(); it !=
_vertices.end(); it++) {
134 for (
uint i = 0;
i < Point::dim();
i++) {
155 MEM_CXX_CLASS_ALLOC_FUNCS(
"Freestyle:Geometry:Polygon")
Various tools for geometry.
Vectors and Matrices (useful type definitions).
Read Guarded memory(de)allocation.
ATTR_WARN_UNUSED_RESULT const BMVert * v
void setNormal(const Vec3r &normal)
Polygon3r(const vector< Vec3r > &vertices, const Vec3r &normal)
Polygon3r(const Polygon3r &poly)
bool rayIntersect(const Vec3r &orig, const Vec3r &dir, real &t, real &u, real &v, real epsilon=M_EPSILON) const
Polygon(const vector< Point > &vertices)
void setVertices(const vector< Point > &vertices)
vector< Point > _vertices
void getBBox(Point &min, Point &max) const
Polygon(const Polygon< Point > &poly)
const vector< Point > & getVertices() const
bool intersectRayTriangle(const Vec3r &orig, const Vec3r &dir, const Vec3r &v0, const Vec3r &v1, const Vec3r &v2, real &t, real &u, real &v, const real epsilon)
VecMat::Vec3< real > Vec3r
static const real M_EPSILON