from Shape.hpp:47
class Shape : public AbstractShape
{
public:
virtual ~Shape()
{
}
virtual int getNumPoints() const
{
return POINTS;
}
virtual void setCorner(int i, CWRUtil::Q5 x, CWRUtil::Q5 y)
{
if (i >= 0 && i < POINTS)
{
xCorner[i] = x, yCorner[i] = y;
}
}
virtual CWRUtil::Q5 getCornerX(int i) const
{
if (i >= 0 && i < POINTS)
{
return xCorner[i];
}
return CWRUtil::toQ5<int>(0);
}
virtual CWRUtil::Q5 getCornerY(int i) const
{
if (i >= 0 && i < POINTS)
{
return yCorner[i];
}
return CWRUtil::toQ5<int>(0);
}
protected:
virtual void setCache(int i, CWRUtil::Q5 x, CWRUtil::Q5 y)
{
if (i >= 0 && i < POINTS)
{
xCache[i] = x, yCache[i] = y;
}
}
virtual CWRUtil::Q5 getCacheX(int i) const
{
if (i >= 0 && i < POINTS)
{
return xCache[i];
}
return CWRUtil::toQ5<int>(0);
}
virtual CWRUtil::Q5 getCacheY(int i) const
{
if (i >= 0 && i < POINTS)
{
return yCache[i];
}
return CWRUtil::toQ5<int>(0);
}
private:
CWRUtil::Q5 xCorner[POINTS];
CWRUtil::Q5 yCorner[POINTS];
CWRUtil::Q5 xCache[POINTS];
CWRUtil::Q5 yCache[POINTS];
};