library of assembled shared sources |
http://lass.cocamware.com |
#include <simple_polygon_2d.h>
Data Structures | |
struct | Rebind |
Public Types | |
enum | { dimension = TPoint::dimension } |
typedef SimplePolygon2D< T, NoDegenerate > | TSelf |
typedef DegeneratePolicy | TDegeneratePolicy |
typedef Point2D< T > | TPoint |
typedef Point2DH< T > | TPointH |
typedef TPoint::TVector | TVector |
typedef LineSegment2D< T > | TLineSegment |
typedef TPoint::TValue | TValue |
typedef TPoint::TParam | TParam |
typedef TPoint::TReference | TReference |
typedef TPoint::TConstReference | TConstReference |
typedef TPoint::TNumTraits | TNumTraits |
Public Member Functions | |
SimplePolygon2D () | |
template<typename InputIterator > | |
SimplePolygon2D (InputIterator iFirstVertex, InputIterator iLastVertex) | |
const TPoint & | operator[] (size_t iIndexOfVertex) const |
return vertex of polygon by its index, not wrapped, no bounds check. | |
TPoint & | operator[] (size_t iIndexOfVertex) |
return vertex of polygon by its index, not wrapped, no bounds check. | |
const TPoint & | at (int iIndexOfVertex) const |
return vertex of polygon by its index, but wrap around the bounds. | |
TPoint & | at (int iIndexOfVertex) |
return vertex of polygon by its index, but wrap around the bounds. | |
const TLineSegment | edge (int iIndexOfTailVertex) const |
return the edge of the polygon between vertices at(iIndex) and at(iIndex + 1). | |
const TVector | vector (int iIndexOfTailVertex) const |
return the vector between vertices at(iIndex) and at(iIndex + 1)\ | |
void | add (const TPoint &iVertex) |
add a point at the "end" of the vertex list. | |
void | insert (int iIndexOfVertex, const TPoint &iVertex) |
insert a vertex at iIndex (so it will sit before the current at(iIndex)). | |
void | erase (int iIndexOfVertex) |
remove the vertex at(iIndex) | |
const bool | isEmpty () const |
return true if polygon has no vertices | |
const size_t | size () const |
return number of vertices | |
const TValue | signedArea () const |
return signed polygon area. | |
const TValue | area () const |
return area of the polygons surface. | |
const TValue | perimeter () const |
return sum of the lengths of all edges | |
const TPointH | vertexCentroid () const |
return the barycenter of all vertices. | |
const TPointH | surfaceCentroid () const |
return the centroid of the filled polygon. | |
const bool | isSimple () const |
return true if polygon is simple, false if not. | |
const bool | isConvex () const |
return true if polygon is convex, false if not. | |
const Orientation | orientation () const |
return orientation of polygon. | |
const bool | isReflex (int iIndexOfVertex) const |
return true if inner angle of vertex is reflex (is > 180 degrees). | |
const Side | classify (const TPoint &iP) const |
const bool | contains (const TPoint &iP) const |
return true when a point is inside or on a polygon. | |
void | flip () |
flip orientation of polygon. | |
void | fixDegenerate () |
fixes degenerate polygons as far as possible. | |
const bool | isValid () const |
a simple polygon is valid if it is not degenerate. | |
Private Types | |
typedef std::vector< TPoint > | TVertices |
Private Member Functions | |
const bool | isInRange (int iIndexOfVertex) const |
return if index of vertex is in range of the std::vector | |
Private Attributes | |
TVertices | vertices_ |
Related Functions | |
(Note that these are not member functions.) | |
template<typename T , class DP , class NP , class PP > | |
Result | intersect (const SimplePolygon2D< T, DP > &polygon, const Ray2D< T, NP, PP > &ray, T &t, const T &tMin=T()) |
Find the intersection of a ray and a triangle by their parameter t on the ray. | |
template<typename T , class DP > | |
io::XmlOStream & | operator<< (io::XmlOStream &ioOStream, const SimplePolygon2D< T, DP > &iPolygon) |
template<typename T , class DP > | |
std::ostream & | operator<< (std::ostream &ioOStream, const SimplePolygon2D< T, DP > &iPolygon) |
template<typename T , class DP > | |
lass::io::MatlabOStream & | operator<< (lass::io::MatlabOStream &oOStream, const SimplePolygon2D< T, DP > &iPolygon) |
Definition at line 73 of file simple_polygon_2d.h.
typedef SimplePolygon2D<T, NoDegenerate> lass::prim::SimplePolygon2D< T, DegeneratePolicy >::TSelf |
Definition at line 77 of file simple_polygon_2d.h.
typedef DegeneratePolicy lass::prim::SimplePolygon2D< T, DegeneratePolicy >::TDegeneratePolicy |
Definition at line 78 of file simple_polygon_2d.h.
typedef Point2D<T> lass::prim::SimplePolygon2D< T, DegeneratePolicy >::TPoint |
Definition at line 80 of file simple_polygon_2d.h.
typedef Point2DH<T> lass::prim::SimplePolygon2D< T, DegeneratePolicy >::TPointH |
Definition at line 81 of file simple_polygon_2d.h.
typedef TPoint::TVector lass::prim::SimplePolygon2D< T, DegeneratePolicy >::TVector |
Definition at line 82 of file simple_polygon_2d.h.
typedef LineSegment2D<T> lass::prim::SimplePolygon2D< T, DegeneratePolicy >::TLineSegment |
Definition at line 83 of file simple_polygon_2d.h.
typedef TPoint::TValue lass::prim::SimplePolygon2D< T, DegeneratePolicy >::TValue |
Definition at line 85 of file simple_polygon_2d.h.
typedef TPoint::TParam lass::prim::SimplePolygon2D< T, DegeneratePolicy >::TParam |
Definition at line 86 of file simple_polygon_2d.h.
typedef TPoint::TReference lass::prim::SimplePolygon2D< T, DegeneratePolicy >::TReference |
Definition at line 87 of file simple_polygon_2d.h.
typedef TPoint::TConstReference lass::prim::SimplePolygon2D< T, DegeneratePolicy >::TConstReference |
Definition at line 88 of file simple_polygon_2d.h.
typedef TPoint::TNumTraits lass::prim::SimplePolygon2D< T, DegeneratePolicy >::TNumTraits |
Definition at line 89 of file simple_polygon_2d.h.
typedef std::vector<TPoint> lass::prim::SimplePolygon2D< T, DegeneratePolicy >::TVertices [private] |
Definition at line 139 of file simple_polygon_2d.h.
anonymous enum |
lass::prim::SimplePolygon2D< T, DP >::SimplePolygon2D | ( | ) | [inline] |
Definition at line 57 of file simple_polygon_2d.inl.
lass::prim::SimplePolygon2D< T, DP >::SimplePolygon2D | ( | InputIterator | iFirstVertex, | |
InputIterator | iLastVertex | |||
) | [inline] |
Definition at line 66 of file simple_polygon_2d.inl.
const SimplePolygon2D< T, DP >::TPoint & lass::prim::SimplePolygon2D< T, DP >::operator[] | ( | size_t | iIndexOfVertex | ) | const [inline] |
return vertex of polygon by its index, not wrapped, no bounds check.
Definition at line 77 of file simple_polygon_2d.inl.
References LASS_ASSERT, and lass::prim::SimplePolygon2D< T, DegeneratePolicy >::vertices_.
SimplePolygon2D< T, DP >::TPoint & lass::prim::SimplePolygon2D< T, DP >::operator[] | ( | size_t | iIndexOfVertex | ) | [inline] |
return vertex of polygon by its index, not wrapped, no bounds check.
Definition at line 89 of file simple_polygon_2d.inl.
References LASS_ASSERT, and lass::prim::SimplePolygon2D< T, DegeneratePolicy >::vertices_.
const SimplePolygon2D< T, DP >::TPoint & lass::prim::SimplePolygon2D< T, DP >::at | ( | int | iIndexOfVertex | ) | const [inline] |
return vertex of polygon by its index, but wrap around the bounds.
this->at(-1) will return the same vertex as this->at(this->size() - 1);
an | exception is thrown if polygon is empty |
Definition at line 103 of file simple_polygon_2d.inl.
References lass::prim::SimplePolygon2D< T, DegeneratePolicy >::isEmpty(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::isInRange(), LASS_ASSERT, LASS_ENFORCE, lass::num::mod(), and lass::prim::SimplePolygon2D< T, DegeneratePolicy >::vertices_.
Referenced by lass::prim::SimplePolygon2D< T, DegeneratePolicy >::edge(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::fixDegenerate(), and lass::prim::SimplePolygon2D< T, DegeneratePolicy >::vector().
SimplePolygon2D< T, DP >::TPoint & lass::prim::SimplePolygon2D< T, DP >::at | ( | int | iIndexOfVertex | ) | [inline] |
return vertex of polygon by its index, but wrap around the bounds.
this->at(-1) will return the same vertex as this->at(this->size() - 1);
an | exception is thrown if polygon is empty |
Definition at line 119 of file simple_polygon_2d.inl.
References lass::prim::SimplePolygon2D< T, DegeneratePolicy >::isEmpty(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::isInRange(), LASS_ASSERT, LASS_ENFORCE, lass::num::mod(), and lass::prim::SimplePolygon2D< T, DegeneratePolicy >::vertices_.
const SimplePolygon2D< T, DP >::TLineSegment lass::prim::SimplePolygon2D< T, DP >::edge | ( | int | iIndexOfTailVertex | ) | const [inline] |
return the edge of the polygon between vertices at(iIndex) and at(iIndex + 1).
an | exception is thrown if polygon has less than two vertices |
Definition at line 135 of file simple_polygon_2d.inl.
References lass::prim::SimplePolygon2D< T, DegeneratePolicy >::at().
Referenced by lass::prim::SimplePolygon2D< T, DegeneratePolicy >::isSimple().
const SimplePolygon2D< T, DP >::TVector lass::prim::SimplePolygon2D< T, DP >::vector | ( | int | iIndexOfTailVertex | ) | const [inline] |
return the vector between vertices at(iIndex) and at(iIndex + 1)\
Definition at line 147 of file simple_polygon_2d.inl.
References lass::prim::SimplePolygon2D< T, DegeneratePolicy >::at().
Referenced by lass::prim::SimplePolygon2D< T, DegeneratePolicy >::fixDegenerate(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::isConvex(), and lass::prim::SimplePolygon2D< T, DegeneratePolicy >::isReflex().
void lass::prim::SimplePolygon2D< T, DP >::add | ( | const TPoint & | iVertex | ) | [inline] |
add a point at the "end" of the vertex list.
this is almost the same as insert(0, iVertex)
with the difference that add(iVertex)
is also valid for empty polygons.
Definition at line 160 of file simple_polygon_2d.inl.
References lass::prim::SimplePolygon2D< T, DegeneratePolicy >::vertices_.
Referenced by lass::prim::SimplePolygon3D< T, PlaneEquationPolicy, PlaneNormalizingPolicy >::mapping(), and lass::spat::PlanarMesh::polygon().
void lass::prim::SimplePolygon2D< T, DP >::insert | ( | int | iIndexOfVertex, | |
const TPoint & | iVertex | |||
) | [inline] |
insert a vertex at iIndex (so it will sit before the current at(iIndex)).
Definition at line 169 of file simple_polygon_2d.inl.
References lass::prim::SimplePolygon2D< T, DegeneratePolicy >::isEmpty(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::isInRange(), LASS_ASSERT, LASS_ENFORCE, lass::num::mod(), and lass::prim::SimplePolygon2D< T, DegeneratePolicy >::vertices_.
void lass::prim::SimplePolygon2D< T, DP >::erase | ( | int | iIndexOfVertex | ) | [inline] |
remove the vertex at(iIndex)
Definition at line 183 of file simple_polygon_2d.inl.
References lass::prim::SimplePolygon2D< T, DegeneratePolicy >::isEmpty(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::isInRange(), LASS_ASSERT, LASS_ENFORCE, lass::num::mod(), and lass::prim::SimplePolygon2D< T, DegeneratePolicy >::vertices_.
Referenced by lass::prim::SimplePolygon2D< T, DegeneratePolicy >::fixDegenerate().
const bool lass::prim::SimplePolygon2D< T, DP >::isEmpty | ( | ) | const [inline] |
return true if polygon has no vertices
Definition at line 196 of file simple_polygon_2d.inl.
References lass::prim::SimplePolygon2D< T, DegeneratePolicy >::vertices_.
Referenced by lass::prim::SimplePolygon2D< T, DegeneratePolicy >::at(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::erase(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::insert(), and lass::prim::SimplePolygon2D< T, DegeneratePolicy >::isReflex().
const size_t lass::prim::SimplePolygon2D< T, DP >::size | ( | ) | const [inline] |
return number of vertices
Definition at line 206 of file simple_polygon_2d.inl.
References lass::prim::SimplePolygon2D< T, DegeneratePolicy >::vertices_.
Referenced by lass::prim::Aabb2D< T, MinMaxPolicy >::aabb(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::contains(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::fixDegenerate(), lass::spat::PlanarMesh::insertPolygon(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::intersect(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::isConvex(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::isInRange(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::isSimple(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::isValid(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::operator<<(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::perimeter(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::signedArea(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::surfaceCentroid(), lass::prim::triangulate(), and lass::prim::SimplePolygon2D< T, DegeneratePolicy >::vertexCentroid().
const SimplePolygon2D< T, DP >::TValue lass::prim::SimplePolygon2D< T, DP >::signedArea | ( | ) | const [inline] |
return signed polygon area.
The area of a convex polygon is defined to be positive if the points are arranged in a counterclockwise order, and negative if they are in clockwise order., Eric W. Weisstein. "Polygon Area." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/PolygonArea.html
Definition at line 229 of file simple_polygon_2d.inl.
References lass::prim::perpDot(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::size(), lass::stde::T, lass::prim::SimplePolygon2D< T, DegeneratePolicy >::vertices_, and lass::num::NumTraits< C >::zero.
Referenced by lass::prim::SimplePolygon2D< T, DegeneratePolicy >::area(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::fixDegenerate(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::isReflex(), and lass::prim::SimplePolygon2D< T, DegeneratePolicy >::isValid().
const SimplePolygon2D< T, DP >::TValue lass::prim::SimplePolygon2D< T, DP >::area | ( | ) | const [inline] |
return area of the polygons surface.
The area of a surface is the amount of material needed to "cover" it completely, Eric W. Weisstein. "Area." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/Area.html
Definition at line 259 of file simple_polygon_2d.inl.
References lass::num::abs(), and lass::prim::SimplePolygon2D< T, DegeneratePolicy >::signedArea().
const SimplePolygon2D< T, DP >::TValue lass::prim::SimplePolygon2D< T, DP >::perimeter | ( | ) | const [inline] |
return sum of the lengths of all edges
Definition at line 284 of file simple_polygon_2d.inl.
References lass::prim::distance(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::size(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::vertices_, and lass::num::NumTraits< C >::zero.
const SimplePolygon2D< T, DP >::TPointH lass::prim::SimplePolygon2D< T, DP >::vertexCentroid | ( | ) | const [inline] |
return the barycenter of all vertices.
The vertex centroid is the homogenous sum of all vertices.
Definition at line 304 of file simple_polygon_2d.inl.
References lass::prim::SimplePolygon2D< T, DegeneratePolicy >::size(), and lass::prim::SimplePolygon2D< T, DegeneratePolicy >::vertices_.
Referenced by lass::prim::SimplePolygon2D< T, DegeneratePolicy >::surfaceCentroid().
const SimplePolygon2D< T, DP >::TPointH lass::prim::SimplePolygon2D< T, DP >::surfaceCentroid | ( | ) | const [inline] |
return the centroid of the filled polygon.
Eric W. Weisstein. "Geometric Centroid." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/GeometricCentroid.html
Definition at line 331 of file simple_polygon_2d.inl.
References lass::prim::perpDot(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::size(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::vertexCentroid(), and lass::prim::SimplePolygon2D< T, DegeneratePolicy >::vertices_.
Referenced by lass::spat::PlanarMesh::floodPolygon(), and lass::spat::PlanarMesh::floodPolygonCallback().
const bool lass::prim::SimplePolygon2D< T, DP >::isSimple | ( | ) | const [inline] |
return true if polygon is simple, false if not.
A polygon P is said to be simple (or Jordan) if the only points of the plane belonging to two polygon edges of P are the polygon vertices of P. Such a polygon has a well defined interior and exterior. Simple polygons are topologically equivalent to a disk., Eric W. Weisstein. "Simple Polygon." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/SimplePolygon.html
A polygon with less than four vertices is always simple.
Definition at line 365 of file simple_polygon_2d.inl.
References lass::prim::SimplePolygon2D< T, DegeneratePolicy >::edge(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::intersect(), LASS_ASSERT, lass::prim::rNone, lass::prim::rOne, and lass::prim::SimplePolygon2D< T, DegeneratePolicy >::size().
Referenced by lass::prim::SimplePolygon2D< T, DegeneratePolicy >::fixDegenerate(), and lass::prim::SimplePolygon2D< T, DegeneratePolicy >::isValid().
const bool lass::prim::SimplePolygon2D< T, DP >::isConvex | ( | ) | const [inline] |
return true if polygon is convex, false if not.
A planar polygon is convex if it contains all the line segments connecting any pair of its points. Thus, for example, a regular pentagon is convex, while an indented pentagon is not. A planar polygon that is not convex is said to be a concave polygon, Eric W. Weisstein. "Convex Polygon." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/ConvexPolygon.html
A simple polygon is convex if all the cross products of adjacent edges will be the same sign (we ignore zero cross products of colinear edges, only + or - are taken in account), a concave polygon will have a mixture of cross product signs.
A polygon with less than three vertices is always convex. A polygon with all coincident. vertices is considered convex if DegeneratePolicy allows this.
Definition at line 420 of file simple_polygon_2d.inl.
References LASS_ASSERT, lass::prim::perpDot(), lass::num::sign(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::size(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::vector(), and lass::num::NumTraits< C >::zero.
Referenced by lass::prim::triangulate().
const Orientation lass::prim::SimplePolygon2D< T, DP >::orientation | ( | ) | const [inline] |
return orientation of polygon.
Definition at line 271 of file simple_polygon_2d.inl.
References lass::prim::oClockWise, lass::prim::oCounterClockWise, lass::prim::oInvalid, and lass::num::NumTraits< C >::zero.
const bool lass::prim::SimplePolygon2D< T, DP >::isReflex | ( | int | iIndexOfVertex | ) | const [inline] |
return true if inner angle of vertex is reflex (is > 180 degrees).
Reflect Angle: An angle more than 180°, Eric W. Weisstein. "Reflex Angle." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/ReflexAngle.html
test if signedArea() and perdDot(...) have different sign. if one of them is zero, it will return false by default.
Definition at line 465 of file simple_polygon_2d.inl.
References lass::prim::SimplePolygon2D< T, DegeneratePolicy >::isEmpty(), LASS_ASSERT, lass::prim::perpDot(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::signedArea(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::vector(), and lass::num::NumTraits< C >::zero.
const Side lass::prim::SimplePolygon2D< T, DP >::classify | ( | const TPoint & | iP | ) | const [inline] |
Definition at line 512 of file simple_polygon_2d.inl.
References lass::prim::SimplePolygon2D< T, DegeneratePolicy >::contains(), lass::prim::sInside, and lass::prim::sOutside.
const bool lass::prim::SimplePolygon2D< T, DP >::contains | ( | const TPoint & | iP | ) | const [inline] |
return true when a point is inside or on a polygon.
When a point lies on a polygon edge the answer can either be true or false but in a way that for a meshing the answer will only be true for one polygon. More precise: for polygons sharing an edge only one of them will return true for a point on the edge. For an explanation of how this exactly works: http://www.ecse.rpi.edu/Homepages/wrf/geom/pnpoly.html (Wm Randolph Franklin)
Definition at line 490 of file simple_polygon_2d.inl.
References lass::prim::Point2D< T >::position(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::size(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::vertices_, lass::prim::Vector2D< T >::x, and lass::prim::Vector2D< T >::y.
Referenced by lass::prim::SimplePolygon2D< T, DegeneratePolicy >::classify(), lass::spat::PlanarMesh::floodPolygon(), and lass::spat::PlanarMesh::floodPolygonCallback().
void lass::prim::SimplePolygon2D< T, DP >::flip | ( | ) | [inline] |
flip orientation of polygon.
Definition at line 522 of file simple_polygon_2d.inl.
References lass::prim::SimplePolygon2D< T, DegeneratePolicy >::vertices_.
void lass::prim::SimplePolygon2D< T, DP >::fixDegenerate | ( | ) | [inline] |
fixes degenerate polygons as far as possible.
things that can be repared are:
Things that can't repared (and will cause an exception to be thrown) are:
Definition at line 543 of file simple_polygon_2d.inl.
References lass::prim::SimplePolygon2D< T, DegeneratePolicy >::at(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::erase(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::isSimple(), LASS_ENFORCE, lass::prim::perpDot(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::signedArea(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::size(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::vector(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::vertices_, and lass::num::NumTraits< C >::zero.
const bool lass::prim::SimplePolygon2D< T, DP >::isValid | ( | ) | const [inline] |
a simple polygon is valid if it is not degenerate.
Definition at line 593 of file simple_polygon_2d.inl.
References lass::prim::SimplePolygon2D< T, DegeneratePolicy >::isSimple(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::signedArea(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::size(), and lass::num::NumTraits< C >::zero.
const bool lass::prim::SimplePolygon2D< T, DP >::isInRange | ( | int | iIndexOfVertex | ) | const [inline, private] |
return if index of vertex is in range of the std::vector
Definition at line 609 of file simple_polygon_2d.inl.
References LASS_ASSERT, and lass::prim::SimplePolygon2D< T, DegeneratePolicy >::size().
Referenced by lass::prim::SimplePolygon2D< T, DegeneratePolicy >::at(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::erase(), and lass::prim::SimplePolygon2D< T, DegeneratePolicy >::insert().
Result intersect | ( | const SimplePolygon2D< T, DP > & | polygon, | |
const Ray2D< T, NP, PP > & | ray, | |||
T & | t, | |||
const T & | tMin = T() | |||
) | [related] |
Find the intersection of a ray and a triangle by their parameter t on the ray.
polygon | [in] the simple polygon | |
ray | [in] the ray | |
t | [out] the parameter of the intersection point > tMin. | |
tMin | [in] the minimum t that may be returned as valid intersection. |
Definition at line 71 of file ray_2d_simple_polygon_2d.h.
References lass::prim::Ray2D< T, NormalizingPolicy, ParameterPolicy >::direction(), lass::prim::impl::intersectEdge2D(), lass::prim::rNone, lass::prim::rOne, lass::prim::SimplePolygon2D< T, DegeneratePolicy >::size(), and lass::prim::Ray2D< T, NormalizingPolicy, ParameterPolicy >::support().
Referenced by lass::prim::SimplePolygon2D< T, DegeneratePolicy >::isSimple().
io::XmlOStream & operator<< | ( | io::XmlOStream & | ioOStream, | |
const SimplePolygon2D< T, DP > & | iPolygon | |||
) | [related] |
std::ostream & operator<< | ( | std::ostream & | ioOStream, | |
const SimplePolygon2D< T, DP > & | iPolygon | |||
) | [related] |
lass::io::MatlabOStream & operator<< | ( | lass::io::MatlabOStream & | oOStream, | |
const SimplePolygon2D< T, DP > & | iPolygon | |||
) | [related] |
Definition at line 657 of file simple_polygon_2d.inl.
References lass::io::MatlabOStream::color(), LASS_ENFORCE_STREAM, and lass::prim::SimplePolygon2D< T, DegeneratePolicy >::size().
TVertices lass::prim::SimplePolygon2D< T, DegeneratePolicy >::vertices_ [private] |
Definition at line 141 of file simple_polygon_2d.h.
Referenced by lass::prim::SimplePolygon2D< T, DegeneratePolicy >::add(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::at(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::contains(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::erase(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::fixDegenerate(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::flip(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::insert(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::isEmpty(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::operator[](), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::perimeter(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::signedArea(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::size(), lass::prim::SimplePolygon2D< T, DegeneratePolicy >::surfaceCentroid(), and lass::prim::SimplePolygon2D< T, DegeneratePolicy >::vertexCentroid().
Generated on Mon Nov 10 14:22:14 2008 for Library of Assembled Shared Sources by 1.5.7.1 |