open_iA 2024.9
Loading...
Searching...
No Matches
iAvtkTubeFilter Class Reference

A tube filter for polylines, extending vtkTubeFilter by some options on how to vary radius. More...

#include <iAvtkTubeFilter.h>

Inheritance diagram for iAvtkTubeFilter:
[legend]
Collaboration diagram for iAvtkTubeFilter:
[legend]

Public Member Functions

std::vector< std::pair< vtkIdType, vtkIdType > > GetFinalObjectPointMap ()
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
void SetIndividualFactors (float *indivFactors)
 
 vtkTypeMacro (iAvtkTubeFilter, vtkPolyDataAlgorithm)
 
 vtkSetClampMacro (Radius, double, 0.0, VTK_DOUBLE_MAX)
 
 vtkGetMacro (Radius, double)
 
 vtkSetClampMacro (VaryRadius, int, VTK_VARY_RADIUS_OFF, VTK_VARY_RADIUS_BY_ABSOLUTE_SCALAR)
 
 vtkGetMacro (VaryRadius, int)
 
void SetVaryRadiusToVaryRadiusOff ()
 
void SetVaryRadiusToVaryRadiusByScalar ()
 
void SetVaryRadiusToVaryRadiusByVector ()
 
void SetVaryRadiusToVaryRadiusByAbsoluteScalar ()
 
const char * GetVaryRadiusAsString ()
 
 vtkSetClampMacro (NumberOfSides, int, 3, VTK_INT_MAX)
 
 vtkGetMacro (NumberOfSides, int)
 
 vtkSetMacro (RadiusFactor, double)
 
 vtkGetMacro (RadiusFactor, double)
 
 vtkSetVector3Macro (DefaultNormal, double)
 
 vtkGetVectorMacro (DefaultNormal, double, 3)
 
 vtkSetMacro (UseDefaultNormal, vtkTypeBool)
 
 vtkGetMacro (UseDefaultNormal, vtkTypeBool)
 
 vtkBooleanMacro (UseDefaultNormal, vtkTypeBool)
 
 vtkSetMacro (SidesShareVertices, vtkTypeBool)
 
 vtkGetMacro (SidesShareVertices, vtkTypeBool)
 
 vtkBooleanMacro (SidesShareVertices, vtkTypeBool)
 
 vtkSetMacro (Capping, vtkTypeBool)
 
 vtkGetMacro (Capping, vtkTypeBool)
 
 vtkBooleanMacro (Capping, vtkTypeBool)
 
 vtkSetClampMacro (OnRatio, int, 1, VTK_INT_MAX)
 
 vtkGetMacro (OnRatio, int)
 
 vtkSetClampMacro (Offset, int, 0, VTK_INT_MAX)
 
 vtkGetMacro (Offset, int)
 
 vtkSetClampMacro (GenerateTCoords, int, VTK_TCOORDS_OFF, VTK_TCOORDS_FROM_SCALARS)
 
 vtkGetMacro (GenerateTCoords, int)
 
void SetGenerateTCoordsToOff ()
 
void SetGenerateTCoordsToNormalizedLength ()
 
void SetGenerateTCoordsToUseLength ()
 
void SetGenerateTCoordsToUseScalars ()
 
const char * GetGenerateTCoordsAsString ()
 
 vtkSetClampMacro (TextureLength, double, 0.000001, VTK_INT_MAX)
 
 vtkGetMacro (TextureLength, double)
 
 vtkSetMacro (OutputPointsPrecision, int)
 
 vtkGetMacro (OutputPointsPrecision, int)
 

Static Public Member Functions

static iAvtkTubeFilterNew ()
 Construct object with radius 0.5, radius variation turned off, the number of sides set to 3, and radius factor of 10.
 

Protected Member Functions

 iAvtkTubeFilter ()
 
 ~iAvtkTubeFilter () override
 
vtkIdType ComputeOffset (vtkIdType offset, vtkIdType npts)
 
int GeneratePoints (vtkIdType offset, vtkIdType npts, vtkIdType *pts, vtkPoints *inPts, vtkPoints *newPts, vtkPointData *pd, vtkPointData *outPD, vtkFloatArray *newNormals, vtkDataArray *inScalars, double range[2], vtkDataArray *inVectors, double maxNorm, vtkDataArray *inNormals)
 maps the final object ID to (first=) the first index in the points array that belongs to this object, and (second=) the number of points
 
