MeVisLabToolboxReference
MeVisLab/Standard/Sources/ML/MLBase/mlVectorList.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00002 //--------------------------------------------------------------------------------------
00004 
00009 //--------------------------------------------------------------------------------------
00010 
00011 
00012 #ifndef __mlVectorList_H
00013 #define __mlVectorList_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 VectorList : public Base {
00032 
00033 public:
00034   VectorList() {};
00035   virtual ~VectorList() {};
00036 
00038   MLssize_t getNum() const;
00039 
00041   void getValue(MLssize_t index, int& type, Vector3& p1, Vector3& p2) const;
00042 
00044   void getValue(MLssize_t index, int& type,
00045                 float &x1, float &y1, float &z1,
00046                 float &x2, float &y2, float &z2
00047                 ) const;
00048 
00050   void addValue(int type, const Vector3& p1, const Vector3& p2);
00051 
00053   void setValue(MLssize_t index, int type, const Vector3& p1, const Vector3& p2);
00054 
00056   void removeValue(MLssize_t index = -1);
00057 
00059   void getPoint(MLssize_t index, int& type,
00060                 float &x1, float &y1, float &z1
00061                ) const;
00062 
00064   void setPoint(MLssize_t index, int type, float x, float y, float z);
00065 
00067   void clear();
00068 
00070   virtual char* getPersistentState() const;
00071   virtual void setPersistentState(const char* state);
00072   virtual void clearPersistentState(char* state) const;
00074   
00076   void print(const char* txt);
00077 
00078 private:
00079 
00081   ML_CLASS_HEADER(VectorList);
00082 
00084   std::vector<Vector4> points;
00085 };
00086 
00087 ML_END_NAMESPACE
00088 
00089 #endif