Go::PointCloud< Dim > Class Template Reference
['geometry' - a spline library]

Represent a cloud of points in 'Dim'-dimensional space. More...

#include <PointCloud.h>

Inheritance diagram for Go::PointCloud< Dim >:

Go::GeomObject Go::Streamable List of all members.

Public Member Functions

 PointCloud ()
 Constructor for an empty PointCloud that can only be assigned to or read(.
template<typename ForwardIterator>
 PointCloud (ForwardIterator start, int numpoints)
 Constructor specifying a PointCloud from a number of predefined points.
 PointCloud (std::vector< Array< double, Dim > > &points)
 Constructor specifying a PointCloud from an Array of points.
virtual ~PointCloud ()
 Virtual destructor, enables safe inheritance.
virtual BoundingBox boundingBox () const
 Return the object's bounding box.
virtual int dimension () const
 Query the dimension of the space where the PointCloud lies.
virtual ClassType instanceType () const
 Return the class type identifier of a given, derived instance of GeomObject.
virtual PointCloudclone () const
 Clone the GeomObject and return a pointer to the clone.
int numPoints () const
 Query the number of points in the PointCloud.
Array< double, Dim > & point (int i)
 Get the coordinates of a point in the point cloud.
const Array< double, Dim > & point (int i) const
 Get the coordinates of a point in the point cloud (const-version).
double * rawData ()
 Get a pointer to the memory area where the point coordinates are (consecutively) stored.
const double * rawData () const
 Get a const pointer to the memory area where the point coordinates are (consecutively) stored.
const std::vector< Array<
double, Dim > > & 
pointVector ()
 Get a reference to the vector where the points are stored.
virtual void read (std::istream &is)
 read object from stream
virtual void write (std::ostream &os) const
 write object to stream

Static Public Member Functions

static ClassType classType ()
 Return the class type identifier of a given class derived from GeomObject.

Detailed Description

template<int Dim>
class Go::PointCloud< Dim >

Represent a cloud of points in 'Dim'-dimensional space.

Definition at line 56 of file PointCloud.h.


Constructor & Destructor Documentation

template<int Dim>
Go::PointCloud< Dim >::PointCloud (  )  [inline]

Constructor for an empty PointCloud that can only be assigned to or read(.

..) into.

Definition at line 60 of file PointCloud.h.

Referenced by Go::PointCloud< Dim >::clone().

template<int Dim>
template<typename ForwardIterator>
Go::PointCloud< Dim >::PointCloud ( ForwardIterator  start,
int  numpoints 
) [inline]

Constructor specifying a PointCloud from a number of predefined points.

Parameters:
start iterator to the beginning of an array where the defining points are stored (these will be copied to the objects internal datastructure).
numpoints number of points to be read into the PointCloud

Definition at line 72 of file PointCloud.h.


Member Function Documentation

template<int Dim>
int Go::PointCloud< Dim >::numPoints (  )  const [inline]

Query the number of points in the PointCloud.

Returns:
the number of points in the PointCloud

Definition at line 123 of file PointCloud.h.

template<int Dim>
Array<double, Dim>& Go::PointCloud< Dim >::point ( int  i  )  [inline]

Get the coordinates of a point in the point cloud.

Parameters:
i the index of the requested point
Returns:
a reference to the Array containing the coordinates of the requested point

Definition at line 130 of file PointCloud.h.

template<int Dim>
const Array<double, Dim>& Go::PointCloud< Dim >::point ( int  i  )  const [inline]

Get the coordinates of a point in the point cloud (const-version).

Parameters:
i the index of the requested point
Returns:
a const reference to the Array containing the coordinates of the requested point

Definition at line 137 of file PointCloud.h.

template<int Dim>
double* Go::PointCloud< Dim >::rawData (  )  [inline]

Get a pointer to the memory area where the point coordinates are (consecutively) stored.

Returns:
a pointer to the coordinate storage area.

Definition at line 143 of file PointCloud.h.

template<int Dim>
const double* Go::PointCloud< Dim >::rawData (  )  const [inline]

Get a const pointer to the memory area where the point coordinates are (consecutively) stored.

Returns:
a constant pointer to the coordinate storage area

Definition at line 149 of file PointCloud.h.

template<int Dim>
const std::vector<Array<double, Dim> >& Go::PointCloud< Dim >::pointVector (  )  [inline]

Get a reference to the vector where the points are stored.

Returns:
a reference to the point coordinate vector

Definition at line 154 of file PointCloud.h.

template<int Dim>
virtual void Go::PointCloud< Dim >::read ( std::istream &  is  )  [inline, virtual]

read object from stream

Parameters:
is stream from which object is read

Implements Go::Streamable.

Definition at line 158 of file PointCloud.h.

template<int Dim>
virtual void Go::PointCloud< Dim >::write ( std::ostream &  os  )  const [inline, virtual]

write object to stream

Parameters:
os stream to which object is written

Implements Go::Streamable.

Definition at line 185 of file PointCloud.h.


The documentation for this class was generated from the following file:
Generated on Mon Jun 11 14:48:19 2007 for GoTools Core Library by  doxygen 1.5.1