mirror of
https://github.com/jhasse/poly2tri.git
synced 2024-11-29 16:53:30 +01:00
add const overload for GetPoint
Signed-off-by: Tom Hulton-Harrop <tom.hultonharrop@gmail.com>
This commit is contained in:
parent
a5b0e3cdf4
commit
fdefc2f70e
@ -161,6 +161,7 @@ bool constrained_edge[3];
|
||||
bool delaunay_edge[3];
|
||||
|
||||
Point* GetPoint(int index);
|
||||
const Point* GetPoint(int index) const;
|
||||
Point* PointCW(const Point& point);
|
||||
Point* PointCCW(const Point& point);
|
||||
Point* OppositePoint(Triangle& t, const Point& p);
|
||||
@ -288,11 +289,17 @@ inline Point Cross(double s, const Point& a)
|
||||
return Point(-s * a.y, s * a.x);
|
||||
}
|
||||
|
||||
inline Point* Triangle::GetPoint(int index)
|
||||
inline const Point* Triangle::GetPoint(int index) const
|
||||
{
|
||||
return points_[index];
|
||||
}
|
||||
|
||||
inline Point* Triangle::GetPoint(int index)
|
||||
{
|
||||
return const_cast<Point*>(
|
||||
static_cast<const Triangle&>(*this).GetPoint(index));
|
||||
}
|
||||
|
||||
inline Triangle* Triangle::GetNeighbor(int index)
|
||||
{
|
||||
return neighbors_[index];
|
||||
|
Loading…
Reference in New Issue
Block a user