| 1 |
#ifndef ICURVE_H_ |
| 2 |
#define ICURVE_H_ |
| 3 |
|
| 4 |
#include "inode.h" |
| 5 |
|
| 6 |
class CurveNode |
| 7 |
{ |
| 8 |
public: |
| 9 |
/** destructor |
| 10 |
*/ |
| 11 |
virtual ~CurveNode() {} |
| 12 |
|
| 13 |
/** greebo: Returns true if the curve has 0 control points. |
| 14 |
*/ |
| 15 |
virtual bool hasEmptyCurve() = 0; |
| 16 |
|
| 17 |
/** greebo: Appends a control point at the end of the chain. |
| 18 |
*/ |
| 19 |
virtual void appendControlPoints(unsigned int numPoints) = 0; |
| 20 |
|
| 21 |
/** greebo: As the name states, this removes the selected |
| 22 |
* control points from the curve. |
| 23 |
*/ |
| 24 |
virtual void removeSelectedControlPoints() = 0; |
| 25 |
|
| 26 |
/** greebo: This inserts a control point BEFORE each |
| 27 |
* selected control point of the curve. |
| 28 |
* Naturally, this doesn't work if the first vertex |
| 29 |
* is selected. |
| 30 |
*/ |
| 31 |
virtual void insertControlPointsAtSelected() = 0; |
| 32 |
|
| 33 |
/** greebo: Converts the type of the curve from CatmullRom |
| 34 |
* to NURBS and vice versa. |
| 35 |
*/ |
| 36 |
virtual void convertCurveType() = 0; |
| 37 |
}; |
| 38 |
typedef std::shared_ptr<CurveNode> CurveNodePtr; |
| 39 |
|
| 40 |
inline CurveNodePtr Node_getCurve(const scene::INodePtr& node) { |
| 41 |
return std::dynamic_pointer_cast<CurveNode>(node); |
| 42 |
} |
| 43 |
|
| 44 |
#endif /*ICURVE_H_*/ |