if test "$GUI_DISABLE_CORBA" != "yes"; then
variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok
-omniORB_ok boost_ok occ_ok sip_ok pyqt_ok qwt_ok doxygen_ok graphviz_ok libxml_ok Kernel_ok"
+omniORB_ok boost_ok occ_ok sip_ok pyqt_ok qwt_ok doxygen_ok graphviz_ok opencv_ok libxml_ok Kernel_ok"
else
variables="cc_ok lex_yacc_ok python_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok boost_ok
-occ_ok sip_ok pyqt_ok qwt_ok doxygen_ok graphviz_ok Kernel_ok"
+occ_ok sip_ok pyqt_ok qwt_ok doxygen_ok graphviz_ok opencv_ok Kernel_ok "
fi
for var in $variables
libLightApp_la_CPPFLAGS = $(PYTHON_INCLUDES) $(QT_INCLUDES) $(CAS_CPPFLAGS) \
$(HDF5_INCLUDES) @KERNEL_CXXFLAGS@ -I$(srcdir)/../SUIT -I$(srcdir)/../STD \
+ $(OPENCV_INCLUDES) \
-I$(srcdir)/../CAM -I$(srcdir)/../ObjBrowser -I$(srcdir)/../LogWindow \
-I$(srcdir)/../Prs -I$(srcdir)/../Qtx -I$(srcdir)/../Event -I$(srcdir)/../Style \
-I$(srcdir)/../CASCatch
-libLightApp_la_LDFLAGS = $(QT_MT_LIBS)
+
+libLightApp_la_LDFLAGS = $(QT_MT_LIBS) \
+ $(OPENCV_LIBS)
if ENABLE_VTKVIEWER
libLightApp_la_CPPFLAGS += $(VTK_INCLUDES) -I$(srcdir)/../VTKViewer
#include <Standard.hxx>
#endif
-#ifndef _Handle_AIS_Shape_HeaderFile
-#include <Handle_AIS_Shape.hxx>
+// #ifndef _Handle_AIS_Shape_HeaderFile
+// #include <Handle_AIS_Shape.hxx>
+// #endif
+#ifndef _AIS_TexturedShape_HeaderFile
+#include <AIS_TexturedShape.hxx>
#endif
class Standard_Transient;
\class Handle(AIS_Shape)
Smart pointer (handle) to AIS_Shape
*/
-class Handle(AIS_Shape);
+// class Handle(AIS_Shape);
+class Handle(AIS_TexturedShape);
class SALOME_AISShape;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOME_AISShape);
\class Handle(SALOME_AISShape)
Smart pointer (handle) to SALOME_AISShape
*/
-class Handle(SALOME_AISShape) : public Handle(AIS_Shape) {
+class Handle(SALOME_AISShape) : public Handle(AIS_TexturedShape) {
public:
inline void* operator new(size_t,void* anAddress)
{
// {
// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
// }
- Handle(SALOME_AISShape)():Handle(AIS_Shape)() {}
- Handle(SALOME_AISShape)(const Handle(SALOME_AISShape)& aHandle) : Handle(AIS_Shape)(aHandle)
+ Handle(SALOME_AISShape)():Handle(AIS_TexturedShape)() {}
+ Handle(SALOME_AISShape)(const Handle(SALOME_AISShape)& aHandle) : Handle(AIS_TexturedShape)(aHandle)
{
}
- Handle(SALOME_AISShape)(const SALOME_AISShape* anItem) : Handle(AIS_Shape)((AIS_Shape *)anItem)
+ Handle(SALOME_AISShape)(const SALOME_AISShape* anItem) : Handle(AIS_TexturedShape)((AIS_TexturedShape *)anItem)
{
}
\param shape - TopoDS shape
*/
SALOME_AISShape::SALOME_AISShape(const TopoDS_Shape& shape)
-: AIS_Shape(shape)
+: AIS_TexturedShape(shape)
{
}
#ifndef _Handle_SALOME_InteractiveObject_HeaderFile
#include <Handle_SALOME_InteractiveObject.hxx>
#endif
-#ifndef _AIS_Shape_HeaderFile
-#include <AIS_Shape.hxx>
+// #ifndef _AIS_Shape_HeaderFile
+// #include <AIS_Shape.hxx>
+// #endif
+#ifndef _AIS_TexturedShape_HeaderFile
+#include <AIS_TexturedShape.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
+
class SALOME_InteractiveObject;
class TopoDS_Shape;
class TColStd_IndexedMapOfInteger;
-class SALOME_AISShape : public AIS_Shape {
+class SALOME_AISShape : public AIS_TexturedShape {
public:
Standard_EXPORT Handle_Standard_Type& SALOME_AISShape_Type_()
{
- static Handle_Standard_Type aType1 = STANDARD_TYPE(AIS_Shape);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(AIS_Shape);
+ static Handle_Standard_Type aType1 = STANDARD_TYPE(AIS_TexturedShape);
+ if ( aType1.IsNull()) aType1 = STANDARD_TYPE(AIS_TexturedShape);
static Handle_Standard_Type aType2 = STANDARD_TYPE(AIS_InteractiveObject);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(AIS_InteractiveObject);
static Handle_Standard_Type aType3 = STANDARD_TYPE(SelectMgr_SelectableObject);
# Author : Vladimir Klyachin (OCN)
# Module : OCCViewer
# $Header$
+#
include $(top_srcdir)/adm_local/unix/make_common_starter.am
-I$(srcdir)/../OpenGLUtils -I$(srcdir)/../CASCatch
libOCCViewer_la_LDFLAGS = $(OGL_LIBS) $(QT_MT_LIBS) $(CAS_KERNEL) $(CAS_VIEWER)
+
libOCCViewer_la_LIBADD = ../Qtx/libqtx.la ../SUIT/libsuit.la \
../ViewerTools/libViewerTools.la ../OpenGLUtils/libOpenGLUtils.la
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
#include "OCCViewer_ViewModel.h"
#include "OCCViewer_ViewWindow.h"
OCCViewer_ViewPort3d* vp3d = view->getViewPort();
if ( vp3d )
+ {
vp3d->setBackgroundColor( myColors[0] );
+ vp3d->getView()->SetSurfaceDetail(V3d_TEX_ALL);
+ }
}
}
*/
void OCCViewer_Viewer::onMouseMove(SUIT_ViewWindow* theWindow, QMouseEvent* theEvent)
{
+// MESSAGE("OCCViewer_Viewer::onMouseMove")
if (!mySelectionEnabled) return;
if (!theWindow->inherits("OCCViewer_ViewWindow")) return;
*/
void OCCViewer_Viewer::onMouseRelease(SUIT_ViewWindow* theWindow, QMouseEvent* theEvent)
{
+ MESSAGE("OCCViewer_Viewer::onMouseRelease")
if (!mySelectionEnabled) return;
if (theEvent->button() != Qt::LeftButton) return;
if (!theWindow->inherits("OCCViewer_ViewWindow")) return;
if ( !aView )
return;
- QString selFile = QFileDialog::getOpenFileName(aView,tr( "SELECT_IMAGE"),aView->backgroundImageFilename(), tr("OCC_BG_IMAGE_FILES"));
- if ( ! selFile.isEmpty() )
+ QString selFile = QFileDialog::getOpenFileName(aView,tr( "SELECT_IMAGE"),aView->backgroundImageFilename(), tr("OCC_IMAGE_FILES"));
+ if ( ! selFile.isEmpty() ){
aView->setBackgroundImage(selFile,Aspect_FM_CENTERED);
+ }
}
/*!
if ( !aView )
return;
- QString selFile = QFileDialog::getOpenFileName(aView,tr( "SELECT_IMAGE"),aView->backgroundImageFilename(), tr("OCC_BG_IMAGE_FILES"));
+ QString selFile = QFileDialog::getOpenFileName(aView,tr( "SELECT_IMAGE"),aView->backgroundImageFilename(), tr("OCC_IMAGE_FILES"));
if ( ! selFile.isEmpty() )
aView->setBackgroundImage(selFile,Aspect_FM_TILED);
}
if ( !aView )
return;
- QString selFile = QFileDialog::getOpenFileName(aView,tr( "SELECT_IMAGE"),aView->backgroundImageFilename(), tr("OCC_BG_IMAGE_FILES"));
+ QString selFile = QFileDialog::getOpenFileName(aView,tr( "SELECT_IMAGE"),aView->backgroundImageFilename(), tr("OCC_IMAGE_FILES"));
if ( ! selFile.isEmpty() )
aView->setBackgroundImage(selFile,Aspect_FM_STRETCH);
+// aView->setBackgroundImage(selFile,Aspect_FM_STRETCH_NODEF);
}
/*!
Updates OCC 3D viewer
#include <Basics_OCCTVersion.hxx>
#include <SUIT_ViewManager.h>
+#include <SUIT_ViewModel.h>
#include <QColor>
#include <QString>
#include <V3d_PerspectiveView.hxx>
#include <V3d_OrthographicView.hxx>
+#include <InterfaceGraphic_Visual3d.hxx>
+#include <OpenGl_cmn_varargs.h>
+#include <OpenGl_tsm_ws.h>
+
+#include "utilities.h"
+
#if defined WNT
#include <WNT_Window.hxx>
#else
void OCCViewer_ViewPort3d::setBackgroundImage( const QString& fileName,const Aspect_FillMethod& theFillMethod)
{
myBackgroundImageFilename=fileName;
- if ( !activeView().IsNull() ) {
- activeView()->SetBackgroundImage( (Standard_CString)fileName.toLatin1().constData(),theFillMethod,true);
- }
+ //TEST
+// if ( !activeView().IsNull() ) {
+// activeView()->SetBackgroundImage( (Standard_CString)fileName.toLatin1().constData(),theFillMethod,true);
+// }
}
/*!
virtual QString backgroundImageFilename() const;
virtual void setBackgroundImage( const QString& fileName , const Aspect_FillMethod& theFillMethod);
+
+ virtual int getBgImgHeight(){return myBgImgHeight; };
+ virtual int getBgImgWidth() {return myBgImgWidth; };
+
+ virtual void updateStaticTriedronVisibility();
virtual void updateStaticTriedronVisibility();
double myScale;
bool myIsAdvancedZoomingEnabled;
QString myBackgroundImageFilename;
+ int myBgImgHeight;
+ int myBgImgWidth;
};
#ifdef WIN32
#include <Standard_Version.hxx>
+#include "utilities.h"
+
+// // OpenCV includes
+// #include <cv.h>
+// #include <highgui.h>
+
static QEvent* l_mbPressEvent = 0;
#ifdef WIN32
myInteractionStyle = SUIT_ViewModel::STANDARD;
clearViewAspects();
+
}
/*!
myViewPort->setCursor( handCursor );
}
}
+ emit mouseMoving( this, theEvent );
}
else if ( anInteractionStyle == SUIT_ViewModel::STANDARD &&
aButton == Qt::RightButton && ( aState == Qt::NoModifier || Qt::ShiftModifier ) ) {
*/
void OCCViewer_ViewWindow::onSketchingFinished()
{
+ MESSAGE("OCCViewer_ViewWindow::onSketchingFinished()")
if ( mypSketcher && mypSketcher->result() == OCCViewer_ViewSketcher::Accept )
{
Handle(AIS_InteractiveContext) ic = myModel->getAISContext();
int aRight = aRect->right();
int aTop = aRect->top();
int aBottom = aRect->bottom();
+// myRect = aRect;
if( append )
ic->ShiftSelect( aLeft, aBottom, aRight, aTop, getViewPort()->getView(), Standard_False );
void OCCViewer_ViewWindow::setBackgroundImage( const QString& theFileName,const Aspect_FillMethod& theFillMethod)
{
- if ( myViewPort ) myViewPort->setBackgroundImage( theFileName ,theFillMethod);
+ if ( myViewPort )
+ myViewPort->setBackgroundImage( theFileName ,theFillMethod);
}
/*!
nodist_libSOCC_la_SOURCES = $(MOC_FILES)
libSOCC_la_CPPFLAGS = $(QT_INCLUDES) $(CAS_CPPFLAGS) $(BOOST_CPPFLAGS) \
+ $(OPENCV_INCLUDES) \
-I$(srcdir)/../SUIT -I$(srcdir)/../OBJECT -I$(srcdir)/../Prs \
-I$(srcdir)/../OCCViewer -I$(srcdir)/../Qtx
-libSOCC_la_LDFLAGS = $(QT_MT_LIBS)
+libSOCC_la_LDFLAGS = $(QT_MT_LIBS) \
+ $(OPENCV_LIBS)
+
libSOCC_la_LIBADD = ../Qtx/libqtx.la ../SUIT/libsuit.la ../OBJECT/libSalomeObject.la \
../Prs/libSalomePrs.la ../OCCViewer/libOCCViewer.la