Added class documentation to the Raycast class.

This commit is contained in:
David Williams
2011-01-31 21:37:33 +00:00
parent 1fed1c161a
commit 96cdf7b9a5
2 changed files with 71 additions and 1 deletions

View File

@ -22,6 +22,14 @@ freely, subject to the following restrictions:
*******************************************************************************/
namespace PolyVox
{
////////////////////////////////////////////////////////////////////////////////
/// Builds a Raycast object.
/// \param volData A pointer to the volume through which the ray will be cast.
/// \param v3dStart The starting position of the ray.
/// \param v3dDirection The direction of the ray. The length of this vector also
/// represents the length of the ray.
/// \param result An instance of RaycastResult in which the result will be stored.
////////////////////////////////////////////////////////////////////////////////
template <typename VoxelType>
Raycast<VoxelType>::Raycast(Volume<VoxelType>* volData, const Vector3DFloat& v3dStart, const Vector3DFloat& v3dDirection, RaycastResult& result)
:m_volData(volData)
@ -32,18 +40,28 @@ namespace PolyVox
{
}
////////////////////////////////////////////////////////////////////////////////
/// \param v3dStart The starting position of the ray.
////////////////////////////////////////////////////////////////////////////////
template <typename VoxelType>
void Raycast<VoxelType>::setStart(const Vector3DFloat& v3dStart)
{
m_v3dStart = v3dStart;
}
////////////////////////////////////////////////////////////////////////////////
/// \param v3dDirection The direction of the ray. The length of this vector also
/// represents the length of the ray.
////////////////////////////////////////////////////////////////////////////////
template <typename VoxelType>
void Raycast<VoxelType>::setDirection(const Vector3DFloat& v3dDirection)
{
m_v3dDirection = v3dDirection;
}
////////////////////////////////////////////////////////////////////////////////
/// The result is stored in the RaycastResult instance which was passed to the constructor.
////////////////////////////////////////////////////////////////////////////////
template <typename VoxelType>
void Raycast<VoxelType>::execute(void)
{