VTK  9.6.1
vtkVoxel.h File Reference
#include "vtkCell3D.h"
#include "vtkCommonDataModelModule.h"
Include dependency graph for vtkVoxel.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  vtkVoxel
 a cell that represents a 3D orthogonal parallelepiped More...

Functions

vtkVoxel vtkCell3D GetEdgeToAdjacentFacesArray (vtkIdType edgeId)
 Static method version of GetEdgeToAdjacentFaces.
static vtkVoxelNew ()
static vtkTypeBool IsTypeOf (const char *type)
virtual vtkTypeBool IsA (const char *type)
static vtkVoxelSafeDownCast (vtkObjectBase *o)
virtual vtkObjectBaseNewInstanceInternal () const
vtkVoxelNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent) override
double ComputeBoundingSphere (double center[3]) const override
 Computes exact bounding sphere of this voxel.
int Inflate (double dist) override
 Inflates voxel by moving every faces by dist.
static void InterpolationDerivs (const double pcoords[3], double derivs[24])
static void InterpolationFunctions (const double pcoords[3], double weights[8])
 Compute the interpolation functions.
static int * GetTriangleCases (int caseId)
 Return the case table for table-based isocontouring (aka marching cubes style implementations).
static const vtkIdTypeGetFaceToAdjacentFacesArray (vtkIdType faceId)
 Static method version of GetFaceToAdjacentFaces.
static const vtkIdTypeGetPointToIncidentEdgesArray (vtkIdType pointId)
 Static method version of GetPointToIncidentEdgesArray.
static const vtkIdTypeGetPointToIncidentFacesArray (vtkIdType pointId)
 Static method version of GetPointToIncidentFacesArray.
static const vtkIdTypeGetPointToOneRingPointsArray (vtkIdType pointId)
 Static method version of GetPointToOneRingPoints.
static bool ComputeCentroid (vtkPoints *points, const vtkIdType *pointIds, double centroid[3])
 Static method version of GetCentroid.
 vtkVoxel ()
 ~vtkVoxel () override
void GetEdgePoints (vtkIdType edgeId, const vtkIdType *&pts) override
 See vtkCell3D API for description of these methods.
vtkIdType GetFacePoints (vtkIdType faceId, const vtkIdType *&pts) override
 See vtkCell3D API for description of these methods.
void GetEdgeToAdjacentFaces (vtkIdType edgeId, const vtkIdType *&pts) override
 See vtkCell3D API for description of these methods.
vtkIdType GetFaceToAdjacentFaces (vtkIdType faceId, const vtkIdType *&faces) override
 See vtkCell3D API for description of these methods.
vtkIdType GetPointToIncidentEdges (vtkIdType pointId, const vtkIdType *&edges) override
 See vtkCell3D API for description of these methods.
vtkIdType GetPointToIncidentFaces (vtkIdType pointId, const vtkIdType *&faces) override
 See vtkCell3D API for description of these methods.
vtkIdType GetPointToOneRingPoints (vtkIdType pointId, const vtkIdType *&pts) override
 See vtkCell3D API for description of these methods.
double * GetParametricCoords () override
 See vtkCell3D API for description of these methods.
bool GetCentroid (double centroid[3]) const override
 See vtkCell3D API for description of these methods.
bool IsInsideOut () override
 See vtkCell3D API for description of these methods.
int GetCellType () override
 See the vtkCell API for descriptions of these methods.
int GetCellDimension () override
 See the vtkCell API for descriptions of these methods.
int GetNumberOfEdges () override
 See the vtkCell API for descriptions of these methods.
int GetNumberOfFaces () override
 See the vtkCell API for descriptions of these methods.
vtkCellGetEdge (int edgeId) override
 See the vtkCell API for descriptions of these methods.
vtkCellGetFace (int faceId) override
 See the vtkCell API for descriptions of these methods.
int CellBoundary (int subId, const double pcoords[3], vtkIdList *pts) override
 See the vtkCell API for descriptions of these methods.
void Contour (double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *verts, vtkCellArray *lines, vtkCellArray *polys, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd) override
 See the vtkCell API for descriptions of these methods.
int EvaluatePosition (const double x[3], double closestPoint[3], int &subId, double pcoords[3], double &dist2, double weights[]) override
 See the vtkCell API for descriptions of these methods.
void EvaluateLocation (int &subId, const double pcoords[3], double x[3], double *weights) override
 See the vtkCell API for descriptions of these methods.
