VectorObject2D.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002  *  VectorObject2D.h
00003  *
00004  *  (C) 2007 AG Aktives Sehen <agas@uni-koblenz.de>
00005  *           Universitaet Koblenz-Landau
00006  *
00007  *  Additional information:
00008  *  $Id: $
00009  *******************************************************************************/
00010 
00011 #ifndef VectorObject2D_H
00012 #define VectorObject2D_H
00013 
00014 #include "Workers/Math/Point2D.h"
00015 #include <vector>
00016 
00022 class VectorObject2D
00023 {
00024 
00025   public:
00026 
00027     enum StyleT {
00028       Lines,
00029       Dots
00030     };
00031 
00032     static const unsigned short ClassVersion;
00033 
00034     VectorObject2D( const std::vector<Point2D> vertices, float r, float g, float b, float lineWidth=1.0, StyleT style=Lines );
00035 
00036     ~VectorObject2D();
00037 
00038     void paintGl();
00039 
00040     inline std::vector<Point2D>& vertices() { return m_Vertices; }
00041     inline float r() { return m_R; }
00042     inline float g() { return m_G; }
00043     inline float b() { return m_B; }
00044     inline float lineWidth() { return m_LineWidth; }
00045     inline StyleT style() { return m_Style; }
00046 
00047     inline void setVertices( std::vector<Point2D>& vertices ) { m_Vertices=vertices; }
00048     inline void setColor( float r, float g, float b ) { m_R=r; m_G=g; m_B=b; }
00049     inline void setLineWidth( float lineWidth ) { m_LineWidth=lineWidth; }
00050     inline void setStyle( StyleT style ) { m_Style=style; }
00051 
00052   private:
00053 
00054     std::vector<Point2D> m_Vertices;
00055     float m_R;
00056     float m_G;
00057     float m_B;
00058     float m_LineWidth;
00059     StyleT m_Style;
00060 };
00061 
00062 #endif


robbie_architecture
Author(s): Viktor Seib
autogenerated on Mon Oct 6 2014 02:53:09