1 #ifndef CUTTINGSURFACE_HPP
2 #define CUTTINGSURFACE_HPP
7 #include <MGXViewer/qglviewer.h>
15 typedef util::Vector<2, int> Point2i;
16 typedef util::Vector<3, float> Point3f;
20 friend class process::SetupProcess;
26 enum Mode { PLANE, THREE_AXIS, BEZIER };
28 bool threeAxis()
const {
29 return _mode == THREE_AXIS;
32 return _mode == PLANE;
35 return _mode == BEZIER;
48 bool drawGrid()
const {
80 bool isVisible()
const {
95 const Point2i& surfSize()
const {
98 void setSurfSize(
const Point2i& s)
106 uint bezPoints()
const {
109 void setBezPoints(uint n)
111 if(n != _bezPoints) {
117 void setBezierV(
const std::vector<Point3f>& points)
119 if(points.size() == _bezierV.size()) {
124 const std::vector<Point3f>& bezierV()
const {
127 std::vector<Point3f>& bezierV() {
131 Point3f& bezierV(uint u, uint v) {
132 return _bezierV[idx(u, v)];
134 const Point3f& bezierV(uint u, uint v)
const {
135 return _bezierV[idx(u, v)];
147 void getSurfPoints(
const qglviewer::Frame* stk_frame, std::vector<Point3f>& points,
int& uSize,
int& vSize);
150 Point3f evalCoord(
float u,
float v)
const;
151 Point3f evalNormal(
float u,
float v)
const;
156 bool changed()
const {
162 uint idx(uint u, uint v)
const {
163 return (u * _bezPoints + v);
167 int choose(
int i,
int j)
const;
170 void resetModified() {
179 std::vector<Point3f> _bezierV;
182 std::vector<uint> _chooseV;
191 #endif // CUTTINGSURFACE_HPP
Definition: CuttingSurface.hpp:18
Common definitions and utilities for all geometry algorithms This file is shared by cuda...