本文整理汇总了C++中DataNode::AsDoubleArray方法的典型用法代码示例。如果您正苦于以下问题:C++ DataNode::AsDoubleArray方法的具体用法?C++ DataNode::AsDoubleArray怎么用?C++ DataNode::AsDoubleArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataNode
的用法示例。
在下文中一共展示了DataNode::AsDoubleArray方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetInteractive
void
LineoutAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("LineoutAttributes");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("point1")) != 0)
SetPoint1(node->AsDoubleArray());
if((node = searchNode->GetNode("point2")) != 0)
SetPoint2(node->AsDoubleArray());
if((node = searchNode->GetNode("interactive")) != 0)
SetInteractive(node->AsBool());
if((node = searchNode->GetNode("ignoreGlobal")) != 0)
SetIgnoreGlobal(node->AsBool());
if((node = searchNode->GetNode("samplingOn")) != 0)
SetSamplingOn(node->AsBool());
if((node = searchNode->GetNode("numberOfSamplePoints")) != 0)
SetNumberOfSamplePoints(node->AsInt());
if((node = searchNode->GetNode("reflineLabels")) != 0)
SetReflineLabels(node->AsBool());
if((node = searchNode->GetNode("designator")) != 0)
SetDesignator(node->AsString());
}
示例2: SetUseUnitCellVectors
void
ReplicateAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("ReplicateAttributes");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("useUnitCellVectors")) != 0)
SetUseUnitCellVectors(node->AsBool());
if((node = searchNode->GetNode("xVector")) != 0)
SetXVector(node->AsDoubleArray());
if((node = searchNode->GetNode("yVector")) != 0)
SetYVector(node->AsDoubleArray());
if((node = searchNode->GetNode("zVector")) != 0)
SetZVector(node->AsDoubleArray());
if((node = searchNode->GetNode("xReplications")) != 0)
SetXReplications(node->AsInt());
if((node = searchNode->GetNode("yReplications")) != 0)
SetYReplications(node->AsInt());
if((node = searchNode->GetNode("zReplications")) != 0)
SetZReplications(node->AsInt());
if((node = searchNode->GetNode("mergeResults")) != 0)
SetMergeResults(node->AsBool());
if((node = searchNode->GetNode("replicateUnitCellAtoms")) != 0)
SetReplicateUnitCellAtoms(node->AsBool());
if((node = searchNode->GetNode("shiftPeriodicAtomOrigin")) != 0)
SetShiftPeriodicAtomOrigin(node->AsBool());
if((node = searchNode->GetNode("newPeriodicOrigin")) != 0)
SetNewPeriodicOrigin(node->AsDoubleArray());
}
示例3: SetOrigin
void
EllipsoidSliceAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("EllipsoidSliceAttributes");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("origin")) != 0)
SetOrigin(node->AsDoubleArray());
if((node = searchNode->GetNode("radii")) != 0)
SetRadii(node->AsDoubleArray());
if((node = searchNode->GetNode("rotationAngle")) != 0)
SetRotationAngle(node->AsDoubleArray());
}
示例4: SetRadius
void
CylinderAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("CylinderAttributes");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("point1")) != 0)
SetPoint1(node->AsDoubleArray());
if((node = searchNode->GetNode("point2")) != 0)
SetPoint2(node->AsDoubleArray());
if((node = searchNode->GetNode("radius")) != 0)
SetRadius(node->AsDouble());
}
示例5: if
void
ConeAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("ConeAttributes");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("angle")) != 0)
SetAngle(node->AsDouble());
if((node = searchNode->GetNode("origin")) != 0)
SetOrigin(node->AsDoubleArray());
if((node = searchNode->GetNode("normal")) != 0)
SetNormal(node->AsDoubleArray());
if((node = searchNode->GetNode("representation")) != 0)
{
// Allow enums to be int or string in the config file
if(node->GetNodeType() == INT_NODE)
{
int ival = node->AsInt();
if(ival >= 0 && ival < 3)
SetRepresentation(Representation(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
Representation value;
if(Representation_FromString(node->AsString(), value))
SetRepresentation(value);
}
}
if((node = searchNode->GetNode("upAxis")) != 0)
SetUpAxis(node->AsDoubleArray());
if((node = searchNode->GetNode("cutByLength")) != 0)
SetCutByLength(node->AsBool());
if((node = searchNode->GetNode("length")) != 0)
SetLength(node->AsDouble());
}
示例6: SetExtents
void
BoxExtents::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("BoxExtents");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("extents")) != 0)
SetExtents(node->AsDoubleArray());
}
示例7: SetPoint
void
PointAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("PointAttributes");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("point")) != 0)
SetPoint(node->AsDoubleArray());
}
示例8: if
void
LagrangianAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("LagrangianAttributes");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("seedPoint")) != 0)
SetSeedPoint(node->AsDoubleArray());
if((node = searchNode->GetNode("numSteps")) != 0)
SetNumSteps(node->AsInt());
if((node = searchNode->GetNode("XAxisSample")) != 0)
{
// Allow enums to be int or string in the config file
if(node->GetNodeType() == INT_NODE)
{
int ival = node->AsInt();
if(ival >= 0 && ival < 6)
SetXAxisSample(sampleType(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
sampleType value;
if(sampleType_FromString(node->AsString(), value))
SetXAxisSample(value);
}
}
if((node = searchNode->GetNode("YAxisSample")) != 0)
{
// Allow enums to be int or string in the config file
if(node->GetNodeType() == INT_NODE)
{
int ival = node->AsInt();
if(ival >= 0 && ival < 6)
SetYAxisSample(sampleType(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
sampleType value;
if(sampleType_FromString(node->AsString(), value))
SetYAxisSample(value);
}
}
if((node = searchNode->GetNode("variable")) != 0)
SetVariable(node->AsString());
}
示例9: SetOrigin
void
PlaneAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("PlaneAttributes");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("origin")) != 0)
SetOrigin(node->AsDoubleArray());
if((node = searchNode->GetNode("normal")) != 0)
SetNormal(node->AsDoubleArray());
if((node = searchNode->GetNode("upAxis")) != 0)
SetUpAxis(node->AsDoubleArray());
if((node = searchNode->GetNode("haveRadius")) != 0)
SetHaveRadius(node->AsBool());
if((node = searchNode->GetNode("radius")) != 0)
SetRadius(node->AsDouble());
if((node = searchNode->GetNode("threeSpace")) != 0)
SetThreeSpace(node->AsBool());
}
示例10: SetOrigin
void
SphereAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("SphereAttributes");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("origin")) != 0)
SetOrigin(node->AsDoubleArray());
if((node = searchNode->GetNode("radius")) != 0)
SetRadius(node->AsDouble());
}
示例11: SetViewNormal
void
View3DAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("View3DAttributes");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("viewNormal")) != 0)
SetViewNormal(node->AsDoubleArray());
if((node = searchNode->GetNode("focus")) != 0)
SetFocus(node->AsDoubleArray());
if((node = searchNode->GetNode("viewUp")) != 0)
SetViewUp(node->AsDoubleArray());
if((node = searchNode->GetNode("viewAngle")) != 0)
SetViewAngle(node->AsDouble());
if((node = searchNode->GetNode("parallelScale")) != 0)
SetParallelScale(node->AsDouble());
if((node = searchNode->GetNode("nearPlane")) != 0)
SetNearPlane(node->AsDouble());
if((node = searchNode->GetNode("farPlane")) != 0)
SetFarPlane(node->AsDouble());
if((node = searchNode->GetNode("imagePan")) != 0)
SetImagePan(node->AsDoubleArray());
if((node = searchNode->GetNode("imageZoom")) != 0)
SetImageZoom(node->AsDouble());
if((node = searchNode->GetNode("perspective")) != 0)
SetPerspective(node->AsBool());
if((node = searchNode->GetNode("eyeAngle")) != 0)
SetEyeAngle(node->AsDouble());
if((node = searchNode->GetNode("centerOfRotationSet")) != 0)
SetCenterOfRotationSet(node->AsBool());
if((node = searchNode->GetNode("centerOfRotation")) != 0)
SetCenterOfRotation(node->AsDoubleArray());
if((node = searchNode->GetNode("axis3DScaleFlag")) != 0)
SetAxis3DScaleFlag(node->AsBool());
if((node = searchNode->GetNode("axis3DScales")) != 0)
SetAxis3DScales(node->AsDoubleArray());
if((node = searchNode->GetNode("shear")) != 0)
SetShear(node->AsDoubleArray());
if((node = searchNode->GetNode("windowValid")) != 0)
SetWindowValid(node->AsBool());
}
示例12: SetViewNormal
void
ViewAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("ViewAttributes");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("viewNormal")) != 0)
SetViewNormal(node->AsDoubleArray());
if((node = searchNode->GetNode("focus")) != 0)
SetFocus(node->AsDoubleArray());
if((node = searchNode->GetNode("viewUp")) != 0)
SetViewUp(node->AsDoubleArray());
if((node = searchNode->GetNode("viewAngle")) != 0)
SetViewAngle(node->AsDouble());
if((node = searchNode->GetNode("setScale")) != 0)
SetSetScale(node->AsBool());
if((node = searchNode->GetNode("parallelScale")) != 0)
SetParallelScale(node->AsDouble());
if((node = searchNode->GetNode("nearPlane")) != 0)
SetNearPlane(node->AsDouble());
if((node = searchNode->GetNode("farPlane")) != 0)
SetFarPlane(node->AsDouble());
if((node = searchNode->GetNode("imagePan")) != 0)
SetImagePan(node->AsDoubleArray());
if((node = searchNode->GetNode("imageZoom")) != 0)
SetImageZoom(node->AsDouble());
if((node = searchNode->GetNode("perspective")) != 0)
SetPerspective(node->AsBool());
if((node = searchNode->GetNode("windowCoords")) != 0)
SetWindowCoords(node->AsDoubleArray());
if((node = searchNode->GetNode("viewportCoords")) != 0)
SetViewportCoords(node->AsDoubleArray());
if((node = searchNode->GetNode("eyeAngle")) != 0)
SetEyeAngle(node->AsDouble());
}
示例13: if
void
QueryAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("QueryAttributes");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("name")) != 0)
SetName(node->AsString());
if((node = searchNode->GetNode("variables")) != 0)
SetVariables(node->AsStringVector());
if((node = searchNode->GetNode("resultsMessage")) != 0)
SetResultsMessage(node->AsString());
if((node = searchNode->GetNode("worldPoint")) != 0)
SetWorldPoint(node->AsDoubleArray());
if((node = searchNode->GetNode("domain")) != 0)
SetDomain(node->AsInt());
if((node = searchNode->GetNode("element")) != 0)
SetElement(node->AsInt());
if((node = searchNode->GetNode("resultsValue")) != 0)
SetResultsValue(node->AsDoubleVector());
if((node = searchNode->GetNode("elementType")) != 0)
{
// Allow enums to be int or string in the config file
if(node->GetNodeType() == INT_NODE)
{
int ival = node->AsInt();
if(ival >= 0 && ival < 2)
SetElementType(ElementType(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
ElementType value;
if(ElementType_FromString(node->AsString(), value))
SetElementType(value);
}
}
if((node = searchNode->GetNode("timeStep")) != 0)
SetTimeStep(node->AsInt());
if((node = searchNode->GetNode("varTypes")) != 0)
SetVarTypes(node->AsIntVector());
if((node = searchNode->GetNode("dataType")) != 0)
{
// Allow enums to be int or string in the config file
if(node->GetNodeType() == INT_NODE)
{
int ival = node->AsInt();
if(ival >= 0 && ival < 2)
SetDataType(DataType(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
DataType value;
if(DataType_FromString(node->AsString(), value))
SetDataType(value);
}
}
if((node = searchNode->GetNode("pipeIndex")) != 0)
SetPipeIndex(node->AsInt());
if((node = searchNode->GetNode("useGlobalId")) != 0)
SetUseGlobalId(node->AsBool());
if((node = searchNode->GetNode("xUnits")) != 0)
SetXUnits(node->AsString());
if((node = searchNode->GetNode("yUnits")) != 0)
SetYUnits(node->AsString());
if((node = searchNode->GetNode("darg1")) != 0)
SetDarg1(node->AsDoubleVector());
if((node = searchNode->GetNode("darg2")) != 0)
SetDarg2(node->AsDoubleVector());
if((node = searchNode->GetNode("floatFormat")) != 0)
SetFloatFormat(node->AsString());
if((node = searchNode->GetNode("xmlResult")) != 0)
SetXmlResult(node->AsString());
}
示例14: if
void
AnnotationObject::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("AnnotationObject");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("objectName")) != 0)
SetObjectName(node->AsString());
if((node = searchNode->GetNode("objectType")) != 0)
{
// Allow enums to be int or string in the config file
if(node->GetNodeType() == INT_NODE)
{
int ival = node->AsInt();
if(ival >= 0 && ival < 8)
SetObjectType(AnnotationType(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
AnnotationType value;
if(AnnotationType_FromString(node->AsString(), value))
SetObjectType(value);
}
}
if((node = searchNode->GetNode("visible")) != 0)
SetVisible(node->AsBool());
if((node = searchNode->GetNode("active")) != 0)
SetActive(node->AsBool());
if((node = searchNode->GetNode("position")) != 0)
{
if(node->GetNodeType() == FLOAT_ARRAY_NODE)
{
const float *fn = node->AsFloatArray();
double dp[3] = {fn[0], fn[1], fn[2]};
SetPosition(dp);
}
else
SetPosition(node->AsDoubleArray());
}
if((node = searchNode->GetNode("position2")) != 0)
{
if(node->GetNodeType() == FLOAT_ARRAY_NODE)
{
const float *fn = node->AsFloatArray();
double dp[3] = {fn[0], fn[1], fn[2]};
SetPosition2(dp);
}
else
SetPosition2(node->AsDoubleArray());
}
if((node = searchNode->GetNode("textColor")) != 0)
textColor.SetFromNode(node);
if((node = searchNode->GetNode("useForegroundForTextColor")) != 0)
SetUseForegroundForTextColor(node->AsBool());
if((node = searchNode->GetNode("color1")) != 0)
color1.SetFromNode(node);
if((node = searchNode->GetNode("color2")) != 0)
color2.SetFromNode(node);
if((node = searchNode->GetNode("text")) != 0)
SetText(node->AsStringVector());
if((node = searchNode->GetNode("fontFamily")) != 0)
{
// Allow enums to be int or string in the config file
if(node->GetNodeType() == INT_NODE)
{
int ival = node->AsInt();
if(ival >= 0 && ival < 3)
SetFontFamily(FontFamily(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
FontFamily value;
if(FontFamily_FromString(node->AsString(), value))
SetFontFamily(value);
}
}
if((node = searchNode->GetNode("fontBold")) != 0)
SetFontBold(node->AsBool());
if((node = searchNode->GetNode("fontItalic")) != 0)
SetFontItalic(node->AsBool());
if((node = searchNode->GetNode("fontShadow")) != 0)
SetFontShadow(node->AsBool());
if((node = searchNode->GetNode("floatAttribute1")) != 0)
SetDoubleAttribute1(node->AsDouble());
if((node = searchNode->GetNode("doubleAttribute1")) != 0)
SetDoubleAttribute1(node->AsDouble());
if((node = searchNode->GetNode("intAttribute1")) != 0)
SetIntAttribute1(node->AsInt());
if((node = searchNode->GetNode("intAttribute2")) != 0)
SetIntAttribute2(node->AsInt());
if((node = searchNode->GetNode("intAttribute3")) != 0)
SetIntAttribute3(node->AsInt());
if((node = searchNode->GetNode("doubleVector1")) != 0)
SetDoubleVector1(node->AsDoubleVector());
if((node = searchNode->GetNode("stringVector1")) != 0)
//.........这里部分代码省略.........
示例15: if
void
Axes3D::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("Axes3D");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("visible")) != 0)
SetVisible(node->AsBool());
if((node = searchNode->GetNode("autoSetTicks")) != 0)
SetAutoSetTicks(node->AsBool());
if((node = searchNode->GetNode("autoSetScaling")) != 0)
SetAutoSetScaling(node->AsBool());
if((node = searchNode->GetNode("lineWidth")) != 0)
SetLineWidth(node->AsInt());
if((node = searchNode->GetNode("tickLocation")) != 0)
{
// Allow enums to be int or string in the config file
if(node->GetNodeType() == INT_NODE)
{
int ival = node->AsInt();
if(ival >= 0 && ival < 3)
SetTickLocation(Location(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
Location value;
if(Location_FromString(node->AsString(), value))
SetTickLocation(value);
}
}
if((node = searchNode->GetNode("axesType")) != 0)
{
// Allow enums to be int or string in the config file
if(node->GetNodeType() == INT_NODE)
{
int ival = node->AsInt();
if(ival >= 0 && ival < 5)
SetAxesType(Axes(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
Axes value;
if(Axes_FromString(node->AsString(), value))
SetAxesType(value);
}
}
if((node = searchNode->GetNode("triadFlag")) != 0)
SetTriadFlag(node->AsBool());
if((node = searchNode->GetNode("bboxFlag")) != 0)
SetBboxFlag(node->AsBool());
if((node = searchNode->GetNode("xAxis")) != 0)
xAxis.SetFromNode(node);
if((node = searchNode->GetNode("yAxis")) != 0)
yAxis.SetFromNode(node);
if((node = searchNode->GetNode("zAxis")) != 0)
zAxis.SetFromNode(node);
if((node = searchNode->GetNode("setBBoxLocation")) != 0)
SetSetBBoxLocation(node->AsBool());
if((node = searchNode->GetNode("bboxLocation")) != 0)
SetBboxLocation(node->AsDoubleArray());
}