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()); }
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()); }
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()); }
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()); }
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()); }
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()); }
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()); }
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()); }
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()); }
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()); }
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()); }
void ToroidalPoloidalProjection::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("ToroidalPoloidalProjection"); if(searchNode == 0) return; DataNode *node; if((node = searchNode->GetNode("R0")) != 0) SetR0(node->AsDouble()); if((node = searchNode->GetNode("r")) != 0) SetR(node->AsDouble()); if((node = searchNode->GetNode("centroidSource")) != 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) SetCentroidSource(CentroidSource(ival)); } else if(node->GetNodeType() == STRING_NODE) { CentroidSource value; if(CentroidSource_FromString(node->AsString(), value)) SetCentroidSource(value); } } if((node = searchNode->GetNode("centroid")) != 0) SetCentroid(node->AsDoubleArray()); if((node = searchNode->GetNode("project2D")) != 0) SetProject2D(node->AsBool()); }
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()); }
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()); }
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) SetStringVector1(node->AsStringVector()); if((node = searchNode->GetNode("stringVector2")) != 0) SetStringVector2(node->AsStringVector()); }
void PeaksOverThresholdAttributes::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("PeaksOverThresholdAttributes"); if(searchNode == 0) return; DataNode *node; if((node = searchNode->GetNode("dataYearBegin")) != 0) SetDataYearBegin(node->AsInt()); if((node = searchNode->GetNode("dataAnalysisYearRangeEnabled")) != 0) SetDataAnalysisYearRangeEnabled(node->AsBool()); if((node = searchNode->GetNode("dataAnalysisYearRange")) != 0) SetDataAnalysisYearRange(node->AsIntArray()); if((node = searchNode->GetNode("aggregation")) != 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) SetAggregation(AggregationType(ival)); } else if(node->GetNodeType() == STRING_NODE) { AggregationType value; if(AggregationType_FromString(node->AsString(), value)) SetAggregation(value); } } if((node = searchNode->GetNode("annualPercentile")) != 0) SetAnnualPercentile(node->AsDouble()); if((node = searchNode->GetNode("seasonalPercentile")) != 0) SetSeasonalPercentile(node->AsDoubleArray()); if((node = searchNode->GetNode("monthlyPercentile")) != 0) SetMonthlyPercentile(node->AsDoubleArray()); if((node = searchNode->GetNode("displaySeason")) != 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 < 4) SetDisplaySeason(SeasonType(ival)); } else if(node->GetNodeType() == STRING_NODE) { SeasonType value; if(SeasonType_FromString(node->AsString(), value)) SetDisplaySeason(value); } } if((node = searchNode->GetNode("displayMonth")) != 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 < 12) SetDisplayMonth(MonthType(ival)); } else if(node->GetNodeType() == STRING_NODE) { MonthType value; if(MonthType_FromString(node->AsString(), value)) SetDisplayMonth(value); } } if((node = searchNode->GetNode("cutoff")) != 0) SetCutoff(node->AsFloat()); if((node = searchNode->GetNode("computeParamValues")) != 0) SetComputeParamValues(node->AsBool()); if((node = searchNode->GetNode("computeCovariates")) != 0) SetComputeCovariates(node->AsBool()); if((node = searchNode->GetNode("covariateReturnYears")) != 0) SetCovariateReturnYears(node->AsIntVector()); if((node = searchNode->GetNode("covariateModelLocation")) != 0) SetCovariateModelLocation(node->AsBool()); if((node = searchNode->GetNode("covariateModelShape")) != 0) SetCovariateModelShape(node->AsBool()); if((node = searchNode->GetNode("covariateModelScale")) != 0) SetCovariateModelScale(node->AsBool()); if((node = searchNode->GetNode("computeRVDifferences")) != 0) SetComputeRVDifferences(node->AsBool()); if((node = searchNode->GetNode("rvDifferences")) != 0) SetRvDifferences(node->AsIntArray()); if((node = searchNode->GetNode("dataScaling")) != 0) SetDataScaling(node->AsDouble()); if((node = searchNode->GetNode("dumpData")) != 0) SetDumpData(node->AsBool()); }
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()); }
void SimilarityTransformAttributes::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("SimilarityTransformAttributes"); if(searchNode == 0) return; DataNode *node; if((node = searchNode->GetNode("doRotate")) != 0) SetDoRotate(node->AsBool()); if((node = searchNode->GetNode("rotateOrigin")) != 0) { if(node->GetNodeType() == DOUBLE_ARRAY_NODE) { SetRotateOrigin(node->AsDoubleArray()); } else if(node->GetNodeType() == FLOAT_ARRAY_NODE) { const float *fa = node->AsFloatArray(); double da[3] = {fa[0], fa[1], fa[2]}; SetRotateOrigin(da); } } if((node = searchNode->GetNode("rotateAxis")) != 0) { if(node->GetNodeType() == DOUBLE_ARRAY_NODE) { SetRotateAxis(node->AsDoubleArray()); } else if(node->GetNodeType() == FLOAT_ARRAY_NODE) { const float *fa = node->AsFloatArray(); double da[3] = {fa[0], fa[1], fa[2]}; SetRotateAxis(da); } } if((node = searchNode->GetNode("rotateAmount")) != 0) { if(node->GetNodeType() == DOUBLE_NODE) SetRotateAmount(node->AsDouble()); else if(node->GetNodeType() == FLOAT_NODE) SetRotateAmount((double)node->AsFloat()); } if((node = searchNode->GetNode("rotateType")) != 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) SetRotateType(AngleType(ival)); } else if(node->GetNodeType() == STRING_NODE) { AngleType value; if(AngleType_FromString(node->AsString(), value)) SetRotateType(value); } } if((node = searchNode->GetNode("doScale")) != 0) SetDoScale(node->AsBool()); if((node = searchNode->GetNode("scaleOrigin")) != 0) { if(node->GetNodeType() == DOUBLE_ARRAY_NODE) { SetScaleOrigin(node->AsDoubleArray()); } else if(node->GetNodeType() == FLOAT_ARRAY_NODE) { const float *fa = node->AsFloatArray(); double da[3] = {fa[0], fa[1], fa[2]}; SetScaleOrigin(da); } } if((node = searchNode->GetNode("scaleX")) != 0) { if(node->GetNodeType() == DOUBLE_NODE) SetScaleX(node->AsDouble()); else if(node->GetNodeType() == FLOAT_NODE) SetScaleX((double)node->AsFloat()); } if((node = searchNode->GetNode("scaleY")) != 0) { if(node->GetNodeType() == DOUBLE_NODE) SetScaleY(node->AsDouble()); else if(node->GetNodeType() == FLOAT_NODE) SetScaleY((double)node->AsFloat()); } if((node = searchNode->GetNode("scaleZ")) != 0) { if(node->GetNodeType() == DOUBLE_NODE) SetScaleZ(node->AsDouble()); else if(node->GetNodeType() == FLOAT_NODE) SetScaleZ((double)node->AsFloat()); } if((node = searchNode->GetNode("doTranslate")) != 0) SetDoTranslate(node->AsBool()); if((node = searchNode->GetNode("translateX")) != 0) { if(node->GetNodeType() == DOUBLE_NODE) SetTranslateX(node->AsDouble()); else if(node->GetNodeType() == FLOAT_NODE) SetTranslateX((double)node->AsFloat()); } if((node = searchNode->GetNode("translateY")) != 0) { if(node->GetNodeType() == DOUBLE_NODE) SetTranslateY(node->AsDouble()); else if(node->GetNodeType() == FLOAT_NODE) SetTranslateY((double)node->AsFloat()); } if((node = searchNode->GetNode("translateZ")) != 0) { if(node->GetNodeType() == DOUBLE_NODE) SetTranslateZ(node->AsDouble()); else if(node->GetNodeType() == FLOAT_NODE) SetTranslateZ((double)node->AsFloat()); } if((node = searchNode->GetNode("transformVectors")) != 0) SetTransformVectors(node->AsBool()); }