Made it more obvious that the length of a raycast direction vector is important.

This commit is contained in:
unknown
2012-01-27 10:01:44 +01:00
parent d2cd3e7c62
commit 01af6b938a
4 changed files with 27 additions and 18 deletions

View File

@@ -33,12 +33,12 @@ namespace PolyVox
{
public:
///Constructor
RaycastWithCallback(VolumeType<VoxelType>* volData, const Vector3DFloat& v3dStart, const Vector3DFloat& v3dDirection, polyvox_function<bool(const Vector3DInt32& position)> funcCallback);
RaycastWithCallback(VolumeType<VoxelType>* volData, const Vector3DFloat& v3dStart, const Vector3DFloat& v3dDirectionAndLength, polyvox_function<bool(const Vector3DInt32& position)> funcCallback);
///Sets the start position for the ray.
void setStart(const Vector3DFloat& v3dStart);
///Set the direction for the ray.
void setDirection(const Vector3DFloat& v3dDirection);
void setDirection(const Vector3DFloat& v3dDirectionAndLength);
///Performs the raycast.
void execute();
@@ -52,7 +52,7 @@ namespace PolyVox
typename VolumeType<VoxelType>::Sampler m_sampVolume;
Vector3DFloat m_v3dStart;
Vector3DFloat m_v3dDirection;
Vector3DFloat m_v3dDirectionAndLength;
float m_fMaxDistance;
};
}