本文整理汇总了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;
}
}
示例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;
}
示例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;
}
}
示例4:
void
avtExternalSurfaceFilter::UpdateDataObjectInfoCB(avtDataObject_p &input,
avtDataObject_p &output, void *This)
{
avtDataAttributes &outAtts = output->GetInfo().GetAttributes();
outAtts.AddFilterMetaData("ExternalSurface");
}
示例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);
}
示例6:
void
avtDisplacePluginFilter::UpdateDataObjectInfoCB(avtDataObject_p &input,
avtDataObject_p &output, void *This)
{
avtDataAttributes &outAtts = output->GetInfo().GetAttributes();
outAtts.AddFilterMetaData("Displace");
}
示例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;
}
示例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);
}
示例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
}
示例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);
}