本文整理汇总了C++中SoInput::read方法的典型用法代码示例。如果您正苦于以下问题:C++ SoInput::read方法的具体用法?C++ SoInput::read怎么用?C++ SoInput::read使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SoInput
的用法示例。
在下文中一共展示了SoInput::read方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: inputChanged
void SoVtkOutlineFilter::inputChanged(SoField * f)
{
// Get the InputArrayToProcess value
if ( f == &InputArrayToProcess )
{
SbVariant vInputArrayToProcess = (SbVariant)InputArrayToProcess.getValue();
SoInput input;
int val0;
int val1;
int val2;
int val3;
SbString val4;
input.setBuffer((void *)vInputArrayToProcess.getField().getString(),256);
input.read(val0);
input.read(val1);
input.read(val2);
input.read(val3);
input.read(val4);
mObject->SetInputArrayToProcess(
(int) val0,
(int) val1,
(int) val2,
(int) val3,
val4.getString()
);
}
//mObject->Update();
}
示例2: reset
void SoVtkFieldData::reset()
{
mObject->UnRegister(0);
mObject->Delete();
mObject = 0;
mObject = vtkFieldData::New();
mObject->Register(0);
mObject->SetGlobalWarningDisplay(0);
// Get the input type(s)
// Get the Component value
if (addCalled == 1)
{
SbVariant *vComponent = (SbVariant *)Component.getValues(0);
SoInput input;
int nb_fields = Component.getNum();
vtkIdType val0;
int val1;
double val2;
for (int i=0; i < nb_fields; i++)
{
input.setBuffer((void *)vComponent[i].getField().getString(),256);
input.read(val0);
input.read(val1);
input.read(val2);
mObject->SetComponent(
(const vtkIdType) val0,
(const int) val1,
(const double) val2
);
}
}
}
示例3: inputChanged
void SoVtkFieldData::inputChanged(SoField * f)
{
// Get the Component value
if ( f == &Component )
{
SbVariant *vComponent = (SbVariant *)Component.getValues(0);
SoInput input;
int nb_fields = Component.getNum();
vtkIdType val0;
int val1;
double val2;
for (int i=0; i < nb_fields; i++)
{
input.setBuffer((void *)vComponent[i].getField().getString(),256);
input.read(val0);
input.read(val1);
input.read(val2);
mObject->SetComponent(
(const vtkIdType) val0,
(const int) val1,
(const double) val2
);
}
}
}
示例4:
void SoVtkImageVariance3D::inputChanged(SoField * f)
{
// Get the KernelSize value
if ( f == &KernelSize )
{
SbVariant *vKernelSize = (SbVariant *)KernelSize.getValues(0);
SoInput input;
int nb_fields = KernelSize.getNum();
int val0;
int val1;
int val2;
for (int i=0; i < nb_fields; i++)
{
input.setBuffer((void *)vKernelSize[i].getField().getString(),256);
input.read(val0);
input.read(val1);
input.read(val2);
mObject->SetKernelSize(
(int) val0,
(int) val1,
(int) val2
);
}
}
// Get the NumberOfThreads value
if ( f == &NumberOfThreads )
SO_VTK_SET_FIELD_VALUE( mObject, NumberOfThreads);
mObject->Update();
}
示例5: inputChanged
void SoVtkConeSource::inputChanged(SoField * f)
{
// Get the Radius value
if ( f == &Radius )
SO_VTK_SET_FIELD_VALUE( mObject, Radius);
// Get the Height value
if ( f == &Height )
SO_VTK_SET_FIELD_VALUE( mObject, Height);
// Get the Capping value
if ( f == &Capping )
SO_VTK_SET_FIELD_VALUE( mObject, Capping);
// Get the Direction value
if ( f == &Direction )
SO_VTK_SET_FIELD_VEC3F( mObject, Direction);
// Get the Center value
if ( f == &Center )
SO_VTK_SET_FIELD_VEC3F( mObject, Center);
// Get the Resolution value
if ( f == &Resolution )
SO_VTK_SET_FIELD_VALUE( mObject, Resolution);
// Get the Angle value
if ( f == &Angle )
SO_VTK_SET_FIELD_VALUE( mObject, Angle);
// Get the InputArrayToProcess value
if ( f == &InputArrayToProcess )
{
SbVariant vInputArrayToProcess = (SbVariant)InputArrayToProcess.getValue();
SoInput input;
int val0;
int val1;
int val2;
int val3;
SbString val4;
input.setBuffer((void *)vInputArrayToProcess.getField().getString(),256);
input.read(val0);
input.read(val1);
input.read(val2);
input.read(val3);
input.read(val4);
mObject->SetInputArrayToProcess(
(int) val0,
(int) val1,
(int) val2,
(int) val3,
val4.getString()
);
}
//mObject->Update();
}
示例6: reset
void SoVtkImageWrapPad::reset()
{
mObject->UnRegister(0);
mObject->Delete();
mObject = 0;
mObject = vtkImageWrapPad::New();
mObject->Register(0);
mObject->SetGlobalWarningDisplay(0);
// Get the input type(s)
SoVtkAlgorithmOutput *inputPortPtr = InputConnection.getValue();
if (inputPortPtr)
mObject->SetInputConnection(inputPortPtr->getPointer());
// Get the OutputNumberOfScalarComponents value
SO_VTK_SET_FIELD_VALUE( mObject, OutputNumberOfScalarComponents);
// Get the NumberOfThreads value
SO_VTK_SET_FIELD_VALUE( mObject, NumberOfThreads);
// Get the OutputWholeExtent value
if (addCalled == 1)
{
SbVariant *vOutputWholeExtent = (SbVariant *)OutputWholeExtent.getValues(0);
SoInput input;
int nb_fields = OutputWholeExtent.getNum();
int val0;
int val1;
int val2;
int val3;
int val4;
int val5;
for (int i=0; i < nb_fields; i++)
{
input.setBuffer((void *)vOutputWholeExtent[i].getField().getString(),256);
input.read(val0);
input.read(val1);
input.read(val2);
input.read(val3);
input.read(val4);
input.read(val5);
mObject->SetOutputWholeExtent(
(int) val0,
(int) val1,
(int) val2,
(int) val3,
(int) val4,
(int) val5
);
}
}
mObject->Update();
}
示例7: inputChanged
void SoVtkImageEllipsoidSource::inputChanged(SoField * f)
{
// Get the Radius value
if ( f == &Radius )
SO_VTK_SET_FIELD_VEC3F( mObject, Radius);
// Get the OutputScalarType value
if ( f == &OutputScalarType )
SO_VTK_SET_FIELD_VALUE( mObject, OutputScalarType);
// Get the OutValue value
if ( f == &OutValue )
SO_VTK_SET_FIELD_VALUE( mObject, OutValue);
// Get the InValue value
if ( f == &InValue )
SO_VTK_SET_FIELD_VALUE( mObject, InValue);
// Get the Center value
if ( f == &Center )
SO_VTK_SET_FIELD_VEC3F( mObject, Center);
// Get the WholeExtent value
if ( f == &WholeExtent )
{
SbVariant *vWholeExtent = (SbVariant *)WholeExtent.getValues(0);
SoInput input;
int nb_fields = WholeExtent.getNum();
int val0;
int val1;
int val2;
int val3;
int val4;
int val5;
for (int i=0; i < nb_fields; i++)
{
input.setBuffer((void *)vWholeExtent[i].getField().getString(),256);
input.read(val0);
input.read(val1);
input.read(val2);
input.read(val3);
input.read(val4);
input.read(val5);
mObject->SetWholeExtent(
(int) val0,
(int) val1,
(int) val2,
(int) val3,
(int) val4,
(int) val5
);
}
}
mObject->Update();
}
示例8: inputChanged
void SoVtkGeometryFilter::inputChanged(SoField * f)
{
// Get the CellClipping value
if ( f == &CellClipping )
SO_VTK_SET_FIELD_VALUE( mObject, CellClipping);
// Get the Locator value
if ( f == &Locator )
SO_VTK_SET_FIELD_DATA( mObject, Locator, vtkPointLocator);
// Get the PointClipping value
if ( f == &PointClipping )
SO_VTK_SET_FIELD_VALUE( mObject, PointClipping);
// Get the ExtentClipping value
if ( f == &ExtentClipping )
SO_VTK_SET_FIELD_VALUE( mObject, ExtentClipping);
// Get the Merging value
if ( f == &Merging )
SO_VTK_SET_FIELD_VALUE( mObject, Merging);
// Get the Extent value
if ( f == &Extent )
{
SbVariant *vExtent = (SbVariant *)Extent.getValues(0);
SoInput input;
int nb_fields = Extent.getNum();
double val0;
double val1;
double val2;
double val3;
double val4;
double val5;
for (int i=0; i < nb_fields; i++)
{
input.setBuffer((void *)vExtent[i].getField().getString(),256);
input.read(val0);
input.read(val1);
input.read(val2);
input.read(val3);
input.read(val4);
input.read(val5);
mObject->SetExtent(
(double) val0,
(double) val1,
(double) val2,
(double) val3,
(double) val4,
(double) val5
);
}
}
mObject->Update();
}
示例9: inputChanged
void SoVtkImageAccumulate::inputChanged(SoField * f)
{
// Get the ReverseStencil value
if ( f == &ReverseStencil )
SO_VTK_SET_FIELD_VALUE( mObject, ReverseStencil);
// Get the ComponentExtent value
if ( f == &ComponentExtent )
{
SbVariant *vComponentExtent = (SbVariant *)ComponentExtent.getValues(0);
SoInput input;
int nb_fields = ComponentExtent.getNum();
int val0;
int val1;
int val2;
int val3;
int val4;
int val5;
for (int i=0; i < nb_fields; i++)
{
input.setBuffer((void *)vComponentExtent[i].getField().getString(),256);
input.read(val0);
input.read(val1);
input.read(val2);
input.read(val3);
input.read(val4);
input.read(val5);
mObject->SetComponentExtent(
(int) val0,
(int) val1,
(int) val2,
(int) val3,
(int) val4,
(int) val5
);
}
}
// Get the Stencil value
if ( f == &Stencil )
SO_VTK_SET_FIELD_DATA( mObject, Stencil, vtkImageStencilData);
// Get the ComponentSpacing value
if ( f == &ComponentSpacing )
SO_VTK_SET_FIELD_VEC3F( mObject, ComponentSpacing);
// Get the ComponentOrigin value
if ( f == &ComponentOrigin )
SO_VTK_SET_FIELD_VEC3F( mObject, ComponentOrigin);
mObject->Update();
}
示例10: inputChanged
void SoVtkExtractGrid::inputChanged(SoField * f)
{
// Get the VOI value
if ( f == &VOI )
{
if ( VOI.getNum() >= 6)
{
SO_VTK_SET_FIELD_MFINT32( mObject, VOI);
}
else
{
SoDebugError::post( __FILE__, "This field must have 6 values." );
}
}
// Get the SampleRate value
if ( f == &SampleRate )
SO_VTK_SET_FIELD_VEC3F( mObject, SampleRate);
// Get the InputArrayToProcess value
if ( f == &InputArrayToProcess )
{
SbVariant vInputArrayToProcess = (SbVariant)InputArrayToProcess.getValue();
SoInput input;
int val0;
int val1;
int val2;
int val3;
SbString val4;
input.setBuffer((void *)vInputArrayToProcess.getField().getString(),256);
input.read(val0);
input.read(val1);
input.read(val2);
input.read(val3);
input.read(val4);
mObject->SetInputArrayToProcess(
(int) val0,
(int) val1,
(int) val2,
(int) val3,
val4.getString()
);
}
// Get the IncludeBoundary value
if ( f == &IncludeBoundary )
SO_VTK_SET_FIELD_VALUE( mObject, IncludeBoundary);
//mObject->Update();
}
示例11: inputChanged
void SoVtkImageGaussianSource::inputChanged(SoField * f)
{
// Get the Maximum value
if ( f == &Maximum )
SO_VTK_SET_FIELD_VALUE( mObject, Maximum);
// Get the StandardDeviation value
if ( f == &StandardDeviation )
SO_VTK_SET_FIELD_VALUE( mObject, StandardDeviation);
// Get the Center value
if ( f == &Center )
SO_VTK_SET_FIELD_VEC3F( mObject, Center);
// Get the WholeExtent value
if ( f == &WholeExtent )
{
SbVariant *vWholeExtent = (SbVariant *)WholeExtent.getValues(0);
SoInput input;
int nb_fields = WholeExtent.getNum();
int val0;
int val1;
int val2;
int val3;
int val4;
int val5;
for (int i=0; i < nb_fields; i++)
{
input.setBuffer((void *)vWholeExtent[i].getField().getString(),256);
input.read(val0);
input.read(val1);
input.read(val2);
input.read(val3);
input.read(val4);
input.read(val5);
mObject->SetWholeExtent(
(int) val0,
(int) val1,
(int) val2,
(int) val3,
(int) val4,
(int) val5
);
}
}
mObject->Update();
}
示例12: inputChanged
void SoVtkImageDataGeometryFilter::inputChanged(SoField * f)
{
// Get the OutputTriangles value
if ( f == &OutputTriangles )
SO_VTK_SET_FIELD_VALUE( mObject, OutputTriangles);
// Get the Extent value
if ( f == &Extent )
{
SbVariant *vExtent = (SbVariant *)Extent.getValues(0);
SoInput input;
int nb_fields = Extent.getNum();
int val0;
int val1;
int val2;
int val3;
int val4;
int val5;
for (int i=0; i < nb_fields; i++)
{
input.setBuffer((void *)vExtent[i].getField().getString(),256);
input.read(val0);
input.read(val1);
input.read(val2);
input.read(val3);
input.read(val4);
input.read(val5);
mObject->SetExtent(
(int) val0,
(int) val1,
(int) val2,
(int) val3,
(int) val4,
(int) val5
);
}
}
// Get the ThresholdCells value
if ( f == &ThresholdCells )
SO_VTK_SET_FIELD_VALUE( mObject, ThresholdCells);
// Get the ThresholdValue value
if ( f == &ThresholdValue )
SO_VTK_SET_FIELD_VALUE( mObject, ThresholdValue);
mObject->Update();
}
示例13: reset
void SoVtkHull::reset()
{
mObject->UnRegister(0);
mObject->Delete();
mObject = 0;
mObject = vtkHull::New();
mObject->Register(0);
mObject->SetGlobalWarningDisplay(0);
// Get the input type(s)
SoVtkAlgorithmOutput *inputPortPtr = InputConnection.getValue();
if (inputPortPtr)
mObject->SetInputConnection(inputPortPtr->getPointer());
// Get the Planes value
SO_VTK_SET_FIELD_DATA( mObject, Planes, vtkPlanes);
// Get the Plane value
if (addCalled == 1)
{
SbVariant *vPlane = (SbVariant *)Plane.getValues(0);
SoInput input;
int nb_fields = Plane.getNum();
double val0;
double val1;
double val2;
for (int i=0; i < nb_fields; i++)
{
input.setBuffer((void *)vPlane[i].getField().getString(),256);
input.read(val0);
input.read(val1);
input.read(val2);
mObject->AddPlane(
(double) val0,
(double) val1,
(double) val2
);
}
}
// Get the RecursiveSpherePlanes value
SO_VTK_ADD_FIELD_VALUE( mObject, RecursiveSpherePlanes);
mObject->Update();
}
示例14: inputChanged
void SoVtkGenericProbeFilter::inputChanged(SoField * f)
{
// Get the Source value
if ( f == &Source )
SO_VTK_SET_FIELD_DATA( mObject, Source, vtkGenericDataSet);
// Get the NumberOfInputConnections value
if ( f == &NumberOfInputConnections )
{
SbVariant *vNumberOfInputConnections = (SbVariant *)NumberOfInputConnections.getValues(0);
SoInput input;
int nb_fields = NumberOfInputConnections.getNum();
int val0;
int val1;
for (int i=0; i < nb_fields; i++)
{
input.setBuffer((void *)vNumberOfInputConnections[i].getField().getString(),256);
input.read(val0);
input.read(val1);
//mObject->SetNumberOfInputConnections( (int) val0, (int) val1 );
}
}
mObject->Update();
}
示例15: inputChanged
void SoVtkImageWrapPad::inputChanged(SoField * f)
{
// Get the OutputNumberOfScalarComponents value
if ( f == &OutputNumberOfScalarComponents )
SO_VTK_SET_FIELD_VALUE( mObject, OutputNumberOfScalarComponents);
// Get the NumberOfThreads value
if ( f == &NumberOfThreads )
SO_VTK_SET_FIELD_VALUE( mObject, NumberOfThreads);
// Get the OutputWholeExtent value
if ( f == &OutputWholeExtent )
{
SbVariant *vOutputWholeExtent = (SbVariant *)OutputWholeExtent.getValues(0);
SoInput input;
int nb_fields = OutputWholeExtent.getNum();
int val0;
int val1;
int val2;
int val3;
int val4;
int val5;
for (int i=0; i < nb_fields; i++)
{
input.setBuffer((void *)vOutputWholeExtent[i].getField().getString(),256);
input.read(val0);
input.read(val1);
input.read(val2);
input.read(val3);
input.read(val4);
input.read(val5);
mObject->SetOutputWholeExtent(
(int) val0,
(int) val1,
(int) val2,
(int) val3,
(int) val4,
(int) val5
);
}
}
mObject->Update();
}