当前位置: 首页>>代码示例>>C++>>正文


C++ DataNode::AsDouble方法代码示例

本文整理汇总了C++中DataNode::AsDouble方法的典型用法代码示例。如果您正苦于以下问题:C++ DataNode::AsDouble方法的具体用法?C++ DataNode::AsDouble怎么用?C++ DataNode::AsDouble使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DataNode的用法示例。


在下文中一共展示了DataNode::AsDouble方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: if

void
ContourOpAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

    DataNode *searchNode = parentNode->GetNode("ContourOpAttributes");
    if(searchNode == 0)
        return;

    DataNode *node;
    if((node = searchNode->GetNode("contourNLevels")) != 0)
        SetContourNLevels(node->AsInt());
    if((node = searchNode->GetNode("contourValue")) != 0)
        SetContourValue(node->AsDoubleVector());
    if((node = searchNode->GetNode("contourPercent")) != 0)
        SetContourPercent(node->AsDoubleVector());
    if((node = searchNode->GetNode("contourMethod")) != 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)
                SetContourMethod(ContourMethod(ival));
        }
        else if(node->GetNodeType() == STRING_NODE)
        {
            ContourMethod value;
            if(ContourMethod_FromString(node->AsString(), value))
                SetContourMethod(value);
        }
    }
    if((node = searchNode->GetNode("minFlag")) != 0)
        SetMinFlag(node->AsBool());
    if((node = searchNode->GetNode("maxFlag")) != 0)
        SetMaxFlag(node->AsBool());
    if((node = searchNode->GetNode("min")) != 0)
        SetMin(node->AsDouble());
    if((node = searchNode->GetNode("max")) != 0)
        SetMax(node->AsDouble());
    if((node = searchNode->GetNode("scaling")) != 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)
                SetScaling(ContourScaling(ival));
        }
        else if(node->GetNodeType() == STRING_NODE)
        {
            ContourScaling value;
            if(ContourScaling_FromString(node->AsString(), value))
                SetScaling(value);
        }
    }
    if((node = searchNode->GetNode("variable")) != 0)
        SetVariable(node->AsString());
}
开发者ID:HarinarayanKrishnan,项目名称:VisIt28RC_Trunk,代码行数:60,代码来源:ContourOpAttributes.C

示例2: if

void
CartographicProjectionAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

    DataNode *searchNode = parentNode->GetNode("CartographicProjectionAttributes");
    if(searchNode == 0)
        return;

    DataNode *node;
    if((node = searchNode->GetNode("projectionID")) != 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 < 11)
                SetProjectionID(ProjectionID(ival));
        }
        else if(node->GetNodeType() == STRING_NODE)
        {
            ProjectionID value;
            if(ProjectionID_FromString(node->AsString(), value))
                SetProjectionID(value);
        }
    }
    if((node = searchNode->GetNode("centralMeridian")) != 0)
        SetCentralMeridian(node->AsDouble());
}
开发者ID:,项目名称:,代码行数:30,代码来源:

示例3: SetUseStride

void
TensorAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

    DataNode *searchNode = parentNode->GetNode("TensorAttributes");
    if(searchNode == 0)
        return;

    DataNode *node;
    if((node = searchNode->GetNode("useStride")) != 0)
        SetUseStride(node->AsBool());
    if((node = searchNode->GetNode("stride")) != 0)
        SetStride(node->AsInt());
    if((node = searchNode->GetNode("nTensors")) != 0)
        SetNTensors(node->AsInt());
    if((node = searchNode->GetNode("scale")) != 0)
        SetScale(node->AsDouble());
    if((node = searchNode->GetNode("scaleByMagnitude")) != 0)
        SetScaleByMagnitude(node->AsBool());
    if((node = searchNode->GetNode("autoScale")) != 0)
        SetAutoScale(node->AsBool());
    if((node = searchNode->GetNode("colorByEigenvalues")) != 0)
        SetColorByEigenvalues(node->AsBool());
    if((node = searchNode->GetNode("useLegend")) != 0)
        SetUseLegend(node->AsBool());
    if((node = searchNode->GetNode("tensorColor")) != 0)
        tensorColor.SetFromNode(node);
    if((node = searchNode->GetNode("colorTableName")) != 0)
        SetColorTableName(node->AsString());
    if((node = searchNode->GetNode("invertColorTable")) != 0)
        SetInvertColorTable(node->AsBool());
}
开发者ID:,项目名称:,代码行数:34,代码来源:

示例4: SetVar

