35 #ifndef ANA_WINDOW3D_WINDOW3D_H 36 #define ANA_WINDOW3D_WINDOW3D_H 53 class GLWidgetManager;
54 class OrientationAnnotation;
115 Qt::WindowFlags f = 0 );
119 virtual Type type()
const;
120 virtual SubType subtype()
const;
122 bool temporaryObject =
false,
125 virtual bool positionFromCursor(
int x,
int y,
Point3df & pos );
129 virtual std::list<anatomist::AObject*> *objectsAtCursorPosition(
int x,
int y,
int tolerenceRadius );
134 int computeNearestVertexFromPolygonPoint(
138 void getInfos3DFromClickPoint(
int x,
int y,
Point3df & position,
int *poly,
140 std::vector<float> &texvalue, std::string & textype,
141 Point3df & positionNearestVertex,
int* indexNearestVertex);
143 bool surfpaintIsVisible();
144 void setVisibleSurfpaint(
bool b);
145 bool constraintEditorIsActive();
146 void setActiveConstraintEditor(
bool b);
148 void loadConstraintData(
149 const std::vector<std::string> & constraintList,
int constraintType,
151 std::vector<std::string> getConstraintList();
152 int getConstraintType()
const;
155 void printPositionAndValue();
156 void displayInfoAtClickPosition(
int x,
int y );
157 virtual void displayClickPoint();
159 void setViewPoint(
float *quaternion,
164 void setOrientationCube(
bool state );
165 bool hasOrientationCube()
const;
167 void setBoundingFrame(
bool state );
168 bool hasBoundingFrame()
const;
173 virtual const std::set<unsigned> & typeCount()
const;
174 virtual std::set<unsigned> & typeCount();
175 virtual const std::string & baseTitle()
const;
176 virtual void setPosition(
const Point3df& position,
178 virtual void setPosition(
const std::vector<float> & position,
180 virtual void updateWindowGeometry();
187 QGLWidget* glw = 0,
bool with3d =
false );
193 virtual void setViewType(
ViewType t );
195 bool isViewOblique()
const;
197 bool perspectiveEnabled()
const;
198 void enablePerspective(
bool );
202 void setSliceOrientation(
const Point3df & normal );
204 void resizeView(
int w,
int h );
206 bool boundingBox( std::vector<float> & bmin,
207 std::vector<float> & bmax )
const;
210 float clipDistance()
const;
211 void setClipDistance(
float d );
212 bool transparentZEnabled()
const;
213 void enableTransparentZ(
bool );
214 bool cullingEnabled()
const;
215 void setCulling(
bool );
216 bool flatShading()
const;
217 void setFlatShading(
bool );
218 bool smoothing()
const;
219 void setSmoothing(
bool );
223 virtual void update(
const Observable* obs,
void * );
224 void setLinkedCursorOnSliderChange(
bool x );
225 bool linkedCursorOnSliderChange()
const;
230 virtual void showToolBars(
int state = 2 );
231 virtual void showStatusBar(
int state = 2 );
235 const QGLWidget * shareWidget, Qt::WindowFlags f );
237 static void setGLWidgetCreator( GLWidgetCreator );
239 QSlider* getSliceSlider (
void)
const;
255 std::list<anatomist::AObject *>::iterator processRenderingOrder(
256 std::list<anatomist::AObject *> & opaque )
const;
258 bool polygonsSortingEnabled()
const;
259 void setPolygonsSortingEnabled(
bool );
261 bool polygonsSortingDirection()
const;
262 void setPolygonsSortingDirection(
bool dir );
263 virtual void sortPolygons(
bool force =
false );
270 virtual void polish();
272 void changeSlice(
int );
273 void changeTime(
int );
274 void changeTimeSliders(
int,
int );
275 void changeReferential();
284 void syncViews(
bool keepextrema =
false );
286 void toolsWinDestroyed();
288 void povWinDestroyed();
289 void lightWinDestroyed();
290 virtual void Refresh();
292 virtual void refreshNow();
295 void refreshTempNow();
299 void refreshLightView();
300 void refreshLightViewNow();
301 void setAutoRotationCenter();
304 float getZoom()
const;
307 int getSliceSliderPosition() ;
308 int getTimeSliderPosition() ;
310 int getSliceSliderMaxPosition() ;
311 int getTimeSliderMaxPosition() ;
313 void setSliceSliderPosition(
int position ) ;
314 void setTimeSliderPosition(
int position ) ;
315 void switchToolbox();
316 void setLinkedCursorPos();
317 void openStereoView();
318 void toggleStatusBarVisibility();
319 bool toopTipsEnabled()
const;
320 void enableToolTips(
bool );
322 void resizeEvent( QResizeEvent * ) ;
327 QImage snapshotImage(
int width=0,
int height=0,
int bufmode=0 );
334 void saveSnapshotWithCustomSize();
338 void showReferential();
341 void updateLeftRightAnnotations();
344 void displayClickPos(
Point3df clickPos );
345 void setupTimeSlider(
const std::vector<float> & bmin,
346 const std::vector<float> & bmax );
347 void setupSliceSlider(
float mins,
float maxs );
348 void setupSliceSlider();
349 void updateViewTypeToolBar();
360 int updateSliceSlider();
361 void updateTimeSliders();
static std::string _baseTitle
ViewState holds information about how a view wants to see an object.
Light used for OpenGL in 3D windows.
static std::set< unsigned > _count3d
3D windows static counter
Base Anatomist object (abstract)
std::list< carto::rc_ptr< GLItem > > PrimList
Functions that can modify on-the-fly display primitives of an object.
Abstract base class Anatomist window.
3D window, OpenGL rendering
This class can be subclassed to represent an object that the programmer wants to have observed...
see http://doc.qt.digia.com/qq/qq26-openglcanvas.html
Anatomist Window using Qt and controler system, providing a toolbar for controls. ...
std::list< RefGLItem > GLPrimitives
Base class for all OpenGL objects in Anatomist (with OpenGL display lists)
::sigc::trackable Observable
Referential: marker for transformations, with an associated color.
reference_wrapper< T > ref(T &ref)