Add a new pickVoxel function.
Hopefully this pickVoxel function will fulfil most most need with raycasting which aren't covered by the existing raycast functions. It's essentially a wrapper around the current functions, using a custom functor to store the position of a solid voxel as well as the previous empty voxel. It doesn't require the user to provide a functor of their own, just the value that they've assigned to empty voxels. As well as the function itself, we also have a unit test as well as it being built in the bindings.
This commit is contained in:
@ -89,6 +89,10 @@ ADD_TEST(MaterialTestCompile ${LATEST_TEST} testCompile)
|
||||
CREATE_TEST(TestRaycast.h TestRaycast.cpp TestRaycast)
|
||||
ADD_TEST(RaycastExecuteTest ${LATEST_TEST} testExecute)
|
||||
|
||||
# Picking tests
|
||||
CREATE_TEST(TestPicking.h TestPicking.cpp TestPicking)
|
||||
ADD_TEST(PickingExecuteTest ${LATEST_TEST} testExecute)
|
||||
|
||||
# Region tests
|
||||
CREATE_TEST(TestRegion.h TestRegion.cpp TestRegion)
|
||||
ADD_TEST(RegionEqualityTest ${LATEST_TEST} testEquality)
|
||||
|
Reference in New Issue
Block a user