void GenerateStrips (vtkIdType offset, vtkIdType npts, vtkIdType *pts, vtkIdType inCellId, vtkCellData *cd, vtkCellData *outCD, vtkCellArray *newStrips)
 
void GenerateTextureCoords (vtkIdType offset, vtkIdType npts, vtkIdType *pts, vtkPoints *inPts, vtkDataArray *inScalars, vtkFloatArray *newTCoords)
 
int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
 Usual data generation method.
 

Protected Attributes

vtkTypeBool Capping
 control whether tubes are capped
 
double DefaultNormal [3]
 
int GenerateTCoords
 control texture coordinate generation
 
float * IndividualFactors
 
std::vector< std::pair< vtkIdType, vtkIdType > > m_finalObjectPointMap
 
vtkIdType NumberOfSides
 number of sides to create tube
 
int Offset
 control the generation of the sides
 
int OnRatio
 control the generation of the sides of the tube
 
int OutputPointsPrecision
 
double Radius
 minimum radius of tube
 
double RadiusFactor
 maximum allowable radius
 
vtkTypeBool SidesShareVertices
 
double TextureLength
 this length is mapped to [0,1) texture space
 
double Theta
 
vtkTypeBool UseDefaultNormal
 
int VaryRadius
 controls radius variation
 

Detailed Description

A tube filter for polylines, extending vtkTubeFilter by some options on how to vary radius.

Constructor & Destructor Documentation

◆ iAvtkTubeFilter()

iAvtkTubeFilter::iAvtkTubeFilter ( )
protected

◆ ~iAvtkTubeFilter()

iAvtkTubeFilter::~iAvtkTubeFilter ( )
inlineoverrideprotected

Member Function Documentation

◆ ComputeOffset()

vtkIdType iAvtkTubeFilter::ComputeOffset ( vtkIdType offset,
vtkIdType npts )
protected

◆ GeneratePoints()

int iAvtkTubeFilter::GeneratePoints ( vtkIdType offset,
vtkIdType npts,
vtkIdType * pts,
vtkPoints * inPts,
vtkPoints * newPts,
vtkPointData * pd,
vtkPointData * outPD,
vtkFloatArray * newNormals,
vtkDataArray * inScalars,
double range[2],
vtkDataArray * inVectors,
double maxNorm,
vtkDataArray * inNormals )
protected

maps the final object ID to (first=) the first index in the points array that belongs to this object, and (second=) the number of points

◆ GenerateStrips()

void iAvtkTubeFilter::GenerateStrips ( vtkIdType offset,
vtkIdType npts,
vtkIdType * pts,
vtkIdType inCellId,
vtkCellData * cd,
vtkCellData * outCD,
vtkCellArray * newStrips )
protected

◆ GenerateTextureCoords()

void iAvtkTubeFilter::GenerateTextureCoords ( vtkIdType offset,
vtkIdType npts,
vtkIdType * pts,
vtkPoints * inPts,
vtkDataArray * inScalars,
vtkFloatArray * newTCoords )
protected

◆ GetFinalObjectPointMap()

std::vector< std::pair< vtkIdType, vtkIdType > > iAvtkTubeFilter::GetFinalObjectPointMap ( )

◆ GetGenerateTCoordsAsString()

const char * iAvtkTubeFilter::GetGenerateTCoordsAsString ( void )

◆ GetVaryRadiusAsString()

const char * iAvtkTubeFilter::GetVaryRadiusAsString ( void )

◆ New()

static iAvtkTubeFilter * iAvtkTubeFilter::New ( )
static

Construct object with radius 0.5, radius variation turned off, the number of sides set to 3, and radius factor of 10.

◆ PrintSelf()

void iAvtkTubeFilter::PrintSelf ( ostream & os,
vtkIndent indent )
override

◆ RequestData()

int iAvtkTubeFilter::RequestData ( vtkInformation * ,
vtkInformationVector ** ,
vtkInformationVector *  )
overrideprotected

Usual data generation method.

◆ SetGenerateTCoordsToNormalizedLength()

void iAvtkTubeFilter::SetGenerateTCoordsToNormalizedLength ( )
inline

◆ SetGenerateTCoordsToOff()

void iAvtkTubeFilter::SetGenerateTCoordsToOff ( )
inline

◆ SetGenerateTCoordsToUseLength()

void iAvtkTubeFilter::SetGenerateTCoordsToUseLength ( )
inline

