Open CASCADE Technology  6.9.0
Public Member Functions

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. More...

#include <Voxel_FastConverter.hxx>

Public Member Functions

 Voxel_FastConverter (const TopoDS_Shape &shape, Voxel_BoolDS &voxels, const Standard_Real deflection=0.1, const Standard_Integer nbx=10, const Standard_Integer nby=10, const Standard_Integer nbz=10, const Standard_Integer nbthreads=1, const Standard_Boolean useExistingTriangulation=Standard_False)
 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. More...
 
 Voxel_FastConverter (const TopoDS_Shape &shape, Voxel_ColorDS &voxels, const Standard_Real deflection=0.1, const Standard_Integer nbx=10, const Standard_Integer nby=10, const Standard_Integer nbz=10, const Standard_Integer nbthreads=1, const Standard_Boolean useExistingTriangulation=Standard_False)
 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. More...
 
 Voxel_FastConverter (const TopoDS_Shape &shape, Voxel_ROctBoolDS &voxels, const Standard_Real deflection=0.1, const Standard_Integer nbx=10, const Standard_Integer nby=10, const Standard_Integer nbz=10, const Standard_Integer nbthreads=1, const Standard_Boolean useExistingTriangulation=Standard_False)
 A constructor for conversion of a shape into a cube of boolean voxels split into 8 sub-voxels recursively. It allocates the voxels in memory. "nbthreads" defines the number of threads used to convert the shape. More...
 
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. More...
 
Standard_Boolean ConvertUsingSAT (Standard_Integer &progress, const Standard_Integer ithread=1)
 Converts a shape into a voxel representation using separating axis theorem. 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. More...
 
Standard_Boolean FillInVolume (const Standard_Byte inner, const Standard_Integer ithread=1)
 Fills-in volume of the shape by a value. More...
 
Standard_Boolean FillInVolume (const Standard_Byte inner, const TopoDS_Shape &shape, const Standard_Integer ithread=1)
 Fills-in volume of the shape by a value. Uses the topological information from the provided shape to judge whether points are inside the shape or not (only when processing vertical faces). The inner value has to be positive. More...
 
void Destroy ()
 A destructor. More...
 
 ~Voxel_FastConverter ()
 

Detailed Description

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.

Constructor & Destructor Documentation

Voxel_FastConverter::Voxel_FastConverter ( const TopoDS_Shape shape,
Voxel_BoolDS voxels,
const Standard_Real  deflection = 0.1,
const Standard_Integer  nbx = 10,
const Standard_Integer  nby = 10,
const Standard_Integer  nbz = 10,
const Standard_Integer  nbthreads = 1,
const Standard_Boolean  useExistingTriangulation = Standard_False 
)

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.

Voxel_FastConverter::Voxel_FastConverter ( const TopoDS_Shape shape,
Voxel_ColorDS voxels,
const Standard_Real  deflection = 0.1,
const Standard_Integer  nbx = 10,
const Standard_Integer  nby = 10,
const Standard_Integer  nbz = 10,
const Standard_Integer  nbthreads = 1,
const Standard_Boolean  useExistingTriangulation = Standard_False 
)

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.

Voxel_FastConverter::Voxel_FastConverter ( const TopoDS_Shape shape,
Voxel_ROctBoolDS voxels,
const Standard_Real  deflection = 0.1,
const Standard_Integer  nbx = 10,
const Standard_Integer  nby = 10,
const Standard_Integer  nbz = 10,
const Standard_Integer  nbthreads = 1,
const Standard_Boolean  useExistingTriangulation = Standard_False 
)

A constructor for conversion of a shape into a cube of boolean voxels split into 8 sub-voxels recursively. It allocates the voxels in memory. "nbthreads" defines the number of threads used to convert the shape.

Voxel_FastConverter::~Voxel_FastConverter ( )
inline

Member Function Documentation

Standard_Boolean Voxel_FastConverter::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_Boolean Voxel_FastConverter::ConvertUsingSAT ( Standard_Integer progress,
const Standard_Integer  ithread = 1 
)

Converts a shape into a voxel representation using separating axis theorem. 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.

void Voxel_FastConverter::Destroy ( )

A destructor.

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

Fills-in volume of the shape by a value.

Standard_Boolean Voxel_FastConverter::FillInVolume ( const Standard_Byte  inner,
const TopoDS_Shape shape,
const Standard_Integer  ithread = 1 
)

Fills-in volume of the shape by a value. Uses the topological information from the provided shape to judge whether points are inside the shape or not (only when processing vertical faces). The inner value has to be positive.


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