diff --git a/include/PolyVox/PagedVolume.h b/include/PolyVox/PagedVolume.h index acc65302..d8f5669e 100644 --- a/include/PolyVox/PagedVolume.h +++ b/include/PolyVox/PagedVolume.h @@ -43,7 +43,7 @@ namespace PolyVox { /// This class provide a volume implementation which avoids storing all the data in memory at all times. Instead it breaks the volume /// down into a set of chunks and moves these into and out of memory on demand. This means it is much more memory efficient than the - /// RaVolume, but may also be slower and is more complicated We encourage uses to work with RawVolume initially, and then switch to + /// RawVolume, but may also be slower and is more complicated We encourage uses to work with RawVolume initially, and then switch to /// PagedVolume once they have a larger application and/or a better understanding of PolyVox. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// diff --git a/include/PolyVox/RawVolume.h b/include/PolyVox/RawVolume.h index 81a675ab..fd7a5c43 100644 --- a/include/PolyVox/RawVolume.h +++ b/include/PolyVox/RawVolume.h @@ -36,6 +36,12 @@ namespace PolyVox { + /** + * Simple volume implementation which stores data in a single large 3D array. + * + * This class is less memory-efficient than the PagedVolume, but it is the simplest possible + * volume implementation which makes it useful for debugging and getting started with PolyVox. + */ template class RawVolume : public BaseVolume { diff --git a/include/PolyVox/Raycast.h b/include/PolyVox/Raycast.h index cc4daa8a..e5120462 100644 --- a/include/PolyVox/Raycast.h +++ b/include/PolyVox/Raycast.h @@ -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 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 diff --git a/include/PolyVox/Vertex.h b/include/PolyVox/Vertex.h index f8919d7b..1fbf65fb 100644 --- a/include/PolyVox/Vertex.h +++ b/include/PolyVox/Vertex.h @@ -34,6 +34,11 @@ namespace PolyVox { + /** + * Represents a vertex in a mesh and includes position and normal information. + * There is also a 'data' member, which usually stores the (possibly interpolated) + * value of the voxel(s) which caused the vertex to be generated. + */ template struct Vertex { diff --git a/include/PolyVox/VolumeResampler.h b/include/PolyVox/VolumeResampler.h index 693185c1..57110550 100644 --- a/include/PolyVox/VolumeResampler.h +++ b/include/PolyVox/VolumeResampler.h @@ -29,6 +29,10 @@ namespace PolyVox { + /** + * This class can be used to copy data from one volume to another, possibly while + * resizing it. It has not been heavily used an may or may not work as expected. + */ template< typename SrcVolumeType, typename DstVolumeType> class VolumeResampler {