Documentation changes.
This commit is contained in:
parent
e433a697cb
commit
0fe41fe28c
@ -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
|
/// 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
|
/// 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.
|
/// PagedVolume once they have a larger application and/or a better understanding of PolyVox.
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
///
|
///
|
||||||
|
@ -36,6 +36,12 @@
|
|||||||
|
|
||||||
namespace PolyVox
|
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 <typename VoxelType>
|
template <typename VoxelType>
|
||||||
class RawVolume : public BaseVolume<VoxelType>
|
class RawVolume : public BaseVolume<VoxelType>
|
||||||
{
|
{
|
||||||
|
@ -51,13 +51,10 @@ namespace PolyVox
|
|||||||
/// picking, visibility checks, lighting calculations, or numerous other applications.
|
/// 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.
|
/// 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
|
/// The length of the direction vector represents the length of the ray. When you
|
||||||
/// Raycast object's execute() method it will iterate over each voxel which lies on the ray,
|
/// 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
|
/// 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
|
/// either when it encounters a solid voxel or when it reaches the end of the ray.
|
||||||
/// 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.
|
|
||||||
///
|
///
|
||||||
/// **Important Note:** These has been confusion in the past with people not realising
|
/// **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
|
/// 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
|
/// you must scale the direction vector so that it's length represents the maximum distance
|
||||||
/// over which you want the ray to be cast.
|
/// 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
|
/// 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.
|
/// 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
|
/// 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'
|
/// 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
|
/// surace extractors. It's behaviour with the Marching Cubes surface extractor has not
|
||||||
/// been tested yet.
|
/// been tested yet.
|
||||||
|
///
|
||||||
|
/// Note that we also have a pickVoxel() function which provides a slightly higher-level interface.
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
template<typename VolumeType, typename Callback>
|
template<typename VolumeType, typename Callback>
|
||||||
|
@ -34,6 +34,11 @@
|
|||||||
|
|
||||||
namespace PolyVox
|
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<typename _DataType>
|
template<typename _DataType>
|
||||||
struct Vertex
|
struct Vertex
|
||||||
{
|
{
|
||||||
|
@ -29,6 +29,10 @@
|
|||||||
|
|
||||||
namespace PolyVox
|
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>
|
template< typename SrcVolumeType, typename DstVolumeType>
|
||||||
class VolumeResampler
|
class VolumeResampler
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user