# Visualization
TKV3d
Voxel

# Voxel_FastConverter Class Reference

Converts a shape to voxel representation.
It does it fast, but with less precision.
Also, it doesn't fill-in volumic part of the shape.
.

`#include <Voxel_FastConverter.hxx>`

## Public Member Functions

void * | operator new (size_t, void *anAddress)
void * | operator new (size_t size)
void | operator delete (void *anAddress)
Standard_EXPORT | Voxel_FastConverter (const TopoDS_Shape &shape, Voxel_BoolDS &voxels, const Standard_Real delfection=0.1, const Standard_Integer nbx=10, const Standard_Integer nby=10, const Standard_Integer nbz=10, const Standard_Integer nbthreads=1)
| A constructor for conversion of a shape into a cube of boolean voxels. It allocates the voxels in memory. "nbthreads" defines the number of threads used to convert the shape. .
Standard_EXPORT | Voxel_FastConverter (const TopoDS_Shape &shape, Voxel_ColorDS &voxels, const Standard_Real delfection=0.1, const Standard_Integer nbx=10, const Standard_Integer nby=10, const Standard_Integer nbz=10, const Standard_Integer nbthreads=1)
| A constructor for conversion of a shape into a cube of colored voxels. It allocates the voxels in memory. "nbthreads" defines the number of threads used to convert the shape. .
Standard_EXPORT Standard_Boolean | Convert (Standard_Integer &progress, const Standard_Integer ithread=1)
| Converts a shape into a voxel representation. It sets to 0 the outside volume of the shape and 1 for surfacic part of the shape. "ithread" is the index of the thread for current call of ::Convert(). Start numeration of "ithread" with 1, please. .
Standard_EXPORT Standard_Boolean | FillInVolume (const Standard_Byte inner, const Standard_Integer ithread=1)
| Fills-in volume of the shape by a value. .
Standard_EXPORT void | Destroy ()
| A destructor. .
| ~Voxel_FastConverter ()

## Private Member Functions

Standard_EXPORT void | Init ()
Standard_EXPORT void | GetBndBox (const gp_Pnt &p1, const gp_Pnt &p2, const gp_Pnt &p3, Standard_Real &xmin, Standard_Real &ymin, Standard_Real &zmin, Standard_Real &xmax, Standard_Real &ymax, Standard_Real &zmax) const
Standard_EXPORT void | ComputeVoxelsNearTriangle (const gp_Pln &plane, const gp_Pnt &p1, const gp_Pnt &p2, const gp_Pnt &p3, const Standard_Real hdiag, const Standard_Integer ixmin, const Standard_Integer iymin, const Standard_Integer izmin, const Standard_Integer ixmax, const Standard_Integer iymax, const Standard_Integer izmax) const

## Private Attributes

TopoDS_Shape | myShape
Standard_Address | myVoxels
Standard_Real | myDeflection
Standard_Boolean | myIsBool
Standard_Integer | myNbX
Standard_Integer | myNbY
Standard_Integer | myNbZ
Standard_Integer | myNbThreads
Standard_Integer | myNbTriangles

## Constructor & Destructor Documentation

Standard_EXPORT Voxel_FastConverter::Voxel_FastConverter | ( | const TopoDS_Shape & | shape,
|  | Voxel_BoolDS & | voxels,
|  | const Standard_Real | delfection = `0.1`,
|  | const Standard_Integer | nbx = `10`,
|  | const Standard_Integer | nby = `10`,
|  | const Standard_Integer | nbz = `10`,
|  | const Standard_Integer | nbthreads = `1`
| ) |

Standard_EXPORT Voxel_FastConverter::Voxel_FastConverter | ( | const TopoDS_Shape & | shape,
|  | Voxel_ColorDS & | voxels,
|  | const Standard_Real | delfection = `0.1`,
|  | const Standard_Integer | nbx = `10`,
|  | const Standard_Integer | nby = `10`,
|  | const Standard_Integer | nbz = `10`,
|  | const Standard_Integer | nbthreads = `1`
| ) |

Voxel_FastConverter::~Voxel_FastConverter | ( |  | ) | `[inline]`

## Member Function Documentation

Standard_EXPORT void Voxel_FastConverter::ComputeVoxelsNearTriangle | ( | const gp_Pln & | plane,
|  | const gp_Pnt & | p1,
|  | const gp_Pnt & | p2,
|  | const gp_Pnt & | p3,
|  | const Standard_Real | hdiag,
|  | const Standard_Integer | ixmin,
|  | const Standard_Integer | iymin,
|  | const Standard_Integer | izmin,
|  | const Standard_Integer | ixmax,
|  | const Standard_Integer | iymax,
|  | const Standard_Integer | izmax
| ) | const`[private]`

Standard_EXPORT Standard_Boolean Voxel_FastConverter::Convert | ( | Standard_Integer & | progress,
|  | const Standard_Integer | ithread = `1`
| ) |

Standard_EXPORT void Voxel_FastConverter::Destroy | ( |  | ) |

Standard_EXPORT Standard_Boolean Voxel_FastConverter::FillInVolume | ( | const Standard_Byte | inner,
|  | const Standard_Integer | ithread = `1`
| ) |

Standard_EXPORT void Voxel_FastConverter::GetBndBox | ( | const gp_Pnt & | p1,
|  | const gp_Pnt & | p2,
|  | const gp_Pnt & | p3,
|  | Standard_Real & | xmin,
|  | Standard_Real & | ymin,
|  | Standard_Real & | zmin,
|  | Standard_Real & | xmax,
|  | Standard_Real & | ymax,
|  | Standard_Real & | zmax
| ) | const`[private]`

Standard_EXPORT void Voxel_FastConverter::Init | ( |  | ) | `[private]`

void Voxel_FastConverter::operator delete | ( | void * | anAddress | ) | `[inline]`

void* Voxel_FastConverter::operator new | ( | size_t | size | ) | `[inline]`

void* Voxel_FastConverter::operator new | ( | size_t | ,
|  | void * | anAddress
| ) | `[inline]`

## Field Documentation

Standard_Real Voxel_FastConverter::myDeflection `[private]`

Standard_Boolean Voxel_FastConverter::myIsBool `[private]`

Standard_Integer Voxel_FastConverter::myNbThreads `[private]`

Standard_Integer Voxel_FastConverter::myNbTriangles `[private]`

Standard_Integer Voxel_FastConverter::myNbX `[private]`

Standard_Integer Voxel_FastConverter::myNbY `[private]`

Standard_Integer Voxel_FastConverter::myNbZ `[private]`

TopoDS_Shape Voxel_FastConverter::myShape `[private]`

Standard_Address Voxel_FastConverter::myVoxels `[private]`

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

- Voxel_FastConverter.hxx