SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkConeFrustum Class Reference

Generate a polygonal approximation to a cone frustum. More...

#include <vtkConeFrustum.h>

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

Public Types

enum  OutputPorts {
  SideFace = 0, BottomFace, TopFace, Axis,
  BottomEdge, TopEdge, BottomVertex, TopVertex,
  NumberOfOutputs
}
 An enum indexing data present at each output. More...
 
typedef vtkPolyDataAlgorithm Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkConeFrustumNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
 vtkConeFrustum (const vtkConeFrustum &)=delete
 
vtkConeFrustumoperator= (const vtkConeFrustum &)=delete
 
virtual void SetBottomRadius (double)
 Set/get the radius at the bottom of the cone. More...
 
virtual double GetBottomRadius ()
 
virtual void SetTopRadius (double)
 Set/get the radius at the top of the cone. More...
 
virtual double GetTopRadius ()
 
virtual void SetBottomPoint (double, double, double)
 Set/get the bottom point of the cone. More...
 
virtual void SetBottomPoint (double[3])
 
virtual double * GetBottomPoint ()
 
virtual void GetBottomPoint (double data[3])
 
virtual void SetTopPoint (double, double, double)
 Set/get the top point of the cone. More...
 
virtual void SetTopPoint (double[3])
 
virtual double * GetTopPoint ()
 
virtual void GetTopPoint (double data[3])
 
virtual void SetResolution (int)
 Set/get the number of facets used to represent the conical side-face. More...
 
virtual int GetResolution ()
 
virtual void SetOutputPointsPrecision (int)
 Set/get the desired precision for the output points. More...
 
virtual int GetOutputPointsPrecision ()
 
double GetAngle () const
 Return the angle (in degrees) between the cone axis and the cone surface. More...
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkConeFrustumSafeDownCast (vtkObjectBase *o)
 
static vtkConeFrustumNew ()
 Construct with default parameters.
 

Protected Member Functions

virtual vtkObjectBase * NewInstanceInternal () const
 
 vtkConeFrustum (int res=16)
 
int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
 

Protected Attributes

double BottomPoint [3]
 
double BottomRadius { 0.5 }
 
double TopPoint [3]
 
double TopRadius { 0.0 }
 
int Resolution
 
int OutputPointsPrecision { SINGLE_PRECISION }
 

Detailed Description

Generate a polygonal approximation to a cone frustum.

vtkConeFrustum creates a cone whose axis lies between 2 given points with the specified radius at each point. By default, point 1 (the bottom) lies at the origin with radius 0.5 and point 2 (the top) lies at (0,0,1) with radius 0. The resolution specifies the number of points around the top and bottom circles; it must be at least 3 and defaults to 16.

Note that unlike many other source filters, this one is not intended for use as an input to a glyph filter or glyph mapper. Instead, its purpose is to provide a high-quality visual representation of a right cone frustum. That means it uses more points and cells than is strictly necessary but is able to provide a better visual quality as a result. The result is (more or less) topologically correct even when the apex of the cone is included; many points will be coincident, but will be connected into a consistent manifold that is homeomorphic to a sphere.

Member Enumeration Documentation

◆ OutputPorts

An enum indexing data present at each output.

Enumerator
SideFace 

Triangulation of the conical face.

BottomFace 

Triangulation of the bottom endcap.

TopFace 

Triangulation of the top endcap.

Axis 

Line from the bottom to to the top center-point.

BottomEdge 

Polyline of the bottom endcap feature edge.

TopEdge 

Polyline of the top endcap feature edge.

BottomVertex 

A single vertex at the center of the bottom face.

TopVertex 

A single vertex at the center of the top face.

Member Function Documentation

◆ GetAngle()

double vtkConeFrustum::GetAngle ( ) const

Return the angle (in degrees) between the cone axis and the cone surface.

This should always return a value in [0,90[. For cylinders, this will return 0.

◆ SetBottomPoint()

virtual void vtkConeFrustum::SetBottomPoint ( double  ,
double  ,
double   
)
virtual

Set/get the bottom point of the cone.

The default is 0,0,0.

◆ SetBottomRadius()

virtual void vtkConeFrustum::SetBottomRadius ( double  )
virtual

Set/get the radius at the bottom of the cone.

It must be non-negative. It may be 0, but not when the TopRadius is also 0.

◆ SetOutputPointsPrecision()

virtual void vtkConeFrustum::SetOutputPointsPrecision ( int  )
virtual

Set/get the desired precision for the output points.

vtkAlgorithm::SINGLE_PRECISION - Output single-precision floating point. vtkAlgorithm::DOUBLE_PRECISION - Output double-precision floating point.

◆ SetResolution()

virtual void vtkConeFrustum::SetResolution ( int  )
virtual

Set/get the number of facets used to represent the conical side-face.

This defaults to 16 and has a minimum of 3.

◆ SetTopPoint()

virtual void vtkConeFrustum::SetTopPoint ( double  ,
double  ,
double   
)
virtual

Set/get the top point of the cone.

The default is 0,0,0.

◆ SetTopRadius()

virtual void vtkConeFrustum::SetTopRadius ( double  )
virtual

Set/get the radius at the top of the cone.

It must be non-negative. It may be 0, but not when the BottomRadius is also 0.


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