int IntersectWithLine (const double p1[3], const double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId) override
 Return intersection point (if any) of finite line with cells contained in cell locator.
int TriangulateLocalIds (int index, vtkIdList *ptIds) override
 See the vtkCell API for descriptions of these methods.
void Derivatives (int subId, const double pcoords[3], const double *values, int dim, double *derivs) override
 See the vtkCell API for descriptions of these methods.
void InterpolateFunctions (const double pcoords[3], double weights[8]) override
 Compute the interpolation functions/derivatives (aka shape functions/derivatives).
void InterpolateDerivs (const double pcoords[3], double derivs[24]) override
 Compute the interpolation functions/derivatives (aka shape functions/derivatives).

Variables

static constexpr vtkIdType NumberOfPoints = 8
 static constexpr handle on the number of points.
static constexpr vtkIdType NumberOfEdges = 12
 static contexpr handle on the number of faces.
static constexpr vtkIdType NumberOfFaces = 6
 static contexpr handle on the number of edges.
static constexpr vtkIdType MaximumFaceSize = 4
 static contexpr handle on the maximum face size.
static constexpr vtkIdType MaximumValence = 3
 static constexpr handle on the maximum valence of this cell.

Function Documentation

◆ GetEdgeToAdjacentFacesArray()

vtkVoxel vtkCell3D GetEdgeToAdjacentFacesArray ( vtkIdType edgeId)

Static method version of GetEdgeToAdjacentFaces.

◆ New()

vtkVoxel * GetEdgeToAdjacentFacesArray::New ( )
static

◆ IsTypeOf()

vtkTypeBool GetEdgeToAdjacentFacesArray::IsTypeOf ( const char * type)
static

◆ IsA()

virtual vtkTypeBool GetEdgeToAdjacentFacesArray::IsA ( const char * type)
virtual

◆ SafeDownCast()

vtkVoxel * GetEdgeToAdjacentFacesArray::SafeDownCast ( vtkObjectBase * o)
static

◆ NewInstanceInternal()

virtual vtkObjectBase * GetEdgeToAdjacentFacesArray::NewInstanceInternal ( ) const
protectedvirtual

◆ NewInstance()

vtkVoxel * GetEdgeToAdjacentFacesArray::NewInstance ( ) const

◆ PrintSelf()

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

◆ GetEdgePoints()

void GetEdgeToAdjacentFacesArray::GetEdgePoints ( vtkIdType edgeId,
const vtkIdType *& pts )
override

See vtkCell3D API for description of these methods.

Warning
Face points of vtkVoxel are not sorted properly. {pts[0], pts[1], pts[3], pts[2]} forms consecutive points of one face.

◆ GetFacePoints()

vtkIdType GetEdgeToAdjacentFacesArray::GetFacePoints ( vtkIdType faceId,
const vtkIdType *& pts )
override

See vtkCell3D API for description of these methods.

Warning
Face points of vtkVoxel are not sorted properly. {pts[0], pts[1], pts[3], pts[2]} forms consecutive points of one face.

◆ GetEdgeToAdjacentFaces()

void GetEdgeToAdjacentFacesArray::GetEdgeToAdjacentFaces ( vtkIdType edgeId,
const vtkIdType *& pts )
override

See vtkCell3D API for description of these methods.

Warning
Face points of vtkVoxel are not sorted properly. {pts[0], pts[1], pts[3], pts[2]} forms consecutive points of one face.

◆ GetFaceToAdjacentFaces()

vtkIdType GetEdgeToAdjacentFacesArray::GetFaceToAdjacentFaces ( vtkIdType faceId,
const vtkIdType *& faces )
override

See vtkCell3D API for description of these methods.

Warning
Face points of vtkVoxel are not sorted properly. {pts[0], pts[1], pts[3], pts[2]} forms consecutive points of one face.

◆ GetPointToIncidentEdges()

vtkIdType GetEdgeToAdjacentFacesArray::GetPointToIncidentEdges ( vtkIdType pointId,
const vtkIdType *& edges )
override

See vtkCell3D API for description of these methods.

Warning
Face points of vtkVoxel are not sorted properly. {pts[0], pts[1], pts[3], pts[2]} forms consecutive points of one face.

◆ GetPointToIncidentFaces()

vtkIdType GetEdgeToAdjacentFacesArray::GetPointToIncidentFaces ( vtkIdType pointId,
const vtkIdType *& faces )
override

See vtkCell3D API for description of these methods.

