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

Implicit function for a frustum. More...

#include <ImplicitFunction.h>

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

Public Member Functions

 Frustum ()=default
 Construct axis-aligned frustum with center at (0,0,0) and each side of length 1.0. More...
 
 Frustum (const Vector points[6], const Vector normals[6])
 Construct a frustum defined with 6 planes of the given points and normals. More...
 
 Frustum (const Vector points[8])
 Construct a frustum defined by the 8 points of the bounding hexahedron. More...
 
void SetPlanes (const Vector points[6], const Vector normals[6])
 Specifies the 6 planes of the frustum. More...
 
void SetPlane (int idx, const Vector &point, const Vector &normal)
 Set one of the 6 planes of the frustum. More...
 
void GetPlanes (Vector points[6], Vector normals[6]) const
 Specifies the 6 planes of the frustum. More...
 
const Vector * GetPoints () const
 
const Vector * GetNormals () const
 
void CreateFromPoints (const Vector points[8])
 Specifies the frustum as the 8 points of the bounding hexahedron. 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 Points [6]
 
Vector Normals [6]
 

Detailed Description

Implicit function for a frustum.

Constructor & Destructor Documentation

◆ Frustum() [1/3]

vtkm::Frustum::Frustum ( )
default

Construct axis-aligned frustum with center at (0,0,0) and each side of length 1.0.

◆ Frustum() [2/3]

vtkm::Frustum::Frustum ( const Vector  points[6],
const Vector  normals[6] 
)
inline

Construct a frustum defined with 6 planes of the given points and normals.

◆ Frustum() [3/3]

vtkm::Frustum::Frustum ( const Vector  points[8])
inlineexplicit

Construct a frustum defined by the 8 points of the bounding hexahedron.

The points should be specified in the order of hex-cell vertices

Member Function Documentation

◆ CreateFromPoints()

void vtkm::Frustum::CreateFromPoints ( const Vector  points[8])
inline

Specifies the frustum as the 8 points of the bounding hexahedron.

The points should be specified in the order of hex-cell vertices

◆ GetNormals()

const Vector* vtkm::Frustum::GetNormals ( ) const
inline

◆ GetPlanes()

void vtkm::Frustum::GetPlanes ( Vector  points[6],
Vector  normals[6] 
) const
inline

Specifies the 6 planes of the frustum.

◆ GetPoints()

const Vector* vtkm::Frustum::GetPoints ( ) const
inline

◆ Gradient()

Vector vtkm::Frustum::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.

◆ SetPlane()

void vtkm::Frustum::SetPlane ( int  idx,
const Vector &  point,
const Vector &  normal 
)
inline

Set one of the 6 planes of the frustum.

◆ SetPlanes()

void vtkm::Frustum::SetPlanes ( const Vector  points[6],
const Vector  normals[6] 
)
inline

Specifies the 6 planes of the frustum.

◆ Value()

Scalar vtkm::Frustum::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

◆ Normals

Vector vtkm::Frustum::Normals[6]
private
Initial value:
= { { -1.0f, 0.0f, 0.0f }, { 1.0f, 0.0f, 0.0f }, { 0.0f, -1.0f, 0.0f },
{ 0.0f, 1.0f, 0.0f }, { 0.0f, 0.0f, -1.0f }, { 0.0f, 0.0f, 1.0f } }

◆ Points

Vector vtkm::Frustum::Points[6]
private
Initial value:
= { { -0.5f, 0.0f, 0.0f }, { 0.5f, 0.0f, 0.0f }, { 0.0f, -0.5f, 0.0f },
{ 0.0f, 0.5f, 0.0f }, { 0.0f, 0.0f, -0.5f }, { 0.0f, 0.0f, 0.5f } }

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