MeVisLabToolboxReference
ml::VectorList Class Reference

Base object representing a list of vectors given as Vector4's. More...

#include <mlVectorList.h>

Inheritance diagram for ml::VectorList:
ml::Base

List of all members.

Public Member Functions

 VectorList ()
virtual ~VectorList ()
MLssize_t getNum () const
 returns the number of contained points
void getValue (MLssize_t index, int &type, Vector3 &p1, Vector3 &p2) const
 get point at given index
void getValue (MLssize_t index, int &type, float &x1, float &y1, float &z1, float &x2, float &y2, float &z2) const
 get point at given index
void addValue (int type, const Vector3 &p1, const Vector3 &p2)
 add point at end of list
void setValue (MLssize_t index, int type, const Vector3 &p1, const Vector3 &p2)
 set value at index
void removeValue (MLssize_t index=-1)
 remove point from list, if index is -1, last element is removed
void getPoint (MLssize_t index, int &type, float &x1, float &y1, float &z1) const
 returns point of vectors at given point index (NOTE: (0,1 = first vector , 2,3 = second vector))
void setPoint (MLssize_t index, int type, float x, float y, float z)
 set point of vectors at given point index (NOTE: (0,1 = first vector , 2,3 = second vector))
void clear ()
 clear all entries
void print (const char *txt)
 debug print
Implementation of the virtual Base class functions for persistence; see class Base for details.
virtual char * getPersistentState () const
 Returns a C string describing the object's internal state.
virtual void setPersistentState (const char *state)
 Restores the object's internal state from a string that had been previously generated using getPersistentState().
virtual void clearPersistentState (char *state) const
 Disposes a string previously allocated by getPersistentState().

Detailed Description

Base object representing a list of vectors given as Vector4's.

Definition at line 31 of file mlVectorList.h.


Constructor & Destructor Documentation

ml::VectorList::VectorList ( ) [inline]

Definition at line 34 of file mlVectorList.h.

virtual ml::VectorList::~VectorList ( ) [inline, virtual]

Definition at line 35 of file mlVectorList.h.


Member Function Documentation

void ml::VectorList::addValue ( int  type,
const Vector3 p1,
const Vector3 p2 
)

add point at end of list

void ml::VectorList::clear ( )

clear all entries

virtual void ml::VectorList::clearPersistentState ( char *  ) const [virtual]

Disposes a string previously allocated by getPersistentState().

Reimplemented from ml::Base.

MLssize_t ml::VectorList::getNum ( ) const
virtual char* ml::VectorList::getPersistentState ( ) const [virtual]

Returns a C string describing the object's internal state.

The memory for the string will be allocated here and has to be deallocated using clearPersistentState().

Reimplemented from ml::Base.

void ml::VectorList::getPoint ( MLssize_t  index,
int &  type,
float &  x1,
float &  y1,
float &  z1 
) const

returns point of vectors at given point index (NOTE: (0,1 = first vector , 2,3 = second vector))

Referenced by ml::ITKNodeContainerFromBasePointer(), ml::ITKPointSetFromBasePointer(), and ml::ITKPolylineFromBasePointer().

void ml::VectorList::getValue ( MLssize_t  index,
int &  type,
Vector3 p1,
Vector3 p2 
) const

get point at given index

void ml::VectorList::getValue ( MLssize_t  index,
int &  type,
float &  x1,
float &  y1,
float &  z1,
float &  x2,
float &  y2,
float &  z2 
) const

get point at given index

void ml::VectorList::print ( const char *  txt)

debug print

void ml::VectorList::removeValue ( MLssize_t  index = -1)

remove point from list, if index is -1, last element is removed

virtual void ml::VectorList::setPersistentState ( const char *  ) [virtual]

Restores the object's internal state from a string that had been previously generated using getPersistentState().

Reimplemented from ml::Base.

void ml::VectorList::setPoint ( MLssize_t  index,
int  type,
float  x,
float  y,
float  z 
)

set point of vectors at given point index (NOTE: (0,1 = first vector , 2,3 = second vector))

void ml::VectorList::setValue ( MLssize_t  index,
int  type,
const Vector3 p1,
const Vector3 p2 
)

set value at index


The documentation for this class was generated from the following file: