本文整理汇总了C++中Stroke::getBBmax方法的典型用法代码示例。如果您正苦于以下问题:C++ Stroke::getBBmax方法的具体用法?C++ Stroke::getBBmax怎么用?C++ Stroke::getBBmax使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Stroke
的用法示例。
在下文中一共展示了Stroke::getBBmax方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mouseclick
/// Mouse press function
void mouseclick(int button, int state, int x, int y) {
xini = x; yini = winh - y;
if (state == GLUT_DOWN) {
buttonpressed = button;
if (buttonpressed == GLUT_MIDDLE_BUTTON) {
arcball.click(xini, yini);
}
else if (buttonpressed == GLUT_RIGHT_BUTTON) {
screenToWorld(x, winh - y, xwini, ywini, zwini);
}
else if (buttonpressed == GLUT_LEFT_BUTTON) {
stroke.clear();
screenToWorld(x, winh - y, xwini, ywini, zwini);
grabStart = Point3(xwini, ywini, zwini);
grabLast = grabStart;
}
sceneIniT = sceneT;
}
else if (state == GLUT_UP) {
if (buttonpressed == GLUT_LEFT_BUTTON)
if (stroke.size() > 3) {
stroke.subsampleStroke();
Point2 bbMin = stroke.getBBmin();
Point2 bbMax = stroke.getBBmax();
screenToWorld(bbMin[0], bbMin[1], xwini, ywini, zwini);
Point3 bbmin(xwini, ywini, 0.0);
screenToWorld(bbMax[0], bbMax[1], xwini, ywini, zwini);
Point3 bbmax(xwini, ywini, 0.0);
//if (mycloth != 0) delete mycloth;
//mycloth = new Cloth("mesh1.off");
//mycloth = new Cloth;
//mycloth->intersect(stroke);
}
}
glutPostRedisplay();
}