本文整理汇总了C++中Viewer3D::setGLScale方法的典型用法代码示例。如果您正苦于以下问题:C++ Viewer3D::setGLScale方法的具体用法?C++ Viewer3D::setGLScale怎么用?C++ Viewer3D::setGLScale使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Viewer3D
的用法示例。
在下文中一共展示了Viewer3D::setGLScale方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
meshColorR = vectCol[0];
meshColorG = vectCol[1];
meshColorB = vectCol[2];
meshColorA = vectCol[3];
if(vectCol.size() == 8) {
meshColorRLine = vectCol[4];
meshColorGLine = vectCol[5];
meshColorBLine = vectCol[6];
meshColorALine = vectCol[7];
}
}
if(vm.count("customColorSDP")) {
std::vector<unsigned int > vectCol = vm["customColorSDP"].as<std::vector<unsigned int> >();
if(vectCol.size()!=4) {
trace.error() << "colors specification should contain R,G,B and Alpha values"<< std::endl;
}
sdpColorR = vectCol[0];
sdpColorG = vectCol[1];
sdpColorB = vectCol[2];
sdpColorA = vectCol[3];
}
QApplication application(argc,argv);
Viewer3D<> viewer;
std::stringstream title;
title << "Simple Mesh Viewer: " << inputFilenameVect[0];
viewer.setWindowTitle(title.str().c_str());
viewer.show();
viewer.myGLLineMinWidth = lineWidth;
viewer.setGLScale(sx, sy, sz);
bool invertNormal= vm.count("invertNormal");
double ballRadius = vm["SDPradius"].as<double>();
trace.info() << "Importing mesh... ";
std::vector<Mesh<DGtal::Z3i::RealPoint> > vectMesh;
for(unsigned int i = 0; i< inputFilenameVect.size(); i++) {
Mesh<DGtal::Z3i::RealPoint> aMesh(!vm.count("customColorMesh"));
aMesh << inputFilenameVect[i];
vectMesh.push_back(aMesh);
}
bool import = vectMesh.size()==inputFilenameVect.size();
if(!import) {
trace.info() << "File import failed. " << std::endl;
return 0;
}
trace.info() << "[done]. "<< std::endl;
if(vm.count("displaySDP")) {
std::string filenameSDP = vm["displaySDP"].as<std::string>();
vector<Z3i::RealPoint> vectPoints;
vectPoints = PointListReader<Z3i::RealPoint>::getPointsFromFile(filenameSDP);
viewer << CustomColors3D(Color(sdpColorR, sdpColorG, sdpColorB, sdpColorA),
Color(sdpColorR, sdpColorG, sdpColorB, sdpColorA));
for(unsigned int i=0; i< vectPoints.size(); i++) {
viewer.addBall(vectPoints.at(i), ballRadius);
}
}