![]() |
OpenWalnut
1.5.0dev
|
This is a modified version the Bresenham algorithm. More...
#include <WBresenhamDBL.h>
Inheritance diagram for WBresenhamDBL:
Collaboration diagram for WBresenhamDBL:Public Member Functions | |
| WBresenhamDBL (std::shared_ptr< WGridRegular3D > grid, bool antialiased=true) | |
| Initializes new raster algo. More... | |
| virtual | ~WBresenhamDBL () |
| Finishes this raster algo. More... | |
Public Member Functions inherited from WBresenham | |
| WBresenham (std::shared_ptr< WGridRegular3D > grid, bool antialiased=true) | |
| Initializes new raster algo. More... | |
| virtual | ~WBresenham () |
| Finishes this raster algo. More... | |
| virtual void | raster (const WLine &line) |
| Rasterize the given line into the grid of dataset. More... | |
Public Member Functions inherited from WRasterAlgorithm | |
| WRasterAlgorithm (std::shared_ptr< WGridRegular3D > grid) | |
| Creates new raster algorithm within the given grid. More... | |
| virtual | ~WRasterAlgorithm () |
| Dispose a this raster algorithm. More... | |
| std::shared_ptr< WDataSetScalar > | generateDataSet () const |
| Computes a dataset out of our voxel values and the previously given grid. More... | |
| void | addParameterizationAlgorithm (std::shared_ptr< WRasterParameterization > algorithm) |
| This method allows the user of the raster algorithm to add arbitrary parameterizations. More... | |
| virtual void | finished () |
| Called whenever all lines have been rasterized. More... | |
Protected Member Functions | |
| void | rasterSegment (const WPosition &start, const WPosition &stop) |
| Scans a line segment for voxels which are hit. More... | |
Protected Member Functions inherited from WBresenham | |
| virtual void | markVoxel (const WVector3i &voxel, const int axis, const WPosition &start, const WPosition &end) |
| Marks the given voxel as a hit. More... | |
| virtual double | filter (const double distance) const |
| Returns the value to mark the hit voxels with, depending on their distance to the line. More... | |
| std::vector< double > | computeDistances (const size_t voxelNum, const WPosition &start, const WPosition &end) const |
| Computes the distances for a voxel to the real line segment and also for its supporting voxels. More... | |
| double | composeValue (double newValue, double existingValue) const |
| Compose the new value for a voxel out of a new computed value and the already existing marking. More... | |
Protected Member Functions inherited from WRasterAlgorithm | |
| virtual void | parameterizeVoxel (const WVector3i &voxel, size_t voxelIdx, const int axis, const double value, const WPosition &start, const WPosition &end) |
| This method allows all registered parameterization algorithms to update. More... | |
| virtual void | newLine (const WLine &line) |
| Distribute a new line getting rasterized to all parameterize algorithms. More... | |
| virtual void | newSegment (const WPosition &start, const WPosition &end) |
| Distribute a new segment of a line to all parameterization algorithms. More... | |
Friends | |
| class | WBresenhamDBLTest |
| Only UnitTests may be friends. More... | |
Additional Inherited Members | |
Protected Attributes inherited from WBresenham | |
| bool | m_antialiased |
| If true also some supporting voxels are marked. More... | |
Protected Attributes inherited from WRasterAlgorithm | |
| std::vector< std::shared_ptr< WRasterParameterization > > | m_parameterizations |
| All the parameterization algorithms to apply while rasterizing a line. More... | |
| std::shared_mutex | m_parameterizationsLock |
| The mutex used to lock access to m_parameterizations. More... | |
| std::shared_ptr< WGridRegular3D > | m_grid |
| The grid is used for the following purposes: More... | |
| std::vector< double > | m_values |
| Stores the value of each voxel. More... | |
This is a modified version the Bresenham algorithm.
Definition at line 39 of file WBresenhamDBL.h.
| WBresenhamDBL::WBresenhamDBL | ( | std::shared_ptr< WGridRegular3D > | grid, |
| bool | antialiased = true |
||
| ) |
Initializes new raster algo.
| grid | The grid which defines the voxels which should be marked. |
| antialiased | If true then all voxels of a line are supported with anti-aliasing voxels around |
Definition at line 33 of file WBresenhamDBL.cpp.
|
virtual |
Finishes this raster algo.
Definition at line 38 of file WBresenhamDBL.cpp.
|
protectedvirtual |
Scans a line segment for voxels which are hit.
| start | Start point of the line segment |
| stop | End point of the line segment |
Reimplemented from WBresenham.
Definition at line 42 of file WBresenhamDBL.cpp.
References WRasterAlgorithm::m_grid, and WBresenham::markVoxel().
Here is the call graph for this function:
|
friend |
Only UnitTests may be friends.
Definition at line 44 of file WBresenhamDBL.h.