11 #ifndef CUTTINGSURFACE_HPP 12 #define CUTTINGSURFACE_HPP 17 #include <MGXViewer/qglviewer.h> 25 typedef util::Vector<2, int> Point2i;
26 typedef util::Vector<3, float> Point3f;
30 friend class process::SetupProcess;
36 enum Mode { PLANE, THREE_AXIS, BEZIER };
38 bool threeAxis()
const {
39 return _mode == THREE_AXIS;
42 return _mode == PLANE;
45 return _mode == BEZIER;
58 bool drawGrid()
const {
90 bool isVisible()
const {
94 const Point3f& size()
const {
97 void setSize(
const Point3f& s)
105 const Point2i& surfSize()
const {
108 void setSurfSize(
const Point2i& s)
116 uint bezPoints()
const {
119 void setBezPoints(uint n)
121 if(n != _bezPoints) {
127 void setBezierV(
const std::vector<Point3f>& points)
129 if(points.size() == _bezierV.size()) {
134 const std::vector<Point3f>& bezierV()
const {
137 std::vector<Point3f>& bezierV() {
141 Point3f& bezierV(uint u, uint v) {
142 return _bezierV[idx(u, v)];
144 const Point3f& bezierV(uint u, uint v)
const {
145 return _bezierV[idx(u, v)];
157 void getSurfPoints(
const qglviewer::Frame* stk_frame, std::vector<Point3f>& points,
int& uSize,
int& vSize);
160 Point3f evalCoord(
float u,
float v)
const;
161 Point3f evalNormal(
float u,
float v)
const;
166 bool changed()
const {
172 uint idx(uint u, uint v)
const {
173 return (u * _bezPoints + v);
177 int choose(
int i,
int j)
const;
180 void resetModified() {
189 std::vector<Point3f> _bezierV;
192 std::vector<uint> _chooseV;
201 #endif // CUTTINGSURFACE_HPP Definition: CuttingSurface.hpp:28
Common definitions and utilities for all geometry algorithms This file is shared by cuda...
This namespace contains all the API of MorphoGraphX.
Definition: Assert.hpp:26
This namespace contains all the classes needed to define processes.