VTK-m  2.2
Public Member Functions | Private Attributes | List of all members
vtkm::Cylinder Class Reference

Implicit function for a cylinder. More...

#include <ImplicitFunction.h>

Inheritance diagram for vtkm::Cylinder:
vtkm::cont::ExecutionAndControlObjectBase vtkm::cont::ExecutionObjectBase

Public Member Functions

 Cylinder ()
 Construct cylinder radius of 0.5; centered at origin with axis along y coordinate axis. More...
 
 Cylinder (const Vector &axis, Scalar radius)
 Construct a cylinder with the given axis and radius. More...
 
 Cylinder (const Vector &center, const Vector &axis, Scalar radius)
 Construct a cylinder at the given center, axis, and radius. More...
 
void SetCenter (const Vector &center)
 Specify the center of the cylinder. More...
 
void SetAxis (const Vector &axis)
 Specify the direction of the axis of the cylinder. More...
 
void SetRadius (Scalar radius)
 Specify the radius of the cylinder. More...
 
Scalar Value (const Vector &point) const
 Evaluate the value of the implicit function. More...
 
Vector Gradient (const Vector &point) const
 Evaluate the gradient of the implicit function. More...
 

Private Attributes

Vector Center
 
Vector Axis
 
Scalar Radius
 

Detailed Description

Implicit function for a cylinder.

Cylinder computes the implicit function and function gradient for a cylinder using F(r)=r^2-Radius^2. By default the Cylinder is centered at the origin and the axis of rotation is along the y-axis. You can redefine the center and axis of rotation by setting the Center and Axis data members.

Note that the cylinder is infinite in extent.

Constructor & Destructor Documentation

◆ Cylinder() [1/3]

vtkm::Cylinder::Cylinder ( )
inline

Construct cylinder radius of 0.5; centered at origin with axis along y coordinate axis.

◆ Cylinder() [2/3]

vtkm::Cylinder::Cylinder ( const Vector &  axis,
Scalar  radius 
)
inline

Construct a cylinder with the given axis and radius.

The cylinder is centered at the origin.

◆ Cylinder() [3/3]

vtkm::Cylinder::Cylinder ( const Vector &  center,
const Vector &  axis,
Scalar  radius 
)
inline

Construct a cylinder at the given center, axis, and radius.

Member Function Documentation

◆ Gradient()

Vector vtkm::Cylinder::Gradient ( const Vector &  point) const
inline

Evaluate the gradient of the implicit function.

The Gradient() method for an implicit function takes a vtkm::Vec3f and returns a vtkm::Vec3f representing the pointing direction from the implicit function's shape. Gradient calculations are more object shape specific. It is advised to look at the individual shape implementations for specific implicit functions.

◆ SetAxis()

void vtkm::Cylinder::SetAxis ( const Vector &  axis)
inline

Specify the direction of the axis of the cylinder.

◆ SetCenter()

void vtkm::Cylinder::SetCenter ( const Vector &  center)
inline

Specify the center of the cylinder.

The axis of the cylinder goes through the center.

◆ SetRadius()

void vtkm::Cylinder::SetRadius ( Scalar  radius)
inline

Specify the radius of the cylinder.

◆ Value()

Scalar vtkm::Cylinder::Value ( const Vector &  point) const
inline

Evaluate the value of the implicit function.

The Value() method for an implicit function takes a vtkm::Vec3f and returns a vtkm::FloatDefault representing the orientation of the point with respect to the implicit function's shape. Negative scalar values represent vector points inside of the implicit function's shape. Positive scalar values represent vector points outside the implicit function's shape. Zero values represent vector points that lie on the surface of the implicit function.

Member Data Documentation

◆ Axis

Vector vtkm::Cylinder::Axis
private

◆ Center

Vector vtkm::Cylinder::Center
private

◆ Radius

Scalar vtkm::Cylinder::Radius
private

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