Go::LineCloud Class Reference
['geometry' - a spline library]

GeomObject representing a collection of line segments in space. More...

#include <LineCloud.h>

Inheritance diagram for Go::LineCloud:

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

Public Member Functions

 LineCloud ()
 Makes an unitialized LineCloud that can later be assigned or read() into.
template<typename ForwardIterator>
 LineCloud (ForwardIterator start, int numlines)
 Generate a LineCloud based on values stored in memory.
virtual ~LineCloud ()
 Virtual destructor, enables safe inheritance.
virtual void read (std::istream &is)
 Read a LineCloud from an input stream.
virtual void write (std::ostream &os) const
 Write the LineCloud to stream.
virtual BoundingBox boundingBox () const
 Get the BoundingBox of the LineCloud.
virtual int dimension () const
 Query the dimension of the space in which the LineCloud is embedded (currently, only dimension=3 is allowed.
virtual ClassType instanceType () const
 Get the ClassType of this GeomObject (which is of course the ClassType identified LineCloud).
virtual LineCloudclone () const
 Clone this object.
void setCloud (const double *points, int numlines)
 Fill a line cloud with information read from memory.
int numLines () const
 Query the number of lines in the LineCloud.
Vector3Dpoint (int i)
 Get a start or end point from a line in the LineCloud (non-const version).
const Vector3Dpoint (int i) const
 Get a start or end point from a line in the LineCloud (const version).
double * rawData ()
 Get a pointer to the start of the internal memory area where line information is stored.

Static Public Member Functions

static ClassType classType ()
 Get the ClassType identifier of LineCloud.

Detailed Description

GeomObject representing a collection of line segments in space.

Definition at line 52 of file LineCloud.h.


Constructor & Destructor Documentation

template<typename ForwardIterator>
Go::LineCloud::LineCloud ( ForwardIterator  start,
int  numlines 
) [inline]

Generate a LineCloud based on values stored in memory.

The lines should be stored as a sequence of point pairs indicating the start and end position of each line in the line cloud. Each point is stored as (x_coord, y_coord, z_coord). The coordinates should be convertible to 'double'. Ex: p0_start_x, p0_start_y, p0_start_z, p0_end_x, p0_end_y, p0_end_z, p1_start_x, p1_start_y, p1_start_z,....

Parameters:
start pointer to the start of the memory area from which point information is to be copied
numlines number of lines in the LineCloud

Definition at line 72 of file LineCloud.h.


Member Function Documentation

virtual void Go::LineCloud::read ( std::istream &  is  )  [virtual]

Read a LineCloud from an input stream.

Parameters:
is the stream from which we will read the LineCloud

Implements Go::Streamable.

virtual void Go::LineCloud::write ( std::ostream &  os  )  const [virtual]

Write the LineCloud to stream.

Parameters:
os the stream that we will write the LineCloud to

Implements Go::Streamable.

virtual BoundingBox Go::LineCloud::boundingBox (  )  const [virtual]

Get the BoundingBox of the LineCloud.

Returns:
the BoundingBox enclosing the LineCloud

Implements Go::GeomObject.

virtual int Go::LineCloud::dimension (  )  const [inline, virtual]

Query the dimension of the space in which the LineCloud is embedded (currently, only dimension=3 is allowed.

..)

Returns:
the dimension of the space (always 3 for now)

Implements Go::GeomObject.

Definition at line 96 of file LineCloud.h.

virtual ClassType Go::LineCloud::instanceType (  )  const [inline, virtual]

Get the ClassType of this GeomObject (which is of course the ClassType identified LineCloud).

Returns:
the ClassType identifier of LineCloud

Implements Go::GeomObject.

Definition at line 102 of file LineCloud.h.

References classType().

static ClassType Go::LineCloud::classType (  )  [inline, static]

Get the ClassType identifier of LineCloud.

Returns:
the ClassType identifier of LineCloud

Reimplemented from Go::GeomObject.

Definition at line 107 of file LineCloud.h.

Referenced by instanceType().

virtual LineCloud* Go::LineCloud::clone (  )  const [inline, virtual]

Clone this object.

Returns:
a pointer to a cloned LineCloud.

Implements Go::GeomObject.

Definition at line 121 of file LineCloud.h.

References LineCloud().

void Go::LineCloud::setCloud ( const double *  points,
int  numlines 
)

Fill a line cloud with information read from memory.

The layout of the read information should be as for the LineCloud constructor: LineCloud(ForwardIterator start, int numlines)

Parameters:
points pointer to the memory area where the coordinates of the elements in the LineCloud can be found. (This information will be copied).
numlines number of lines in the LineCloud.

int Go::LineCloud::numLines (  )  const [inline]

Query the number of lines in the LineCloud.

Returns:
the LineCloud's number of lines.

Definition at line 135 of file LineCloud.h.

Vector3D& Go::LineCloud::point ( int  i  )  [inline]

Get a start or end point from a line in the LineCloud (non-const version).

Parameters:
i the index of the start/end point. If 'i' is pair, then the returned point is a start point, else it is an end point.
Returns:
a reference to the requested start/end point

Definition at line 141 of file LineCloud.h.

const Vector3D& Go::LineCloud::point ( int  i  )  const [inline]

Get a start or end point from a line in the LineCloud (const version).

Parameters:
i the index of the start/end point. If 'i' is pair, then the returned point is a start point, else it is an end point.
Returns:
a const-reference to the requested start/end point

Definition at line 147 of file LineCloud.h.

double* Go::LineCloud::rawData (  )  [inline]

Get a pointer to the start of the internal memory area where line information is stored.

Returns:
a pointer to the beginning of the array where line information is stored.

Definition at line 152 of file LineCloud.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