Add a default constructor to PickResult to avoid brittle instatiation.

This commit is contained in:
Matt Williams 2013-05-09 20:56:10 +01:00
parent f98959f92a
commit 22a6714875
2 changed files with 2 additions and 1 deletions

View File

@ -33,6 +33,7 @@ namespace PolyVox
*/ */
struct PickResult struct PickResult
{ {
PickResult() : didHit(false) {}
bool didHit; ///< Did the picking operation hit anything bool didHit; ///< Did the picking operation hit anything
Vector3DInt32 hitVoxel; ///< The location of the solid voxel it hit Vector3DInt32 hitVoxel; ///< The location of the solid voxel it hit
Vector3DInt32 previousVoxel; ///< The location of the voxel before the one it hit Vector3DInt32 previousVoxel; ///< The location of the voxel before the one it hit

View File

@ -42,7 +42,7 @@ namespace PolyVox
public: public:
RaycastPickingFunctor(const typename VolumeType::VoxelType& emptyVoxelExample) RaycastPickingFunctor(const typename VolumeType::VoxelType& emptyVoxelExample)
:m_emptyVoxelExample(emptyVoxelExample) :m_emptyVoxelExample(emptyVoxelExample)
,m_result{false} ,m_result()
{ {
} }