Removed template template parameters from RaycastWithCallback.
This commit is contained in:
parent
5958887387
commit
8c02098088
@ -28,12 +28,12 @@ freely, subject to the following restrictions:
|
|||||||
|
|
||||||
namespace PolyVox
|
namespace PolyVox
|
||||||
{
|
{
|
||||||
template< template<typename> class VolumeType, typename VoxelType>
|
template<typename VolumeType>
|
||||||
class RaycastWithCallback
|
class RaycastWithCallback
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
///Constructor
|
///Constructor
|
||||||
RaycastWithCallback(VolumeType<VoxelType>* volData, const Vector3DFloat& v3dStart, const Vector3DFloat& v3dDirectionAndLength, polyvox_function<bool(const Vector3DInt32& position)> funcCallback);
|
RaycastWithCallback(VolumeType* volData, const Vector3DFloat& v3dStart, const Vector3DFloat& v3dDirectionAndLength, polyvox_function<bool(const Vector3DInt32& position)> funcCallback);
|
||||||
|
|
||||||
///Sets the start position for the ray.
|
///Sets the start position for the ray.
|
||||||
void setStart(const Vector3DFloat& v3dStart);
|
void setStart(const Vector3DFloat& v3dStart);
|
||||||
@ -48,8 +48,8 @@ namespace PolyVox
|
|||||||
|
|
||||||
void doRaycast(float x1, float y1, float z1, float x2, float y2, float z2);
|
void doRaycast(float x1, float y1, float z1, float x2, float y2, float z2);
|
||||||
|
|
||||||
VolumeType<VoxelType>* m_volData;
|
VolumeType* m_volData;
|
||||||
typename VolumeType<VoxelType>::Sampler m_sampVolume;
|
typename VolumeType::Sampler m_sampVolume;
|
||||||
|
|
||||||
Vector3DFloat m_v3dStart;
|
Vector3DFloat m_v3dStart;
|
||||||
Vector3DFloat m_v3dDirectionAndLength;
|
Vector3DFloat m_v3dDirectionAndLength;
|
||||||
|
@ -23,8 +23,8 @@ freely, subject to the following restrictions:
|
|||||||
|
|
||||||
namespace PolyVox
|
namespace PolyVox
|
||||||
{
|
{
|
||||||
template< template<typename> class VolumeType, typename VoxelType>
|
template<typename VolumeType>
|
||||||
RaycastWithCallback<VolumeType, VoxelType>::RaycastWithCallback(VolumeType<VoxelType>* volData, const Vector3DFloat& v3dStart, const Vector3DFloat& v3dDirectionAndLength, polyvox_function<bool(const Vector3DInt32& position)> funcCallback)
|
RaycastWithCallback<VolumeType>::RaycastWithCallback(VolumeType* volData, const Vector3DFloat& v3dStart, const Vector3DFloat& v3dDirectionAndLength, polyvox_function<bool(const Vector3DInt32& position)> funcCallback)
|
||||||
:m_volData(volData)
|
:m_volData(volData)
|
||||||
,m_sampVolume(volData)
|
,m_sampVolume(volData)
|
||||||
,m_v3dStart(v3dStart)
|
,m_v3dStart(v3dStart)
|
||||||
@ -36,20 +36,20 @@ namespace PolyVox
|
|||||||
assert(m_funcCallback);
|
assert(m_funcCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
template< template<typename> class VolumeType, typename VoxelType>
|
template<typename VolumeType>
|
||||||
void RaycastWithCallback<VolumeType, VoxelType>::setStart(const Vector3DFloat& v3dStart)
|
void RaycastWithCallback<VolumeType>::setStart(const Vector3DFloat& v3dStart)
|
||||||
{
|
{
|
||||||
m_v3dStart = v3dStart;
|
m_v3dStart = v3dStart;
|
||||||
}
|
}
|
||||||
|
|
||||||
template< template<typename> class VolumeType, typename VoxelType>
|
template<typename VolumeType>
|
||||||
void RaycastWithCallback<VolumeType, VoxelType>::setDirection(const Vector3DFloat& v3dDirectionAndLength)
|
void RaycastWithCallback<VolumeType>::setDirection(const Vector3DFloat& v3dDirectionAndLength)
|
||||||
{
|
{
|
||||||
m_v3dDirectionAndLength = v3dDirectionAndLength;
|
m_v3dDirectionAndLength = v3dDirectionAndLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
template< template<typename> class VolumeType, typename VoxelType>
|
template<typename VolumeType>
|
||||||
void RaycastWithCallback<VolumeType, VoxelType>::execute(void)
|
void RaycastWithCallback<VolumeType>::execute(void)
|
||||||
{
|
{
|
||||||
//The doRaycast function is assuming that it is iterating over the areas defined between
|
//The doRaycast function is assuming that it is iterating over the areas defined between
|
||||||
//voxels. We actually want to define the areas as being centered on voxels (as this is
|
//voxels. We actually want to define the areas as being centered on voxels (as this is
|
||||||
@ -92,8 +92,8 @@ namespace PolyVox
|
|||||||
// It should simply read "if (ty <= tz)".
|
// It should simply read "if (ty <= tz)".
|
||||||
//
|
//
|
||||||
// This error was reported by Joey Hammer (PixelActive).
|
// This error was reported by Joey Hammer (PixelActive).
|
||||||
template< template<typename> class VolumeType, typename VoxelType>
|
template<typename VolumeType>
|
||||||
void RaycastWithCallback<VolumeType, VoxelType>::doRaycast(float x1, float y1, float z1, float x2, float y2, float z2)
|
void RaycastWithCallback<VolumeType>::doRaycast(float x1, float y1, float z1, float x2, float y2, float z2)
|
||||||
{
|
{
|
||||||
int i = (int)floorf(x1);
|
int i = (int)floorf(x1);
|
||||||
int j = (int)floorf(y1);
|
int j = (int)floorf(y1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user