Warning
Face points of vtkVoxel are not sorted properly. {pts[0], pts[1], pts[3], pts[2]} forms consecutive points of one face.

◆ GetPointToOneRingPoints()

vtkIdType GetEdgeToAdjacentFacesArray::GetPointToOneRingPoints ( vtkIdType pointId,
const vtkIdType *& pts )
override

See vtkCell3D API for description of these methods.

Warning
Face points of vtkVoxel are not sorted properly. {pts[0], pts[1], pts[3], pts[2]} forms consecutive points of one face.

◆ GetParametricCoords()

double * GetEdgeToAdjacentFacesArray::GetParametricCoords ( )
override

See vtkCell3D API for description of these methods.

Warning
Face points of vtkVoxel are not sorted properly. {pts[0], pts[1], pts[3], pts[2]} forms consecutive points of one face.

◆ GetCentroid()

bool GetEdgeToAdjacentFacesArray::GetCentroid ( double centroid[3]) const
override

See vtkCell3D API for description of these methods.

Warning
Face points of vtkVoxel are not sorted properly. {pts[0], pts[1], pts[3], pts[2]} forms consecutive points of one face.

◆ IsInsideOut()

bool GetEdgeToAdjacentFacesArray::IsInsideOut ( )
override

See vtkCell3D API for description of these methods.

Warning
Face points of vtkVoxel are not sorted properly. {pts[0], pts[1], pts[3], pts[2]} forms consecutive points of one face.

◆ ComputeBoundingSphere()

double GetEdgeToAdjacentFacesArray::ComputeBoundingSphere ( double center[3]) const
override

Computes exact bounding sphere of this voxel.

◆ GetCellType()

int GetEdgeToAdjacentFacesArray::GetCellType ( )
override

See the vtkCell API for descriptions of these methods.

Definition at line 60 of file vtkVoxel.h.

◆ GetCellDimension()

int GetEdgeToAdjacentFacesArray::GetCellDimension ( )
override

See the vtkCell API for descriptions of these methods.

Definition at line 61 of file vtkVoxel.h.

◆ GetNumberOfEdges()

int GetEdgeToAdjacentFacesArray::GetNumberOfEdges ( )
override

See the vtkCell API for descriptions of these methods.

Definition at line 62 of file vtkVoxel.h.

◆ GetNumberOfFaces()

int GetEdgeToAdjacentFacesArray::GetNumberOfFaces ( )
override

See the vtkCell API for descriptions of these methods.

Definition at line 63 of file vtkVoxel.h.

◆ GetEdge()

vtkCell * GetEdgeToAdjacentFacesArray::GetEdge ( int edgeId)
override

See the vtkCell API for descriptions of these methods.

◆ GetFace()

vtkCell * GetEdgeToAdjacentFacesArray::GetFace ( int faceId)
override

See the vtkCell API for descriptions of these methods.

◆ CellBoundary()

int GetEdgeToAdjacentFacesArray::CellBoundary ( int subId,
const double pcoords[3],
vtkIdList * pts )
override

See the vtkCell API for descriptions of these methods.

◆ Contour()

void GetEdgeToAdjacentFacesArray::Contour ( double value,
vtkDataArray * cellScalars,
vtkIncrementalPointLocator * locator,
vtkCellArray * verts,
vtkCellArray * lines,
vtkCellArray * polys,
vtkPointData * inPd,
vtkPointData * outPd,
vtkCellData * inCd,
vtkIdType cellId,
vtkCellData * outCd )
override

See the vtkCell API for descriptions of these methods.

◆ EvaluatePosition()

int GetEdgeToAdjacentFacesArray::EvaluatePosition ( const double x[3],
double closestPoint[3],
int & subId,
double pcoords[3],
double & dist2,
double weights[] )
override

See the vtkCell API for descriptions of these methods.

◆ EvaluateLocation()

void GetEdgeToAdjacentFacesArray::EvaluateLocation ( int & subId,
const double pcoords[3],
double x[3],
double * weights )
override

See the vtkCell API for descriptions of these methods.

◆ IntersectWithLine()

int GetEdgeToAdjacentFacesArray::IntersectWithLine ( const double p1[3],
const double p2[3],
double tol,
double & t,
double x[3],
double pcoords[3],
int & subId )
override

Return intersection point (if any) of finite line with cells contained in cell locator.

Line-edge intersection.

See vtkCell.h parameters documentation.

THIS FUNCTION IS NOT THREAD SAFE.