◆ SetGenerateTCoordsToUseScalars()

void iAvtkTubeFilter::SetGenerateTCoordsToUseScalars ( )
inline

◆ SetIndividualFactors()

void iAvtkTubeFilter::SetIndividualFactors ( float * indivFactors)

◆ SetVaryRadiusToVaryRadiusByAbsoluteScalar()

void iAvtkTubeFilter::SetVaryRadiusToVaryRadiusByAbsoluteScalar ( )
inline

◆ SetVaryRadiusToVaryRadiusByScalar()

void iAvtkTubeFilter::SetVaryRadiusToVaryRadiusByScalar ( )
inline

◆ SetVaryRadiusToVaryRadiusByVector()

void iAvtkTubeFilter::SetVaryRadiusToVaryRadiusByVector ( )
inline

◆ SetVaryRadiusToVaryRadiusOff()

void iAvtkTubeFilter::SetVaryRadiusToVaryRadiusOff ( )
inline

◆ vtkBooleanMacro() [1/3]

iAvtkTubeFilter::vtkBooleanMacro ( Capping ,
vtkTypeBool  )

◆ vtkBooleanMacro() [2/3]

iAvtkTubeFilter::vtkBooleanMacro ( SidesShareVertices ,
vtkTypeBool  )

◆ vtkBooleanMacro() [3/3]

iAvtkTubeFilter::vtkBooleanMacro ( UseDefaultNormal ,
vtkTypeBool  )

◆ vtkGetMacro() [1/12]

iAvtkTubeFilter::vtkGetMacro ( Capping ,
vtkTypeBool  )

◆ vtkGetMacro() [2/12]

iAvtkTubeFilter::vtkGetMacro ( GenerateTCoords ,
int  )

◆ vtkGetMacro() [3/12]

iAvtkTubeFilter::vtkGetMacro ( NumberOfSides ,
int  )

◆ vtkGetMacro() [4/12]

iAvtkTubeFilter::vtkGetMacro ( Offset ,
int  )

◆ vtkGetMacro() [5/12]

iAvtkTubeFilter::vtkGetMacro ( OnRatio ,
int  )

◆ vtkGetMacro() [6/12]

iAvtkTubeFilter::vtkGetMacro ( OutputPointsPrecision ,
int  )

◆ vtkGetMacro() [7/12]

iAvtkTubeFilter::vtkGetMacro ( Radius ,
double  )

◆ vtkGetMacro() [8/12]

iAvtkTubeFilter::vtkGetMacro ( RadiusFactor ,
double  )

◆ vtkGetMacro() [9/12]

iAvtkTubeFilter::vtkGetMacro ( SidesShareVertices ,
vtkTypeBool  )

◆ vtkGetMacro() [10/12]

iAvtkTubeFilter::vtkGetMacro ( TextureLength ,
double  )

◆ vtkGetMacro() [11/12]

iAvtkTubeFilter::vtkGetMacro ( UseDefaultNormal ,
vtkTypeBool  )

◆ vtkGetMacro() [12/12]

iAvtkTubeFilter::vtkGetMacro ( VaryRadius ,
int  )

◆ vtkGetVectorMacro()

iAvtkTubeFilter::vtkGetVectorMacro ( DefaultNormal ,
double ,
3  )

◆ vtkSetClampMacro() [1/7]

iAvtkTubeFilter::vtkSetClampMacro ( GenerateTCoords ,
int ,
VTK_TCOORDS_OFF ,
VTK_TCOORDS_FROM_SCALARS  )

Control whether and how texture coordinates are produced. This is useful for striping the tube with length textures, etc. If you use scalars to create the texture, the scalars are assumed to be monotonically increasing (or decreasing).

◆ vtkSetClampMacro() [2/7]

iAvtkTubeFilter::vtkSetClampMacro ( NumberOfSides ,
int ,
3 ,
VTK_INT_MAX  )

Set the number of sides for the tube. At a minimum, number of sides is 3.

◆ vtkSetClampMacro() [3/7]

iAvtkTubeFilter::vtkSetClampMacro ( Offset ,
int ,
0 ,
VTK_INT_MAX  )

Control the striping of the tubes. The offset sets the first tube side that is visible. Offset is generally used with OnRatio to create nifty striping effects.

◆ vtkSetClampMacro() [4/7]

iAvtkTubeFilter::vtkSetClampMacro ( OnRatio ,
int ,
1 ,
VTK_INT_MAX  )

