OpenWalnut  1.5.0dev
Public Member Functions | Private Attributes | List of all members
WBresenhamDBLTest Class Reference

Unit tests the Bresenham algorithm. More...

#include <WBresenhamDBL_test.h>

+ Inheritance diagram for WBresenhamDBLTest:
+ Collaboration diagram for WBresenhamDBLTest:

Public Member Functions

void setUp (void)
 Creates a member variable with a WBresenham instance which you may use for testing. More...
 
void tearDown (void)
 Clean up after each test. More...
 
void testLineSegementWithSameStartAndEndPoint (void)
 If a line segments starts and ends on the same point only its voxel should be selected. More...
 
void testPolySegmentOneVoxelRastering (void)
 Multiple segments in one voxel should also mark only this voxel. More...
 
void testPolyLineRastering (void)
 Lines like WFibers consisting out of multiple line segements should be traced segment by segment. More...
 
void testSymmetry (void)
 If you have a line from A to B then rastering it from B to should be equivalent. More...
 
void testExactLineIsNotRasteredTheSameWayAsMidpointLines (void)
 Rasterization of exact lines must not match rasteriation of midpoint lines. More...
 

Private Attributes

std::shared_ptr< WBresenhamDBLm_algo
 test instace of the WBresenham algo More...
 

Detailed Description

Unit tests the Bresenham algorithm.

Definition at line 39 of file WBresenhamDBL_test.h.

Member Function Documentation

◆ setUp()

void WBresenhamDBLTest::setUp ( void  )
inline

Creates a member variable with a WBresenham instance which you may use for testing.

Definition at line 46 of file WBresenhamDBL_test.h.

References m_algo, and WLogger::startup().

+ Here is the call graph for this function:

◆ tearDown()

void WBresenhamDBLTest::tearDown ( void  )
inline

Clean up after each test.

Definition at line 57 of file WBresenhamDBL_test.h.

References m_algo.

◆ testExactLineIsNotRasteredTheSameWayAsMidpointLines()

void WBresenhamDBLTest::testExactLineIsNotRasteredTheSameWayAsMidpointLines ( void  )
inline

Rasterization of exact lines must not match rasteriation of midpoint lines.

Definition at line 161 of file WBresenhamDBL_test.h.

References wlimits::DBL_EPS, m_algo, and WMixinVector< ValueT >::push_back().

+ Here is the call graph for this function:

◆ testLineSegementWithSameStartAndEndPoint()

void WBresenhamDBLTest::testLineSegementWithSameStartAndEndPoint ( void  )
inline

If a line segments starts and ends on the same point only its voxel should be selected.

Definition at line 66 of file WBresenhamDBL_test.h.

References m_algo, and WMixinVector< ValueT >::push_back().

+ Here is the call graph for this function:

◆ testPolyLineRastering()

void WBresenhamDBLTest::testPolyLineRastering ( void  )
inline

Lines like WFibers consisting out of multiple line segements should be traced segment by segment.

Definition at line 96 of file WBresenhamDBL_test.h.

References m_algo, and WMixinVector< ValueT >::push_back().

+ Here is the call graph for this function:

◆ testPolySegmentOneVoxelRastering()

void WBresenhamDBLTest::testPolySegmentOneVoxelRastering ( void  )
inline

Multiple segments in one voxel should also mark only this voxel.

Definition at line 80 of file WBresenhamDBL_test.h.

References m_algo, and WMixinVector< ValueT >::push_back().

+ Here is the call graph for this function:

◆ testSymmetry()

void WBresenhamDBLTest::testSymmetry ( void  )
inline

If you have a line from A to B then rastering it from B to should be equivalent.

Definition at line 137 of file WBresenhamDBL_test.h.

References WMixinVector< ValueT >::clear(), m_algo, and WMixinVector< ValueT >::push_back().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_algo

std::shared_ptr< WBresenhamDBL > WBresenhamDBLTest::m_algo
private

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