Open CASCADE Technology 7.9.0
IVtkTools_ShapeDataSource Class Reference

VTK data source for OCC shapes polygonal data. More...

#include <IVtkTools_ShapeDataSource.hxx>

Inheritance diagram for IVtkTools_ShapeDataSource:

Public Member Functions

 vtkTypeMacro (IVtkTools_ShapeDataSource, vtkPolyDataAlgorithm) static IVtkTools_ShapeDataSource *New()
 
Initialization

Set the source OCCT shape.

Parameters
[in]theOccShapeOCCT shape wrapper.
void SetShape (const IVtkOCC_Shape::Handle &theOccShape)
 Get the source OCCT shape.
 
const IVtkOCC_Shape::HandleGetShape ()
 Get the source OCCT shape.
 
void FastTransformModeOn ()
 Get the source OCCT shape.
 
void FastTransformModeOff ()
 Get the source OCCT shape.
 
Data accessors

Returns ID of the shape used as a topological input for this data source.

Returns
requested ID.
IVtk_IdType GetId () const
 Checks if the internal OccShape pointer is the same the argument.
 
Standard_Boolean Contains (const IVtkOCC_Shape::Handle &theOccShape) const
 Checks if the internal OccShape pointer is the same the argument.
 
vtkSmartPointer< vtkIdTypeArray > SubShapeIDs ()
 Access to the shape's sub-shape ids array.
 

Protected Member Functions

Interface to override

This is called by the superclass. This is the method you should override if you use this class as ancestor. Build output polygonal data set from the shape wrapper.

Parameters
[in]theRequestinformation about data object. In current implementation it is ignored.
[in]theInputVectorthe input data. As adata source is the start stage of the VTK pipeline, theInputVector is empty and not used (no input port).
[in]theOutputVectorthe pointer to output data, that is filled in this method.
virtual int RequestData (vtkInformation *theRequest, vtkInformationVector **theInputVector, vtkInformationVector *theOutputVector) override
 

Internals

Transforms the passed polygonal data by the given OCCT transformation matrix.

Parameters
[in]theSourcesource polygonal data to transform.
[in]theTrsftransformation to apply.
Returns
resulting polygonal data (transformed copy of source).
IVtkOCC_Shape::Handle myOccShape
 Shape wrapper used as an input.
 
IVtkVTK_ShapeData::Handle myPolyData
 Polygonal representation of shape.
 
Standard_Boolean myIsFastTransformMode
 Indicates whether light-weighted processing for transformed shapes is enabled. If so, data source does not re-compute the discrete model for the input topological shape. It rather uses the already existing one and applies the necessary transformation to it.
 
Standard_Boolean myIsTransformOnly
 Internal flag indicating that the current working shape is just a transformed copy of the previously processed one. This flag is used in a couple with "fast transformation" mode flag.
 
vtkSmartPointer< vtkPolyData > transform (vtkPolyData *theSource, const gp_Trsf &theTrsf) const
 Shape wrapper used as an input.
 
 IVtkTools_ShapeDataSource ()
 Shape wrapper used as an input.
 
virtual ~IVtkTools_ShapeDataSource ()
 Shape wrapper used as an input.
 

Detailed Description

VTK data source for OCC shapes polygonal data.

Constructor & Destructor Documentation

◆ IVtkTools_ShapeDataSource()

IVtkTools_ShapeDataSource::IVtkTools_ShapeDataSource ( )
protected

Shape wrapper used as an input.

◆ ~IVtkTools_ShapeDataSource()

virtual IVtkTools_ShapeDataSource::~IVtkTools_ShapeDataSource ( )
protectedvirtual

Shape wrapper used as an input.

Member Function Documentation

◆ Contains()

Standard_Boolean IVtkTools_ShapeDataSource::Contains ( const IVtkOCC_Shape::Handle & theOccShape) const

Checks if the internal OccShape pointer is the same the argument.

Parameters
[in]shapeOccShape pointer to be checked.
Returns
true if the two OccShape instances are the same, and false otherwise.

◆ FastTransformModeOff()

void IVtkTools_ShapeDataSource::FastTransformModeOff ( )
inline

Get the source OCCT shape.

Returns
occShape OCCT shape wrapper.

◆ FastTransformModeOn()

void IVtkTools_ShapeDataSource::FastTransformModeOn ( )
inline

Get the source OCCT shape.

Returns
occShape OCCT shape wrapper.

◆ GetId()

IVtk_IdType IVtkTools_ShapeDataSource::GetId ( ) const

Checks if the internal OccShape pointer is the same the argument.

Parameters
[in]shapeOccShape pointer to be checked.
Returns
true if the two OccShape instances are the same, and false otherwise.

◆ GetShape()

const IVtkOCC_Shape::Handle & IVtkTools_ShapeDataSource::GetShape ( )
inline

Get the source OCCT shape.

Returns
occShape OCCT shape wrapper.

◆ RequestData()

virtual int IVtkTools_ShapeDataSource::RequestData ( vtkInformation * theRequest,
vtkInformationVector ** theInputVector,
vtkInformationVector * theOutputVector )
overrideprotectedvirtual

◆ SetShape()

void IVtkTools_ShapeDataSource::SetShape ( const IVtkOCC_Shape::Handle & theOccShape)

Get the source OCCT shape.

Returns
occShape OCCT shape wrapper.

◆ SubShapeIDs()

vtkSmartPointer< vtkIdTypeArray > IVtkTools_ShapeDataSource::SubShapeIDs ( )

Access to the shape's sub-shape ids array.

Returns
the array cast to vtkIdTypeArray

◆ transform()

vtkSmartPointer< vtkPolyData > IVtkTools_ShapeDataSource::transform ( vtkPolyData * theSource,
const gp_Trsf & theTrsf ) const
protected

Shape wrapper used as an input.

◆ vtkTypeMacro()

IVtkTools_ShapeDataSource::vtkTypeMacro ( IVtkTools_ShapeDataSource ,
vtkPolyDataAlgorithm  )

Field Documentation

◆ myIsFastTransformMode

Standard_Boolean IVtkTools_ShapeDataSource::myIsFastTransformMode
protected

Indicates whether light-weighted processing for transformed shapes is enabled. If so, data source does not re-compute the discrete model for the input topological shape. It rather uses the already existing one and applies the necessary transformation to it.

◆ myIsTransformOnly

Standard_Boolean IVtkTools_ShapeDataSource::myIsTransformOnly
protected

Internal flag indicating that the current working shape is just a transformed copy of the previously processed one. This flag is used in a couple with "fast transformation" mode flag.

◆ myOccShape

IVtkOCC_Shape::Handle IVtkTools_ShapeDataSource::myOccShape
protected

Shape wrapper used as an input.

◆ myPolyData

IVtkVTK_ShapeData::Handle IVtkTools_ShapeDataSource::myPolyData
protected

Polygonal representation of shape.


The documentation for this class was generated from the following file: