00001 #ifndef SIGEL_VISUALISATION_SIG_VISUALSCENEOBJECT_H 00002 #define SIGEL_VISUALISATION_SIG_VISUALSCENEOBJECT_H 00003 00004 #include <qstring.h> 00005 00006 #include "SIGEL_Visualisation/SIG_SceneObject.h" 00007 #include "SIGEL_Visualisation/SIG_FloatingText.h" 00008 00009 #include "pointvector.h" 00010 #include "matrix.h" 00011 #include "GL/gl.h" 00012 00013 namespace SIGEL_Visualisation 00014 { 00015 00027 class SIG_VisualSceneObject : private SIG_SceneObject 00028 { 00029 00030 public: 00031 00042 SIG_VisualSceneObject(int number, 00043 QString name, 00044 DL_vector position = DL_vector(), 00045 DL_matrix rotation = DL_matrix(), 00046 DL_vector color = DL_vector()); 00047 00051 int getNumber(); 00052 00061 void setPosition(DL_vector newPosition); 00062 00066 DL_vector getPosition() const; 00067 00076 void setRotation(DL_matrix newRotation); 00077 00081 DL_matrix getRotation() const; 00082 00089 void setColor(DL_vector newColor); 00090 00094 DL_vector getColor() const; 00095 00101 void applyTransformation(); 00102 00108 void applyColor(); 00109 00113 void setVisible( bool newVisible ); 00114 00118 bool getVisible(); 00119 00120 void setFloatingText( SIG_FloatingText *newFloatingText ); 00121 00122 SIG_FloatingText *getFloatingText(); 00123 00127 QString const name; 00128 00129 private: 00130 00137 void updatePositionInternal(); 00138 00145 void updateRotationInternal(); 00146 00151 void updateColorInternal(); 00152 00156 DL_vector color; 00157 00173 QArray<GLdouble> transformationInternal; 00174 00182 QArray<GLdouble> colorInternal; 00183 00187 bool visible; 00188 00189 SIG_FloatingText *floatingText; 00190 00191 }; 00192 00193 } 00194 00195 #endif // SIGEL_VISUALISATION_SIG_VISUALSCENEOBJECT_H