MeVisLabToolboxReference
MeVisLab/Standard/Sources/ML/MLBase/mlPointList.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00002 //--------------------------------------------------------------------------------------
00004 
00009 //--------------------------------------------------------------------------------------
00010 
00011 
00012 #ifndef __mlPointList_H
00013 #define __mlPointList_H
00014 
00015 //ML-includes
00016 #ifndef __mlBaseInit_H
00017 #include "mlBaseInit.h"
00018 #endif
00019 #ifndef __mlModuleIncludes_H
00020 #include "mlModuleIncludes.h"
00021 #endif
00022 #ifndef __mlLinearAlgebra_H
00023 #include "mlLinearAlgebra.h"
00024 #endif
00025 
00026 ML_START_NAMESPACE
00027 
00028 //--------------------------------------------------------------------------------------
00030 //--------------------------------------------------------------------------------------
00031 class MLBASEEXPORT PointList : public Base {
00032 
00033 public:
00035   PointList() {};
00036 
00038   virtual ~PointList() {};
00039 
00041   MLssize_t getNum() const;
00042 
00044   void getValue(MLssize_t index, Vector3& vec) const;
00045 
00047   void getValue(MLssize_t index, float &x, float &y, float &z) const;
00048   
00050   void addValue(const Vector3& vec);
00051   
00053   void setValue(MLssize_t index, const Vector3& vec);
00054 
00056   void removeValue(MLssize_t index = -1);
00057 
00059   void clear();
00060 
00062   virtual char* getPersistentState() const;
00063   virtual void setPersistentState(const char* state);
00064   virtual void clearPersistentState(char* state) const;
00066   
00068   void print(const char* txt);
00069   
00070 private:
00071 
00073   ML_CLASS_HEADER(PointList); 
00074 
00076   std::vector<Vector3> points;
00077 };
00078 
00079 ML_END_NAMESPACE
00080 
00081 #endif