void
DeformSphereGlyphAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

    DataNode *searchNode = parentNode->GetNode("DeformSphereGlyphAttributes");
    if(searchNode == 0)
        return;

    DataNode *node;
    if((node = searchNode->GetNode("var")) != 0)
        SetVar(node->AsString());
    if((node = searchNode->GetNode("scale")) != 0)
        SetScale(node->AsDouble());
    if((node = searchNode->GetNode("minSize")) != 0)
        SetMinSize(node->AsDouble());
}
开发者ID:,项目名称:,代码行数:18,代码来源:

示例5: SetOffsetX

void
StaggerAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

    DataNode *searchNode = parentNode->GetNode("StaggerAttributes");
    if(searchNode == 0)
        return;

    DataNode *node;
    if((node = searchNode->GetNode("offsetX")) != 0)
        SetOffsetX(node->AsDouble());
    if((node = searchNode->GetNode("offsetY")) != 0)
        SetOffsetY(node->AsDouble());
    if((node = searchNode->GetNode("offsetZ")) != 0)
        SetOffsetZ(node->AsDouble());
}
开发者ID:HarinarayanKrishnan,项目名称:VisIt28RC_Trunk,代码行数:18,代码来源:StaggerAttributes.C

示例6: SetX

void
ThreeSliceAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

    DataNode *searchNode = parentNode->GetNode("ThreeSliceAttributes");
    if(searchNode == 0)
        return;

    DataNode *node;
    if((node = searchNode->GetNode("x")) != 0)
        SetX(node->AsDouble());
    if((node = searchNode->GetNode("y")) != 0)
        SetY(node->AsDouble());
    if((node = searchNode->GetNode("z")) != 0)
        SetZ(node->AsDouble());
    if((node = searchNode->GetNode("interactive")) != 0)
        SetInteractive(node->AsBool());
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:20,代码来源:ThreeSliceAttributes.C

示例7: SetVisible

void
AxisTickMarks::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

    DataNode *searchNode = parentNode->GetNode("AxisTickMarks");
    if(searchNode == 0)
        return;

    DataNode *node;
    if((node = searchNode->GetNode("visible")) != 0)
        SetVisible(node->AsBool());
    if((node = searchNode->GetNode("majorMinimum")) != 0)
        SetMajorMinimum(node->AsDouble());
    if((node = searchNode->GetNode("majorMaximum")) != 0)
        SetMajorMaximum(node->AsDouble());
    if((node = searchNode->GetNode("minorSpacing")) != 0)
        SetMinorSpacing(node->AsDouble());
    if((node = searchNode->GetNode("majorSpacing")) != 0)
        SetMajorSpacing(node->AsDouble());
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:22,代码来源:AxisTickMarks.C

示例8: SetTarget

void
DecimateAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

    DataNode *searchNode = parentNode->GetNode("DecimateAttributes");
    if(searchNode == 0)
        return;

    DataNode *node;
    if((node = searchNode->GetNode("target")) != 0)
        SetTarget(node->AsDouble());
}
开发者ID:HarinarayanKrishnan,项目名称:VisIt28RC_Trunk,代码行数:14,代码来源:DecimateAttributes.C

示例9: SetScaleFactor

void
Scale::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

    DataNode *searchNode = parentNode->GetNode("Scale");
    if(searchNode == 0)
        return;

    DataNode *node;
    if((node = searchNode->GetNode("ScaleFactor")) != 0)
        SetScaleFactor(node->AsDouble());
}
开发者ID:kamek-pf,项目名称:visit-shrink-plugin,代码行数:14,代码来源:Scale.C

示例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());
}
开发者ID:EricAlex,项目名称:ThirdParty-dev,代码行数:16,代码来源:SphereAttributes.C

示例11: SetOpacity

void
TruecolorAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

    DataNode *searchNode = parentNode->GetNode("TruecolorAttributes");
    if(searchNode == 0)
        return;

    DataNode *node;
    if((node = searchNode->GetNode("opacity")) != 0)
        SetOpacity(node->AsDouble());
    if((node = searchNode->GetNode("lightingFlag")) != 0)
        SetLightingFlag(node->AsBool());
}
开发者ID:,项目名称:,代码行数:16,代码来源:

示例12: 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());
}
开发者ID:,项目名称:,代码行数:18,代码来源:

示例13: if

