Documentation changes.
This commit is contained in:
@ -51,13 +51,10 @@ namespace PolyVox
|
||||
/// picking, visibility checks, lighting calculations, or numerous other applications.
|
||||
///
|
||||
/// A ray is a stright line in space define by a start point and a direction vector.
|
||||
/// The length of the direction vector represents the length of the ray. When you call a
|
||||
/// Raycast object's execute() method it will iterate over each voxel which lies on the ray,
|
||||
/// The length of the direction vector represents the length of the ray. When you
|
||||
/// execute a raycast it will iterate over each voxel which lies on the ray,
|
||||
/// starting from the defined start point. It will examine each voxel and terminate
|
||||
/// either when it encounters a solid voxel or when it reaches the end of the ray. If a
|
||||
/// solid voxel is encountered then its position is stored in the intersectionVoxel field
|
||||
/// of the RaycastResult structure and the intersectionFound flag is set to true, otherwise
|
||||
/// the intersectionFound flag is set to false.
|
||||
/// either when it encounters a solid voxel or when it reaches the end of the ray.
|
||||
///
|
||||
/// **Important Note:** These has been confusion in the past with people not realising
|
||||
/// that the length of the direction vector is important. Most graphics API can provide
|
||||
@ -67,29 +64,14 @@ namespace PolyVox
|
||||
/// you must scale the direction vector so that it's length represents the maximum distance
|
||||
/// over which you want the ray to be cast.
|
||||
///
|
||||
/// The following code snippet shows how the class is used:
|
||||
/// \code
|
||||
/// Vector3DFloat start(rayOrigin.x(), rayOrigin.y(), rayOrigin.z());
|
||||
/// Vector3DFloat direction(rayDir.x(), rayDir.y(), rayDir.z());
|
||||
/// direction.normalise();
|
||||
/// direction *= 1000.0f; //Casts ray of length 1000
|
||||
///
|
||||
/// RaycastResult raycastResult;
|
||||
/// Raycast<Material8> raycast(m_pPolyVoxVolume, start, direction, raycastResult);
|
||||
/// raycast.execute();
|
||||
///
|
||||
/// if(raycastResult.foundIntersection)
|
||||
/// {
|
||||
/// //...
|
||||
/// }
|
||||
/// \endcode
|
||||
///
|
||||
/// Some further notes, the Raycast uses full 26-connectivity, which basically means it
|
||||
/// will examine every voxel the ray touches, even if it just passes through the corner.
|
||||
/// Also, it peforms a simple binary test against a voxel's threshold, rather than making
|
||||
/// use of it's density. Therefore it will work best in conjunction with one of the 'cubic'
|
||||
/// surace extractors. It's behaviour with the Marching Cubes surface extractor has not
|
||||
/// been tested yet.
|
||||
///
|
||||
/// Note that we also have a pickVoxel() function which provides a slightly higher-level interface.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template<typename VolumeType, typename Callback>
|
||||
|
Reference in New Issue
Block a user