Control the striping of the tubes. If OnRatio is greater than 1, then every nth tube side is turned on, beginning with the Offset side.

◆ vtkSetClampMacro() [5/7]

iAvtkTubeFilter::vtkSetClampMacro ( Radius ,
double ,
0. 0,
VTK_DOUBLE_MAX  )

Set the minimum tube radius (minimum because the tube radius may vary).

◆ vtkSetClampMacro() [6/7]

iAvtkTubeFilter::vtkSetClampMacro ( TextureLength ,
double ,
0. 000001,
VTK_INT_MAX  )

Control the conversion of units during the texture coordinates calculation. The TextureLength indicates what length (whether calculated from scalars or length) is mapped to the [0,1) texture space.

◆ vtkSetClampMacro() [7/7]

iAvtkTubeFilter::vtkSetClampMacro ( VaryRadius ,
int ,
VTK_VARY_RADIUS_OFF ,
VTK_VARY_RADIUS_BY_ABSOLUTE_SCALAR  )

Turn on/off the variation of tube radius with scalar value.

◆ vtkSetMacro() [1/5]

iAvtkTubeFilter::vtkSetMacro ( Capping ,
vtkTypeBool  )

Turn on/off whether to cap the ends with polygons. Initial value is off.

◆ vtkSetMacro() [2/5]

iAvtkTubeFilter::vtkSetMacro ( OutputPointsPrecision ,
int  )

Set/get the desired precision for the output types. See the documentation for the vtkAlgorithm::DesiredOutputPrecision enum for an explanation of the available precision settings.

◆ vtkSetMacro() [3/5]

iAvtkTubeFilter::vtkSetMacro ( RadiusFactor ,
double  )

Set the maximum tube radius in terms of a multiple of the minimum radius.

◆ vtkSetMacro() [4/5]

iAvtkTubeFilter::vtkSetMacro ( SidesShareVertices ,
vtkTypeBool  )

Set a boolean to control whether tube sides should share vertices. This creates independent strips, with constant normals so the tube is always faceted in appearance.

◆ vtkSetMacro() [5/5]

iAvtkTubeFilter::vtkSetMacro ( UseDefaultNormal ,
vtkTypeBool  )

Set a boolean to control whether to use default normals. DefaultNormalOn is set.

◆ vtkSetVector3Macro()

iAvtkTubeFilter::vtkSetVector3Macro ( DefaultNormal ,
double  )

Set the default normal to use if no normals are supplied, and the DefaultNormalOn is set.

◆ vtkTypeMacro()

iAvtkTubeFilter::vtkTypeMacro ( iAvtkTubeFilter ,
vtkPolyDataAlgorithm  )

Member Data Documentation

◆ Capping

vtkTypeBool iAvtkTubeFilter::Capping
protected

control whether tubes are capped

◆ DefaultNormal

double iAvtkTubeFilter::DefaultNormal[3]
protected

◆ GenerateTCoords

int iAvtkTubeFilter::GenerateTCoords
protected

control texture coordinate generation

◆ IndividualFactors

float* iAvtkTubeFilter::IndividualFactors
protected

◆ m_finalObjectPointMap

std::vector<std::pair<vtkIdType, vtkIdType> > iAvtkTubeFilter::m_finalObjectPointMap
protected

◆ NumberOfSides

vtkIdType iAvtkTubeFilter::NumberOfSides
protected

number of sides to create tube

◆ Offset

int iAvtkTubeFilter::Offset
protected

control the generation of the sides

◆ OnRatio

int iAvtkTubeFilter::OnRatio
protected

control the generation of the sides of the tube

◆ OutputPointsPrecision

int iAvtkTubeFilter::OutputPointsPrecision
protected

◆ Radius

double iAvtkTubeFilter::Radius
protected

minimum radius of tube

◆ RadiusFactor

double iAvtkTubeFilter::RadiusFactor
protected

maximum allowable radius

◆ SidesShareVertices

vtkTypeBool iAvtkTubeFilter::SidesShareVertices
protected

◆ TextureLength

double iAvtkTubeFilter::TextureLength
protected

this length is mapped to [0,1) texture space

◆ Theta

double iAvtkTubeFilter::Theta
protected

◆ UseDefaultNormal

vtkTypeBool iAvtkTubeFilter::UseDefaultNormal
protected

◆ VaryRadius

int iAvtkTubeFilter::VaryRadius
protected

controls radius variation


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