Luanti 5.16.0-dev
Loading...
Searching...
No Matches
TestVoxelAlgorithms Class Reference
Inheritance diagram for TestVoxelAlgorithms:
Collaboration diagram for TestVoxelAlgorithms:

Public Member Functions

 TestVoxelAlgorithms ()
const char * getName ()
void runTests (IGameDef *gamedef)
void testVoxelLineIterator ()
void testLighting (IGameDef *gamedef)
Public Member Functions inherited from TestBase
bool testModule (IGameDef *gamedef)
std::string getTestTempDirectory ()
std::string getTestTempFile ()
void runTest (const char *name, std::function< void()> &&test)

Additional Inherited Members

Public Attributes inherited from TestBase
u32 num_tests_failed
u32 num_tests_run

Constructor & Destructor Documentation

◆ TestVoxelAlgorithms()

TestVoxelAlgorithms::TestVoxelAlgorithms ( )
inline

References TestManager::registerTestModule().

Here is the call graph for this function:

Member Function Documentation

◆ getName()

const char * TestVoxelAlgorithms::getName ( )
inlinevirtual

Implements TestBase.

◆ runTests()

void TestVoxelAlgorithms::runTests ( IGameDef * gamedef)
virtual

Implements TestBase.

References TEST, testLighting(), and testVoxelLineIterator().

Here is the call graph for this function:

◆ testLighting()

void TestVoxelAlgorithms::testLighting ( IGameDef * gamedef)

References Map::addNodeAndUpdate(), voxalgo::blit_back_with_light(), CONTENT_AIR, MapNode::getLight(), NodeDefManager::getLightingFlags(), Map::getNode(), getNodeBlockPos(), MapNode::getParam1(), VoxelArea::getVolume(), MMVManip::initialEmerge(), LIGHTBANK_DAY, LIGHTBANK_NIGHT, VoxelManipulator::m_area, VoxelManipulator::m_data, IGameDef::ndef(), VoxelManipulator::setNodeNoEmerge(), t_CONTENT_STONE, t_CONTENT_TORCH, t_CONTENT_WATER, UASSERTEQ, x, y, and z.

Referenced by runTests().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ testVoxelLineIterator()

void TestVoxelAlgorithms::testVoxelLineIterator ( )

References floatToInt(), voxalgo::VoxelLineIterator::hasNext(), intToFloat(), voxalgo::VoxelLineIterator::m_current_node_pos, voxalgo::VoxelLineIterator::next(), UASSERT, UASSERTEQ, x, y, and z.

Referenced by runTests().

Here is the call graph for this function:
Here is the caller graph for this function:

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