#include <V3d_PositionalLight.hxx>
#include <V3d_AmbientLight.hxx>
#include <V3d_SpotLight.hxx>
+#include <Graphic3d_GraphicDriver.hxx>
+
+#include <Graphic3d_ClipPlane.hxx>
#if _MSC_VER >= 1000
#pragma once
CurAction3d_EndDirectionalLight
};
+class AIS_RubberBand;
+
class CViewer3dView : public CView
{
protected: // create from serialization only
DECLARE_DYNCREATE(CViewer3dView)
public:
- CViewer3dDoc* GetDocument();
- void Redraw() { myView->Redraw(); };
- void InitButtons();
- void Reset();
- void GetViewCenter(V3d_Coordinate& Xc, V3d_Coordinate& Yc);
- void CViewer3dView::SetViewCenter(V3d_Coordinate Xc, V3d_Coordinate Yc);
- void GetViewEye(V3d_Coordinate& X, V3d_Coordinate& Y, V3d_Coordinate& Z);
- void SetViewEye(const V3d_Coordinate X,const V3d_Coordinate Y,const V3d_Coordinate Z);
- Quantity_Factor GetViewScale();
- void SetViewScale(const Quantity_Factor Coef);
- void FitAll() { myView->FitAll(); myView->ZFitAll(); };
+ CViewer3dDoc* GetDocument();
+ void Redraw() { myView->Redraw(); };
+ void InitButtons();
+ void Reset();
+ void GetViewAt (Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ) const;
+ void SetViewAt (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ);
+ void GetViewEye (Standard_Real& X, Standard_Real& Y, Standard_Real& Z);
+ void SetViewEye (const Standard_Real X,const Standard_Real Y,const Standard_Real Z);
+ Standard_Real GetViewScale();
+ void SetViewScale (const Standard_Real Coef);
+ void FitAll() { myView->FitAll(); myView->ZFitAll(); };
// Overrides
afx_msg void OnSpotLight();
afx_msg void OnPositionalLight();
afx_msg void OnAmbientLight();
- afx_msg void OnZcueing();
afx_msg void OnScale();
- afx_msg void OnZclipping();
afx_msg void OnShadingmodel();
afx_msg void OnAntialiasingonoff();
afx_msg void OnClearLights();
enum VisMode { VIS_WIREFRAME, VIS_SHADE, VIS_HLR };
VisMode myVisMode;
- Handle_V3d_View myView;
- Handle_Graphic3d_GraphicDriver myGraphicDriver;
+ Handle(V3d_View) myView;
+ Handle(Graphic3d_GraphicDriver) myGraphicDriver;
View3D_CurrentAction myCurrentMode;
Standard_Integer myXmin;
Standard_Integer myYmin;
Standard_Integer myXmax;
Standard_Integer myYmax;
- Standard_Integer myWidth;
- Standard_Integer myHeight;
Standard_Integer NbActiveLights;
Standard_Boolean myHlrModeIsOn;
- Quantity_Factor myCurZoom;
- Handle_V3d_AmbientLight myCurrent_AmbientLight;
- Handle_V3d_SpotLight myCurrent_SpotLight;
- Handle_V3d_PositionalLight myCurrent_PositionalLight;
- Handle_V3d_DirectionalLight myCurrent_DirectionalLight;
- Handle_V3d_Plane myPlane;
- Handle_AIS_Shape myShape;
+ Standard_Real myCurZoom;
+ Handle(V3d_AmbientLight) myCurrent_AmbientLight;
+ Handle(V3d_SpotLight) myCurrent_SpotLight;
+ Handle(V3d_PositionalLight) myCurrent_PositionalLight;
+ Handle(V3d_DirectionalLight) myCurrent_DirectionalLight;
+ Handle(Graphic3d_ClipPlane) myClippingPlane;
+ Handle(AIS_Shape) myShape;
+ Handle(AIS_RubberBand) myRect; //!< Rubber rectangle for selection
private:
- enum LineStyle { Solid, Dot, ShortDash, LongDash, Default };
- CPen* m_Pen;
- virtual void DrawRectangle (const Standard_Integer MinX ,
- const Standard_Integer MinY ,
- const Standard_Integer MaxX ,
- const Standard_Integer MaxY ,
- const Standard_Boolean Draw ,
- const LineStyle aLineStyle = Default );
+
+ void DrawRectangle (Standard_Integer theMinX, Standard_Integer theMinY, Standard_Integer theMaxX, Standard_Integer theMaxY,
+ Standard_Boolean theToDraw, Aspect_TypeOfLine theLineType = Aspect_TOL_SOLID);
+
UINT myAxisKey;
UINT myScaleDirection;
void RedrawVisMode();