本文整理汇总了C++中ParameterData::getInteger方法的典型用法代码示例。如果您正苦于以下问题:C++ ParameterData::getInteger方法的具体用法?C++ ParameterData::getInteger怎么用?C++ ParameterData::getInteger使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParameterData
的用法示例。
在下文中一共展示了ParameterData::getInteger方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: debug
int
BrepHandler::extractEdge(const DirectoryEntry* edgeListDE, int index) {
EdgeKey k = make_pair(edgeListDE, index);
EdgeMap::iterator i = edges.find(k);
if (i == edges.end()) {
Pointer initVertexList;
Integer initVertexIndex;
Pointer termVertexList;
Integer termVertexIndex;
debug("########################## E X T R A C T E D G E");
ParameterData params;
_iges->getParameter(edgeListDE->paramData(), params);
int paramIndex = (index-1)*5 + 2;
Pointer msCurvePtr = params.getPointer(paramIndex);
initVertexList = params.getPointer(paramIndex+1);
initVertexIndex = params.getInteger(paramIndex+2);
termVertexList = params.getPointer(paramIndex+3);
termVertexIndex = params.getInteger(paramIndex+4);
// extract the model space curves
int mCurveIndex = extractCurve(_iges->getDirectoryEntry(msCurvePtr), false);
// extract the vertices
int initVertex = extractVertex(_iges->getDirectoryEntry(initVertexList),
initVertexIndex);
int termVertex = extractVertex(_iges->getDirectoryEntry(termVertexList),
termVertexIndex);
edges[k] = handleEdge(mCurveIndex, initVertex, termVertex);
return edges[k];
} else {
return i->second;
}
}
示例2: VSET
int
BrepHandler::extractRationalBSplineCurve(const DirectoryEntry* de, const ParameterData& params) {
int k = params.getInteger(1);
int degree = params.getInteger(2);
bool planar = (params.getInteger(3)() == 1) ? true : false;
bool closed = (params.getInteger(4)() == 1) ? true : false;
bool rational = (params.getInteger(5)() == 0) ? true : false;
bool periodic = (params.getInteger(6)() == 1) ? true : false;
int num_control_points = k + 1;
int n = k + 1 - degree;
int num_knots = n + 2 * degree + 1;
double* knots = new double[num_knots];
int i = 7;
for (int _i = 0; _i < num_knots; _i++) {
knots[_i] = params.getReal(i);
i++;
}
double* weights = new double[num_control_points];
for (int _i = 0; _i < num_control_points; _i++) {
weights[_i] = params.getReal(i);
i++;
}
double* ctl_points = new double[num_control_points * 3];
for (int _i = 0; _i < num_control_points; _i++) {
ctl_points[_i*3] = params.getReal(i);
ctl_points[_i*3+1] = params.getReal(i+1);
ctl_points[_i*3+2] = params.getReal(i+2);
i += 3;
}
double umin = params.getReal(i); i++;
double umax = params.getReal(i); i++;
vect_t unit_normal;
if (planar) {
VSET(unit_normal, params.getReal(i), params.getReal(i+1), params.getReal(i+2));
i += 3;
}
int val = handleRationalBSplineCurve(degree,
umin,
umax,
planar,
unit_normal,
closed,
rational,
periodic,
num_knots,
knots,
num_control_points,
weights,
ctl_points);
delete [] knots;
delete [] weights;
delete [] ctl_points;
return val;
}