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


C++ avtDataObject_p::GetInfo方法代码示例

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


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

示例1:

void
avtPseudocolorPlot::SetCellCountMultiplierForSRThreshold(
                                   const avtDataObject_p dob)
{
    if (dob->GetInfo().GetAttributes().GetTopologicalDimension() > 0)
    {
        // Not a point var, no multiplier.
        cellCountMultiplierForSRThreshold = 1.0; 
    }
    else 
    {
        //
        // Actual polygon count can change on-the-fly based on point type,
        // and does not require re-execution of the engine (where the
        // cell count is important, and queried from.) 
        // Using the current polgyon count doesn't make sense,
        // the default point-type is 'Point' which does not do any
        // glyhing.  If we return 1, then we may never switch into SR
        // mode even when necessary (if user changes type to icosahedron
        // in 3D, which adds 20 polys per point). 
        // Always using the maximum may be overkill, but it seems best
        // under the circumstances.
        //
        if (dob->GetInfo().GetAttributes().GetSpatialDimension() == 3)
            cellCountMultiplierForSRThreshold = 20.0;
        else 
            cellCountMultiplierForSRThreshold = 12.0;
    }
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:29,代码来源:avtPseudocolorPlot.C

示例2: avtStaggeringFilter

avtDataObject_p
avtPseudocolorPlot::ApplyOperators(avtDataObject_p input)
{
    avtDataObject_p dob = input; 

    if (staggeringFilter != NULL) {
      delete staggeringFilter;
      staggeringFilter = NULL;
    }
    staggeringFilter = new avtStaggeringFilter();
    staggeringFilter->SetInput(dob);
    dob = staggeringFilter->GetOutput();
  
    if (input->GetInfo().GetAttributes().GetTopologicalDimension() == 0)
    {
        if (pcfilter != NULL)
        {
            delete pcfilter;
        }
        pcfilter = new avtPseudocolorFilter();
        pcfilter->SetInput(dob);
        pcfilter->SetPlotAtts(&atts);
        dob = pcfilter->GetOutput();
    }

    return dob;
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:27,代码来源:avtPseudocolorPlot.C

示例3: avtMatrix

void
avtMinMaxQuery::Preparation(avtDataObject_p inData)
{
    avtDataRequest_p dataRequest = inData->GetOriginatingSource()
        ->GetGeneralContract()->GetDataRequest();

    src = inData->GetQueryableSource();

    intVector dlist;
    dataRequest->GetSIL().GetDomainList(dlist);
    if (dlist.size() == 1 && dataRequest->UsesAllDomains())
        singleDomain = true;
    else
        singleDomain = false;

    avtDataAttributes &inAtts = inData->GetInfo().GetAttributes();
    if (inAtts.HasInvTransform() && inAtts.GetCanUseInvTransform())
    {
        invTransform = new avtMatrix(*(inAtts.GetInvTransform()));
    }
    else
    {
        invTransform = NULL;
    }
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:25,代码来源:avtMinMaxQuery.C

示例4:

void
avtExternalSurfaceFilter::UpdateDataObjectInfoCB(avtDataObject_p &input,
    avtDataObject_p &output, void *This)
{
    avtDataAttributes &outAtts = output->GetInfo().GetAttributes();
    outAtts.AddFilterMetaData("ExternalSurface");
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:7,代码来源:avtExternalSurfaceFilter.C

示例5: SNPRINTF

void
avtTransformFilter::UpdateDataObjectInfoCB(avtDataObject_p &input,
    avtDataObject_p &output, void *This)
{
    avtDataAttributes &outAtts = output->GetInfo().GetAttributes();
    const TransformAttributes &tf = ((const avtTransformFilter *)This)->atts;

    char tmp[200];
    std::string scale, translate, rotate;
    if(tf.GetDoScale())
    {
        SNPRINTF(tmp, 200, "scale=%lg,%lg,%lg ", 
                 tf.GetScaleX(), tf.GetScaleY(), tf.GetScaleZ());
        scale = tmp;
    }
    if(tf.GetDoTranslate())
    {
        SNPRINTF(tmp, 200, "translate=%lg,%lg,%lg ", 
                 tf.GetTranslateX(), tf.GetTranslateY(), tf.GetTranslateZ());
        translate = tmp;
    }
    if(tf.GetDoRotate())
    {
        SNPRINTF(tmp, 200, "rotateOrigin=%lg,%lg,%lg rotateAxis=%lg,%lg,%lg rotateAmount=%lg", 
                 tf.GetRotateOrigin()[0], tf.GetRotateOrigin()[1], tf.GetRotateOrigin()[2],
                 tf.GetRotateAxis()[0], tf.GetRotateAxis()[1], tf.GetRotateAxis()[2],
                 tf.GetRotateAmount());
        rotate = tmp;
    }
    outAtts.AddFilterMetaData("Transform", scale + translate + rotate);
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:31,代码来源:avtTransformFilter.C

示例6:

void
avtDisplacePluginFilter::UpdateDataObjectInfoCB(avtDataObject_p &input,
        avtDataObject_p &output, void *This)
{
    avtDataAttributes &outAtts = output->GetInfo().GetAttributes();
    outAtts.AddFilterMetaData("Displace");
}
开发者ID:ahota,项目名称:visit_intel,代码行数:7,代码来源:avtDisplacePluginFilter.C

示例7:

avtDataObject_p
avtHistogramPlot::ApplyOperators(avtDataObject_p input)
{
#ifdef ENGINE
    if (HistogramFilter != NULL)
        delete HistogramFilter;
    if (amountFilter != NULL)
        delete amountFilter;

    avtDataAttributes &in_atts = input->GetInfo().GetAttributes();
    avtExpressionFilter *af = NULL;
    if (in_atts.GetTopologicalDimension() == 3)
    {
        af = new avtVMetricVolume;
    }
    else
    {
        if (in_atts.GetSpatialDimension() == 2)
        {
            if (input->GetInfo().GetAttributes().GetMeshCoordType() == AVT_XY)
                af = new avtVMetricArea;
            else
                af = new avtRevolvedVolume;
        }
        else
            af = new  avtVMetricArea;
    }
    
    af->SetOutputVariableName("_amounts");
    af->SetInput(input);
    amountFilter = af;

    HistogramFilter = new avtHistogramFilter;
    HistogramFilter->SetAttributes(atts);
    if (atts.GetHistogramType() != HistogramAttributes::Frequency)
        HistogramFilter->SetInput(af->GetOutput());
    else
        HistogramFilter->SetInput(input);
    return HistogramFilter->GetOutput();
#endif
    return input;
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:42,代码来源:avtHistogramPlot.C

示例8: SNPRINTF

void
avtResamplePluginFilter::UpdateDataObjectInfoCB(avtDataObject_p &input,
    avtDataObject_p &output, void *This)
{
    avtDataAttributes &outAtts = output->GetInfo().GetAttributes();
    const ResampleAttributes &rs = ((const avtResamplePluginFilter *)This)->atts;

    char params[200];
    SNPRINTF(params, 200, "nx=%d ny=%d nz=%d", 
             rs.GetSamplesX(), rs.GetSamplesY(), rs.GetSamplesZ());
    outAtts.AddFilterMetaData("Resample", params);
}
开发者ID:HarinarayanKrishnan,项目名称:VisIt28RC_Trunk,代码行数:12,代码来源:avtResamplePluginFilter.C

示例9: avtShiftCenteringFilter

avtDataObject_p
avtStreamlinePlot::ApplyOperators(avtDataObject_p input)
{
#ifdef ENGINE
    avtDataObject_p dob = input; 

    // Try to determine the centering.  If we have an expression, we won't
    // be able to.  So be conservative and assume the worst.
    avtCentering centering = AVT_ZONECENT;
    if (input->GetInfo().GetAttributes().ValidVariable(varname))
        centering = input->GetInfo().GetAttributes().GetCentering(varname);

    //Convert from zonal to nodal, if requested.
    if(centering == AVT_ZONECENT && atts.GetForceNodeCenteredData())
    {
        if(shiftCenteringFilter != NULL)
            delete shiftCenteringFilter;
        shiftCenteringFilter = new avtShiftCenteringFilter(AVT_NODECENT);
        shiftCenteringFilter->SetInput(input);
        dob = shiftCenteringFilter->GetOutput();
        
        if(removeGhostZonesFilter != NULL)
            delete removeGhostZonesFilter;
        removeGhostZonesFilter = new avtGhostZoneFilter();
        removeGhostZonesFilter->GhostDataMustBeRemoved();
        removeGhostZonesFilter->SetInput(dob);
        dob = removeGhostZonesFilter->GetOutput();
    }

    // Add the streamline filter.
    streamlineFilter->SetInput(dob);
    dob = streamlineFilter->GetOutput();

    return dob;
#else
    return input;
#endif
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:38,代码来源:avtStreamlinePlot.C

示例10: if

void
avtIsosurfaceFilter::UpdateDataObjectInfoCB(avtDataObject_p &input,
    avtDataObject_p &output, void *This)
{
    avtDataAttributes &outAtts = output->GetInfo().GetAttributes();
    const IsosurfaceAttributes &iso = ((const avtIsosurfaceFilter *)This)->atts;

    char tmp[200];
    std::string params;
    if(iso.GetContourMethod() == IsosurfaceAttributes::Level)
    {
        SNPRINTF(tmp, 200, "contourNLevels=%d", iso.GetContourNLevels());
        params = tmp;
    }
    else if(iso.GetContourMethod() == IsosurfaceAttributes::Value)
    {
        params = "contourValue=";
        for(size_t i = 0; i < iso.GetContourValue().size(); ++i)
        {
            SNPRINTF(tmp, 200, "%lg", iso.GetContourValue()[i]);
            params += tmp;
            if(i < iso.GetContourValue().size()-1)
                params += ", ";
        }
    }
    else if(iso.GetContourMethod() == IsosurfaceAttributes::Percent)
    {
        params = "contourPercent=";
        for(size_t i = 0; i < iso.GetContourPercent().size(); ++i)
        {
            SNPRINTF(tmp, 200, "%lg", iso.GetContourPercent()[i]);
            params += tmp;
            if(i < iso.GetContourValue().size()-1)
                params += ", ";
        }
    }
    outAtts.AddFilterMetaData("Isosurface", params);
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:38,代码来源:avtIsosurfaceFilter.C


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