void
ViewerClientAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

    DataNode *searchNode = parentNode->GetNode("ViewerClientAttributes");
    if(searchNode == 0)
        return;

    DataNode *node;
    if((node = searchNode->GetNode("renderingType")) != 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)
                SetRenderingType(RenderType(ival));
        }
        else if(node->GetNodeType() == STRING_NODE)
        {
            RenderType value;
            if(RenderType_FromString(node->AsString(), value))
                SetRenderingType(value);
        }
    }
    if((node = searchNode->GetNode("id")) != 0)
        SetId(node->AsInt());
    if((node = searchNode->GetNode("title")) != 0)
        SetTitle(node->AsString());
    if((node = searchNode->GetNode("windowIds")) != 0)
        SetWindowIds(node->AsIntVector());
    if((node = searchNode->GetNode("imageWidth")) != 0)
        SetImageWidth(node->AsInt());
    if((node = searchNode->GetNode("imageHeight")) != 0)
        SetImageHeight(node->AsInt());
    if((node = searchNode->GetNode("imageResolutionPcnt")) != 0)
        SetImageResolutionPcnt(node->AsDouble());
    if((node = searchNode->GetNode("externalClient")) != 0)
        SetExternalClient(node->AsBool());
    if((node = searchNode->GetNode("renderingTypes")) != 0)
        SetRenderingTypes(node->AsIntVector());
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:44,代码来源:ViewerClientAttributes.C

示例14: SetUseTargetVal

void
InternalResampleAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

    DataNode *searchNode = parentNode->GetNode("InternalResampleAttributes");
    if(searchNode == 0)
        return;

    DataNode *node;
    if((node = searchNode->GetNode("useTargetVal")) != 0)
        SetUseTargetVal(node->AsBool());
    if((node = searchNode->GetNode("targetVal")) != 0)
        SetTargetVal(node->AsInt());
    if((node = searchNode->GetNode("width")) != 0)
        SetWidth(node->AsInt());
    if((node = searchNode->GetNode("height")) != 0)
        SetHeight(node->AsInt());
    if((node = searchNode->GetNode("depth")) != 0)
        SetDepth(node->AsInt());
    if((node = searchNode->GetNode("prefersPowersOfTwo")) != 0)
        SetPrefersPowersOfTwo(node->AsBool());
    if((node = searchNode->GetNode("defaultVal")) != 0)
        SetDefaultVal(node->AsFloat());
    if((node = searchNode->GetNode("useBounds")) != 0)
        SetUseBounds(node->AsBool());
    if((node = searchNode->GetNode("minX")) != 0)
        SetMinX(node->AsDouble());
    if((node = searchNode->GetNode("minY")) != 0)
        SetMinY(node->AsDouble());
    if((node = searchNode->GetNode("minZ")) != 0)
        SetMinZ(node->AsDouble());
    if((node = searchNode->GetNode("maxX")) != 0)
        SetMaxX(node->AsDouble());
    if((node = searchNode->GetNode("maxY")) != 0)
        SetMaxY(node->AsDouble());
    if((node = searchNode->GetNode("maxZ")) != 0)
        SetMaxZ(node->AsDouble());
    if((node = searchNode->GetNode("useArbitrator")) != 0)
        SetUseArbitrator(node->AsBool());
    if((node = searchNode->GetNode("arbitratorLessThan")) != 0)
        SetArbitratorLessThan(node->AsBool());
    if((node = searchNode->GetNode("arbitratorVarName")) != 0)
        SetArbitratorVarName(node->AsString());
    if((node = searchNode->GetNode("distributedResample")) != 0)
        SetDistributedResample(node->AsBool());
}
开发者ID:HarinarayanKrishnan,项目名称:VisIt26RC_Trunk,代码行数:48,代码来源:InternalResampleAttributes.C

示例15: SetPosition

void
SaveSubWindowAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

    DataNode *searchNode = parentNode->GetNode("SaveSubWindowAttributes");
    if(searchNode == 0)
        return;

    DataNode *node;
    if((node = searchNode->GetNode("position")) != 0)
        SetPosition(node->AsIntArray());
    if((node = searchNode->GetNode("size")) != 0)
        SetSize(node->AsIntArray());
    if((node = searchNode->GetNode("layer")) != 0)
        SetLayer(node->AsInt());
    if((node = searchNode->GetNode("transparency")) != 0)
        SetTransparency(node->AsDouble());
    if((node = searchNode->GetNode("omitWindow")) != 0)
        SetOmitWindow(node->AsBool());
}
开发者ID:HarinarayanKrishnan,项目名称:VisIt28RC_Trunk,代码行数:22,代码来源:SaveSubWindowAttributes.C


注:本文中的DataNode::AsDouble方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。