◆ TriangulateLocalIds()

int GetEdgeToAdjacentFacesArray::TriangulateLocalIds ( int index,
vtkIdList * ptIds )
override

See the vtkCell API for descriptions of these methods.

◆ Derivatives()

void GetEdgeToAdjacentFacesArray::Derivatives ( int subId,
const double pcoords[3],
const double * values,
int dim,
double * derivs )
override

See the vtkCell API for descriptions of these methods.

◆ Inflate()

int GetEdgeToAdjacentFacesArray::Inflate ( double dist)
override

Inflates voxel by moving every faces by dist.

Since normals are not ambiguous for degenerate voxels, degenerate voxels are inflated correctly. For example, inflating a voxel collapsed to a single point will produce a voxel of width 2 * dist.

Returns
1

◆ InterpolationDerivs()

void GetEdgeToAdjacentFacesArray::InterpolationDerivs ( const double pcoords[3],
double derivs[24] )
static

◆ InterpolateFunctions()

void GetEdgeToAdjacentFacesArray::InterpolateFunctions ( const double pcoords[3],
double weights[8] )
override

Compute the interpolation functions/derivatives (aka shape functions/derivatives).

Definition at line 96 of file vtkVoxel.h.

◆ InterpolateDerivs()

void GetEdgeToAdjacentFacesArray::InterpolateDerivs ( const double pcoords[3],
double derivs[24] )
override

Compute the interpolation functions/derivatives (aka shape functions/derivatives).

Definition at line 100 of file vtkVoxel.h.

◆ InterpolationFunctions()

void GetEdgeToAdjacentFacesArray::InterpolationFunctions ( const double pcoords[3],
double weights[8] )
static

Compute the interpolation functions.

This static method is for convenience. Use the member function if you already have an instance of a voxel.

◆ GetTriangleCases()

int * GetEdgeToAdjacentFacesArray::GetTriangleCases ( int caseId)
static

Return the case table for table-based isocontouring (aka marching cubes style implementations).

A linear 3D cell with N vertices will have 2**N cases. The returned case array lists three edges in order to produce one output triangle which may be repeated to generate multiple triangles. The list of cases terminates with a -1 entry.

◆ GetFaceToAdjacentFacesArray()

const vtkIdType * GetFaceToAdjacentFacesArray ( vtkIdType faceId)
static

Static method version of GetFaceToAdjacentFaces.

◆ GetPointToIncidentEdgesArray()

const vtkIdType * GetPointToIncidentEdgesArray ( vtkIdType pointId)
static

Static method version of GetPointToIncidentEdgesArray.

◆ GetPointToIncidentFacesArray()

const vtkIdType * GetPointToIncidentFacesArray ( vtkIdType pointId)
static

Static method version of GetPointToIncidentFacesArray.

◆ GetPointToOneRingPointsArray()

const vtkIdType * GetPointToOneRingPointsArray ( vtkIdType pointId)
static

Static method version of GetPointToOneRingPoints.

◆ ComputeCentroid()

bool ComputeCentroid ( vtkPoints * points,
const vtkIdType * pointIds,
double centroid[3] )
static

Static method version of GetCentroid.

◆ vtkVoxel()

vtkVoxel ( )
protected

◆ ~vtkVoxel()

~vtkVoxel ( )
overrideprotected

Variable Documentation

◆ NumberOfPoints

vtkIdType NumberOfPoints = 8
staticconstexpr

static constexpr handle on the number of points.

Definition at line 31 of file vtkVoxel.h.

◆ NumberOfEdges

vtkIdType NumberOfEdges = 12
staticconstexpr

static contexpr handle on the number of faces.

Definition at line 36 of file vtkVoxel.h.

◆ NumberOfFaces

vtkIdType NumberOfFaces = 6
staticconstexpr

static contexpr handle on the number of edges.

Definition at line 41 of file vtkVoxel.h.

◆ MaximumFaceSize

vtkIdType MaximumFaceSize = 4
staticconstexpr

static contexpr handle on the maximum face size.

It can also be used to know the number of faces adjacent to one face.

Definition at line 47 of file vtkVoxel.h.

◆ MaximumValence

vtkIdType MaximumValence = 3
staticconstexpr

static constexpr handle on the maximum valence of this cell.

The valence of a vertex is the number of incident edges (or equivalently faces) to this vertex. It is also equal to the size of a one ring neighborhood of a vertex.

Definition at line 54 of file vtkVoxel.h.