23 #include <qvector3d.h>
25 #pragma warning(disable : 4503)
32 #include <qcombobox.h>
33 #include <qcheckbox.h>
34 #include <qlineedit.h>
35 #include <qstatusbar.h>
39 #include <qfiledialog.h>
44 #include <qgroupbox.h>
45 #include <qclipboard.h>
46 #include <qmessagebox.h>
47 #include <qtoolbutton.h>
49 #include <QResizeEvent>
50 #include <QWheelEvent>
51 #include <QFocusEvent>
52 #include <QMouseEvent>
53 #include <QCloseEvent>
54 #include <QGridLayout>
57 #include <QHBoxLayout>
59 #include <QImageWriter>
60 #include <QPrintDialog>
91 #define TR(id) OLocalizator::getString("TYModelerFrame", (id))
92 #define IMG(id) OLocalizator::getPicture("TYModelerFrame", (id))
97 static double gridColor[] = {0.59, 0.41, 0.42};
98 static double fontColor[] = {0.1, 0.43, 0.37};
99 static double rendererColor[] = {0.91, 0.91, 0.91};
102 : QWidget(parent, f), _actionManager(10)
106 setAttribute(Qt::WA_DeleteOnClose);
127 setFocusPolicy(Qt::StrongFocus);
130 setMouseTracking(
true);
151 void (QComboBox::*_qComboBox_activated)(int) = &QComboBox::activated;
177 QToolButton* pFitBtn =
new QToolButton(
this);
178 pFitBtn->setIcon(QPixmap(
IMG(
"id_icon_fit_btn")));
179 pFitBtn->setText(
TR(
"id_fit_btn"));
180 pFitBtn->setToolTip(
TR(
"id_fit_btn"));
181 pFitBtn->setFixedSize(24, 24);
307 QVector3D fromTop{0, 10000, 0};
308 QVector3D toTop{0, 0, 0};
309 QVector3D upTop{0, 0, -1};
312 QVector3D fromBottom{0, -10000, 0};
313 QVector3D toBottom{0, 0, 0};
314 QVector3D upBottom{0, 0, -1};
317 QVector3D fromLeft{-500, 0, 0};
318 QVector3D toLeft{0, 0, 0};
319 QVector3D upLeft{0, 1, 0};
322 QVector3D fromRight{500, 0, 0};
323 QVector3D toRight{0, 0, 0};
324 QVector3D upRight{0, 1, 0};
327 QVector3D fromFront{0, 0, 500};
328 QVector3D toFront{0, 0, 0};
329 QVector3D upFront{0, 1, 0};
332 QVector3D fromRear{0, 0, -500};
333 QVector3D toRear{0, 0, 0};
334 QVector3D upRear{0, 1, 0};
337 QVector3D fromPersp{0, 10000, 10000};
338 QVector3D toPersp{0, 0, 0};
339 QVector3D upPersp{0, 1, 0};
342 QVector3D fromFree{0, 0, 0};
343 QVector3D toFree{0, 0, 0.1};
344 QVector3D upFree{0, 1, 0};
365 oColor.
r = fontColor[0];
366 oColor.
g = fontColor[1];
367 oColor.
b = fontColor[2];
485 void (QComboBox::*_qComboBox_activated)(int) = &QComboBox::activated;
554 return QWidget::close();
582 if (pParent ==
getTYApp()->getCurProjet())
617 bool showGridXY =
false;
618 bool showGridXZ =
false;
619 bool showGridZY =
false;
627 labelStr =
TR(
"id_top_view");
632 labelStr =
TR(
"id_bottom_view");
637 labelStr =
TR(
"id_left_view");
642 labelStr =
TR(
"id_right_view");
647 labelStr =
TR(
"id_front_view");
652 labelStr =
TR(
"id_rear_view");
657 labelStr =
TR(
"id_3d_view");
662 labelStr =
TR(
"id_free_view");
685 _pElement->getGraphicObject()->update(
true);
712 if (bUpdateGL ==
true)
810 TYApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
818 _pElement->getGraphicObject()->update(
true);
826 TYApplication::restoreOverrideCursor();
838 TYApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
845 _pElement->getGraphicObject()->update(
true);
853 TYApplication::restoreOverrideCursor();
871 TYApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
878 _pElement->getGraphicObject()->update(
true);
886 TYApplication::restoreOverrideCursor();
899 TYApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
906 _pElement->getGraphicObject()->update(
true);
914 TYApplication::restoreOverrideCursor();
931 double x = NAN, y = NAN, z = NAN;
936 pSetCameraCoordinates->exec();
938 if (pSetCameraCoordinates->result() == QDialog::Accepted)
955 QString filename = QFileDialog::getSaveFileName(
this, tr(
"Save Image"),
"",
956 tr(
"Images PNG (*.png);;Images JPEG (*.jpg *.jpeg)"));
957 if (!filename.isEmpty())
960 QImage img =
_pView->grabFramebuffer();
963 QPixmap pix = QPixmap::fromImage(img);
971 QImage img =
_pView->grabFramebuffer();
974 QClipboard* clipboard = QApplication::clipboard();
975 clipboard->setImage(img);
1015 if (pDialog->exec() == QDialog::Accepted)
1017 QPrinter* printer =
new QPrinter();
1019 QPrintDialog dialog(printer,
this);
1022 QPainter paint(printer);
1024 double w = double(printer->width());
1025 double h = double(printer->height());
1026 double scalew = w / 700;
1027 double scaleh = h / 700;
1030 QImage img =
_pView->grabFramebuffer();
1031 img = img.scaled(
int(w * 9 / 10),
int(h * 2 / 3), Qt::KeepAspectRatio, Qt::SmoothTransformation);
1032 int x = int(
double(printer->width() - img.width()) / 2);
1033 int y = int(
double(printer->height() - img.height()) * 1 / 3);
1034 QPixmap pm = QPixmap::fromImage(img);
1035 paint.drawPixmap(x, y, pm);
1037 paint.setFont(QFont(
"Times", (
int)(10 * scaleh)));
1039 int(w / 2) - int(paint.fontMetrics().horizontalAdvance(pDialog->
_lineEditTete->text()) / 2);
1042 mid = int(w / 2) - int(paint.fontMetrics().horizontalAdvance(pDialog->
_lineEditPied->text()) / 2);
1043 paint.drawText(mid, printer->height() - 20, pDialog->
_lineEditPied->text());
1045 paint.setFont(QFont(
"Times", (
int)(15 * scaleh), QFont::Bold));
1047 int(w / 2) - int(paint.fontMetrics().horizontalAdvance(pDialog->
_lineEditTitre->text()) / 2);
1050 x = int(50 * scalew);
1051 int x1 = int(w / 2);
1052 y = int(
double(printer->height()) * 2 / 3 + 20 * scaleh);
1053 int stepy = int(10 * scaleh);
1054 paint.setFont(QFont(
"Times", (
int)(10 * scaleh)));
1060 paint.drawText(x, y,
TR(
"id_print_nom_projet"));
1061 paint.drawText(x1, y, pProjet->
getName());
1066 paint.drawText(x, y,
TR(
"id_print_auteur_projet"));
1067 paint.drawText(x1, y, pProjet->
getAuteur());
1072 paint.drawText(x, y,
TR(
"id_print_date_creation"));
1075 paint.drawText(x, y,
TR(
"id_print_date_modif"));
1081 paint.drawText(x, y,
TR(
"id_print_comment"));
1082 paint.drawText(x1, y, pProjet->
getComment());
1089 y += int(
double(stepy) * 1.5);
1092 paint.drawText(x, y,
TR(
"id_print_nom_calcul"));
1093 paint.drawText(x1, y, pCalcul->
getName());
1098 paint.drawText(x, y,
TR(
"id_print_date_creation"));
1101 paint.drawText(x, y,
TR(
"id_print_date_modif"));
1107 paint.drawText(x, y,
TR(
"id_print_comment"));
1108 paint.drawText(x1, y, pCalcul->
getComment());
1115 y += int(
double(stepy) * 1.5);
1122 paint.drawText(x, y,
TR(
"id_print_nom_batiment"));
1123 paint.drawText(x1, y, pBatiment->
getName());
1131 paint.drawText(x, y,
TR(
"id_print_nom_machine"));
1132 paint.drawText(x1, y, pMachine->
getName());
1137 paint.drawText(x, y,
TR(
"id_print_constr"));
1143 paint.drawText(x, y,
TR(
"id_print_model"));
1144 paint.drawText(x1, y, pMachine->
getModele());
1149 paint.drawText(x, y,
TR(
"id_print_cat"));
1150 paint.drawText(x1, y, QString().setNum(pMachine->
getCategorie()));
1155 paint.drawText(x, y,
TR(
"id_print_comment"));
1162 if (pSite !=
nullptr)
1166 paint.drawText(x, y,
TR(
"id_print_nom_site"));
1167 paint.drawText(x1, y, pSite->
getName());
1182 if (
_pElement->edit(
this) == QDialog::Accepted)
1188 _pElement->getGraphicObject()->update(
true);
1201 if (pTYElementGraphic != NULL)
1211 OBox globalBoundingBox;
1216 if (pTYProjet !=
nullptr)
1219 pTYElement = pTYSiteNode;
1224 return globalBoundingBox;
1234 int visibilityStates[9];
1265 float xMin = globalBoundingBox.
_min.
_x;
1266 float xMax = globalBoundingBox.
_max.
_x;
1267 float yMin = globalBoundingBox.
_min.
_y;
1268 float yMax = globalBoundingBox.
_max.
_y;
1269 float zMin = globalBoundingBox.
_min.
_z;
1270 float zMax = globalBoundingBox.
_max.
_z;
1271 float xDist = std::max(abs(xMin), abs(xMax)) * 2;
1272 float yDist = std::max(abs(yMin), abs(yMax)) * 2;
1273 float zDist = std::max(abs(zMin), abs(zMax)) * 2;
1276 QVector3D fromTop{0, 10000, 0};
1277 QVector3D toTop{0, 0, 0};
1278 QVector3D upTop{0, 0, -1};
1283 QVector3D fromBottom{0, -10000, 0};
1284 QVector3D toBottom{0, 0, 0};
1285 QVector3D upBottom{0, 0, 1};
1290 QVector3D fromLeft{-500, 0, 0};
1291 QVector3D toLeft{0, 0, 0};
1292 QVector3D upLeft{0, 1, 0};
1296 QVector3D fromRight{500, 0, 0};
1297 QVector3D toRight{0, 0, 0};
1298 QVector3D upRight{0, 1, 0};
1302 QVector3D fromFront{0, 0, 500};
1303 QVector3D toFront{0, 0, 0};
1304 QVector3D upFront{0, 1, 0};
1308 QVector3D fromRear{0, 0, -500};
1309 QVector3D toRear{0, 0, 0};
1310 QVector3D upRear{0, 1, 0};
1314 QVector3D fromPersp{0, 1000, 1000};
1315 QVector3D toPersp{0, 0, 0};
1316 QVector3D upPersp{0, 1, 0};
1322 QVector3D fromFree{0, 0, 0};
1323 QVector3D toFree{0, 0, 0.1};
1324 QVector3D upFree{0, 1, 0};
1354 activeCamera->
setSize(viewport.width(), viewport.height());
1396 QVector3D extX, extY, extZ;
1464 double dist = org.distanceToPoint(org2);
1465 extX.setX(org.x() + dist);
1470 extY.setZ(org.z() - dist);
1472 extZ.setY(org.y() + dist);
1493 switch (pEvent->key())
1531 case Qt::Key_Control:
1535 if (pEvent->modifiers() == Qt::ControlModifier)
1549 TYApplication::sendEvent(
_pView, pEvent);
1555 switch (pEvent->key())
1557 case Qt::Key_Control:
1561 TYApplication::sendEvent(
_pView, pEvent);
1572 float* pos =
new float[3];
1583 QString msg(
"pos : (%1, %2, %3)");
1585 msg = msg.arg(pos[0], 0,
'f', 2).arg(-pos[2], 0,
'f', 2).arg(pos[1], 0,
'f', 2);
1593 double x = NAN, y = NAN, z = NAN;
1595 QString msg = QString(
"camera pos : (%1, %2, %3)").arg(x).arg(-z).arg(y);
1665 TYApplication::sendEvent(
_pView, pEvent);
1684 TYPreferenceManager::loadGeometryFromPreferences(metaObject()->className(),
this);
1692 TYPreferenceManager::saveGeometryToPreferences(metaObject()->className(),
this);
1727 int gridXMax = viewport.width();
1728 int gridYMax = viewport.height();
1745 if (xAxisPoint1 != xAxisPoint2)
1754 if (yAxisPoint1 != yAxisPoint2)
1765 _pElement->getGraphicObject()->update(force);
1807 float r = NAN, g = NAN, b = NAN;
1809 rendererColor[0] = r / 255;
1810 rendererColor[1] = g / 255;
1811 rendererColor[2] = b / 255;
1815 float r = rendererColor[0] * 255;
1816 float g = rendererColor[1] * 255;
1817 float b = rendererColor[2] * 255;
1826 float r = NAN, g = NAN, b = NAN;
1828 gridColor[0] = r / 255;
1829 gridColor[1] = g / 255;
1830 gridColor[2] = b / 255;
1834 float r = gridColor[0] * 255;
1835 float g = gridColor[1] * 255;
1836 float b = gridColor[2] * 255;
1843 float r = NAN, g = NAN, b = NAN;
1845 fontColor[0] = r / 255;
1846 fontColor[1] = g / 255;
1847 fontColor[2] = b / 255;
1851 float r = fontColor[0] * 255;
1852 float g = fontColor[1] * 255;
1853 float b = fontColor[2] * 255;
1863 float intensity = 0.83f;
1873 if (intensity < 0.1f)
1880 float precisPick = 3.0;
1893 float zoomStep = 1.0f;
1921 int mouseLeftButtonFunct3D = 3;
1924 mouseLeftButtonFunct3D =
1932 switch (mouseLeftButtonFunct3D)
1949 int mouseRightButtonFunct3D = 0;
1952 mouseRightButtonFunct3D =
1958 mouseRightButtonFunct3D);
1961 switch (mouseRightButtonFunct3D)
1978 int mouseMiddleButtonFunct3D = 2;
1981 mouseMiddleButtonFunct3D =
1987 mouseMiddleButtonFunct3D);
1990 switch (mouseMiddleButtonFunct3D)
2009 int mouseShiftLeftButtonFunct2D = 1;
2012 mouseShiftLeftButtonFunct2D =
2018 mouseShiftLeftButtonFunct2D);
2021 switch (mouseShiftLeftButtonFunct2D)
2032 int mouseShiftRightButtonFunct2D = 0;
2035 mouseShiftRightButtonFunct2D =
2041 mouseShiftRightButtonFunct2D);
2044 switch (mouseShiftRightButtonFunct2D)
2056 int mouseShiftLeftButtonFunct3D = 1;
2059 mouseShiftLeftButtonFunct3D =
2065 mouseShiftLeftButtonFunct3D);
2068 switch (mouseShiftLeftButtonFunct3D)
2085 int mouseShiftRightButtonFunct3D = 2;
2088 mouseShiftRightButtonFunct3D =
2094 mouseShiftRightButtonFunct3D);
2097 switch (mouseShiftRightButtonFunct3D)
2156 double value = pt0.distanceToPoint(pt1);
2158 int i = floor(log10(value));
2159 int n = floor(value / pow(10, i));
2160 if (n == 3 || n == 4)
2164 else if (n >= 6 && n <= 9)
2169 double distanceInRealWorld = n * pow(10, i);
2170 double distanceInDisplayWorld = 200.0 * distanceInRealWorld / value;
2171 QString max = QString().setNum(distanceInRealWorld,
'g', 3);
2172 QString mid = QString().setNum(distanceInRealWorld / 2,
'g', 3);
2191 QLocale loc = QLocale(QLocale::English);
2193 dialog.setLocale(loc);
2194 dialog.setWindowTitle(title);
2195 dialog.setLabelText(txt);
2196 dialog.setDoubleRange(
min, max);
2197 dialog.setTextValue(QString::number(val));
2198 dialog.setDoubleValue(val);
2199 dialog.setDoubleDecimals(dec);
2200 dialog.setInputMode(QInputDialog::TextInput);
2202 return dialog.doubleValue();
All base classes related to 3D manipulation.
gestion de l'interaction entre la vue graphique (2D ou 3D) et le clavier et la souris (fichier header...
TYApplication * getTYApp()
Retourne le pointeur sur l'application.
pour l'application Tympan (fichier header)
gestion de l'edition de la camera (fichier header)
gestion de zoom par zone selectionnee (fichier obsolete)(fichier header)
outil de mesure des distances (fichier header)
gestion des elements selectionnes par picking (fichier header)
#define TYDIRPREFERENCEMANAGER
OBox getBoundingBox(TYElement *pElement)
Classe generique pour une fenetre de modeleur (fichier header)
Realise le rendu VTK et le rendu OpenGL (fichier header)
gestion de l'element actionne par picking (fichier header)
gestion de la position selon les modes 'moving', 'rotation', 'edition' (fichier header)
Boite de dialogue des parametres d'impression (fichier header)
Repositionnement de la camera en fonction de coordonnees specifiees (fichier header)
Representation graphique d'une source lineique (fichier header)
Representation graphique d'une surface de source (fichier header)
OPoint3D _min
Minimal coordinates of the OBox.
OPoint3D _max
Maximal coordinates of the OBox.
double _y
y coordinate of OCoord3D
double _z
z coordinate of OCoord3D
double _x
x coordinate of OCoord3D
void setFromToUp(const QVector3D &_from, const QVector3D &_to, const QVector3D &_up)
void getTranslation(double &x, double &y, double &z)
void resetZoom(int w=-1, int h=-1)
void setTranslation(double x, double y, double z)
CameraType cameraType() const
void setSize(int w, int h)
void setDistanceStep(NxReal _magnitudeStepUp, NxReal _magnitudeStepFront, NxReal _magnitudeStepLeft)
void setVisibility(bool bVisible)
void setDisplayPosition(double displayPositionX, double displayPositionY)
void setShowGridXZ(bool bShow)
void setGridDimX(const float gridDimX)
void setShowGridXY(bool bShow)
void setGridDimY(const float gridDimY)
void setColor(const OColor &oColor)
void setShowGridZY(bool bShow)
void setGridStep(const float gridStep)
void setIntensity(const float intensity)
void init(int index, OPoint3D position, float intensity)
void setPoint2(const QVector3D &point2)
void setColor(const OColor &oColor)
void setLineWidth(float lineWidth)
void setPoint1(const QVector3D &point1)
void setSizes(float width, float height)
void setTexts(const std::string &text0, const std::string &text1, const std::string &text2)
void setFontColor(const OColor &oFontColor)
void setFont(const QString &qsFontPath)
void setPosition(const QVector3D &position)
void setColor(const OColor &oColor)
void setTextToDisplay(const QString &qsText)
void setFont(const QString &qsFontPath)
virtual const char * getClassName() const
T * _pObj
The real pointer, must derived IRefCount.
void setWheelStep(float step=1.0)
Met à jour le pas de zoom de la caméra.
virtual void close()
Appeler apres l'utilisation de l'editor.
static void snapToGrid(float &x, float &y, float &z, float &gridMagnStep)
Methode utilitaire qui adapte les coordonnees d'un point pour que celui-ci soit aligne avec la grille...
virtual void disconnect()
Deconnecte cet editor a l'interactor associe.
virtual void init()
Appeler avant l'utilisation de l'editor.
virtual void connect()
Connecte cet editor a l'interactor associe.
int getHistorySize()
Retourne la taille de l'historique.
void setHistorySize(int size)
Definit la taille de l'historique.
LPTYProjet getCurProjet()
Set/Get du projet courant.
TYCalculManager * getCalculManager()
Get du gestionnaire de calculs.
bool askForResetResultat()
Previent l'utilisateur que le resultat va etre efface, si celui-ci est valide.
QString getDateModif() const
Get modification date.
bool isInSelection(TYUUID id)
Tests if the element is present in the selection of this Calculation.
QString getDateCreation() const
Set/Get of creation date.
QString getComment() const
Get comments.
Gestion de l'edition en mode camera.
void setMiddleButtonFunction3D(void(TYCameraEditor::*function)())
void setRightButtonFunction3D(void(TYCameraEditor::*function)())
void setShiftRightButtonFunction3D(void(TYCameraEditor::*function)())
void setNavigationOnViewType(int view)
Switch auto entre navi 2D ou 3D.
void setShiftRightButtonFunction2D(void(TYCameraEditor::*function)())
void setLeftButtonFunction3D(void(TYCameraEditor::*function)())
void setShiftLeftButtonFunction2D(void(TYCameraEditor::*function)())
void stopCameraZoom()
Force l'arrêt du mode zoom de la caméra.
void setShiftLeftButtonFunction3D(void(TYCameraEditor::*function)())
void setWheelStep(float step)
gestion de zoom par zone selectionnee (obsolete)
outil de mesure des distances
static bool _gDrawNormals
Indique si les normals doivent etre visible.
static bool _gDrawPlafond
Indique si les plafonds doivent etre visible.
gestion des elements selectionnes par picking
TYElement * getParent() const
virtual QString getName() const
QString getModele() const
QString getCommentaire() const
QString getConstructeur() const
virtual void wheelEvent(QWheelEvent *pEvent)
QToolButton * _pSnapGridBtn
Button to activate the magnetic grid.
void setSnapGridActive(bool state)
virtual void closeEvent(QCloseEvent *pEvent)
void updateElementGraphic(bool force=false)
virtual void leaveEvent(QEvent *pEvent)
int _curViewType
The type of the current view.
QStatusBar * _pStatusBar
Status bar.
virtual bool computeCurPos(int x, int y, float *pos)
TYCameraEditor * _pCameraEditor
Manages the camera.
void showScale(bool show)
bool _editorModeAccepted
Indicates if the editing mode has been processed.
OGLScalarBarElement * _pOGLScalarBarElement
Graphic object for representing the scale.
QToolButton * _pShowRaysBtn
Button for displaying rays calculated by ray tracing.
virtual void setRenderModeSlot(int mode)
LPTYElement _pElement
A pointer to the element to edit.
void showPlafond(bool show)
QToolButton * _pShowScale
Button for displaying the scale.
virtual void enterEvent(QEvent *pEvent)
TYPositionEditor * _pPositionEditor
Editor for moving elements.
void setEditorModeToCamera()
TYCameraZoneEditor * _pCameraZoneEditor
Editor to define a zoom area for the camera.
OGLTextElement * _pOGLTextElement
2D label to display the type of view.
virtual void resizeEvent(QResizeEvent *pEvent)
TYAbstractSceneEditor * _pCurrentEditor
The current editor.
void setKeepRays(bool keepRays)
virtual ~TYModelerFrame()
void editorModeChanged(int mode)
OGLLineElement * _pOGLLineElementAxeX
Geometry of the Axes.
void setGridLinesActorsVisibility(bool showGridXY, bool showGridXZ, bool showGridZY)
QToolButton * _pShowPlafondBtn
Button for displaying the ceiling of buildings.
void viewTypeChanged(int)
bool _wireframeOnMovingCamera
Indicates whether to switch to wireframe rendering during camera movement.
QToolButton * _pShowNormalsBtn
Button for displaying normals.
virtual void focusInEvent(QFocusEvent *pEvent)
bool _snapGridActive
Indicates whether or not to activate the magnetic grid.
void setWireframeOnMovingCamera(bool state)
TYActionManager _actionManager
For managing the history.
OGLLightElement * _pLightElement
The default light.
QBoxLayout * _pCtrlLayout
The layout where buttons, etc., are located.
virtual void mouseMoveEvent(QMouseEvent *pEvent)
QGridLayout * _pLayout
The layout of this frame.
QToolButton * _pShowSourcesBtn
Button for displaying point sources.
OGLTextElement * _pOGLTextElementLabelY
virtual void setViewType(int view)
OGLLineElement * _pOGLLineElementX
X and Y axes of the grid.
QToolButton * _pGridBtn
Button to activate the grid.
bool isElementInCurrentProjet()
OGLGridElement * _pOGLGridElement
TYRenderWindowInteractor * _pView
The graphics window.
QToolButton * _pCopyBtn
Button for taking a screenshot.
virtual float getDefaultZCoord()
Returns default Z coordinate for editors This value will depend on the type of modeler and of the fix...
OBox getGlobalBoundingBox()
bool _showPlafond
Indicates whether or not to display or hide the ceiling of buildings.
void stopMovingRenderMode()
void showNormals(bool show)
OGLLineElement * _pOGLLineElementAxeZ
QComboBox * _pRenderModeBox
Combo box for rendering mode.
OGLTextElement * _pOGLTextElementLabelX
TYOpenGLRenderer::RenderMode getRenderMode()
bool _showGrid
Indicates whether to display the grid or not.
TYModelerFrame(QWidget *parent=0, const char *name=0, Qt::WindowFlags f=Qt::SubWindow)
bool _showNormals
Indicates whether or not to display or hide normals.
void setCameraCoordinates()
OGLTextElement * _pOGLTextElementLabelZ
bool isElementInCurrentCalcul()
bool askForResetResultat()
bool _showScale
Indicates whether to display the scale or not.
void eltModified(LPTYElement pElt)
int _lastEditorMode
To keep track of the last editing mode.
QToolButton * _pSetCameraCoordinatesBtn
Button to specify camera coordinates.
TYOpenGLRenderer::RenderMode _lastRenderMode
The last current rendering mode.
OGLLineElement * _pOGLLineElementAxeY
void updateCurPosInfo(int x, int y)
float _gridDimX
Grid dimension in X.
float _gridDimY
Grid dimension in Y.
void startMovingRenderMode()
TYElementPicker * _pPicker
For picking.
virtual void setRenderMode(TYOpenGLRenderer::RenderMode mode, bool bUpdateGL)
OGLCamera * _pOGLCameras[NbOfViews]
Cameras for each type of view.
float _gridStep
Grid step.
virtual void updatePreferences()
bool _showRays
Indicates whether or not to display rays.
TYPickEditor * _pPickEditor
Manages the context menu.
OGLLineElement * _pOGLLineElementY
float _gridMagnStep
Magnetic grid step.
QToolButton * _pScreenShotBtn
Button for saving a screenshot.
TYPickEditor * getPickEditor()
virtual void keyPressEvent(QKeyEvent *pEvent)
TYDistanceEditor * _pDistanceEditor
Tools for measuring.
virtual void setEditorMode(int mode)
virtual void updateView(bool clipping=true, bool axesAndGrid=true)
virtual void showEvent(QShowEvent *pEvent)
virtual void keyReleaseEvent(QKeyEvent *pEvent)
static double getDouble(const QString &title, const QString &txt, double min, double max, double val, bool &ok, int dec=2)
float _defaultZCoord
Default Z coordinate for editors.
TYOpenGLRenderer * getRenderer()
bool _showSources
Indicates whether or not to display point sources.
QComboBox * _pViewTypeBox
Combo box for selecting the current camera.
void addLight(OGLLightElement *pOGLElementLight)
void addOGLElement(OGLElement *pOGLElement)
void invalidateScene(void)
void removeOGLElement(OGLElement *pOGLElement)
void setBackground(double *bgColor)
void setRenderMode(RenderMode mode)
gestion de l'element actionne par picking
void usePopup(bool state)
void setPickTolerance(float tolerance)
void useHighlight(bool state)
gestion de la position selon les modes 'moving', 'rotation', 'edition'
void setPickPointPrecision(float precision)
void setAngleStep(float step)
classe pour une boite de dialogue des parametres d'impression.
QGroupBox * _groupBoxSite
QCheckBox * _checkBoxCatMachine
QCheckBox * _checkBoxDateProjet
QCheckBox * _checkBoxNomProjet
QCheckBox * _checkBoxNomBatiment
QCheckBox * _checkBoxNomSite
QCheckBox * _checkBoxDateCalcul
QCheckBox * _checkBoxCommentCalcul
QGroupBox * _groupBoxMachine
QCheckBox * _checkBoxNomCalcul
QGroupBox * _groupBoxCalcul
QLineEdit * _lineEditPied
QLineEdit * _lineEditTete
QCheckBox * _checkBoxCommentProjet
QCheckBox * _checkBoxNomMachine
QCheckBox * _checkBoxModelMachine
QGroupBox * _groupBoxProjet
QGroupBox * _groupBoxBatiment
QLineEdit * _lineEditTitre
QCheckBox * _checkBoxAuteurProjet
QCheckBox * _checkBoxConstrMachine
classe de definition d'un projet.
QString getDateModif() const
Get de la date de modification.
QString getAuteur() const
Get du nom de l'auteur.
QString getComment() const
Get des commentaires.
QString getDateCreation() const
Get de la date de creation.
LPTYSiteNode getSite()
Get du site.
LPTYCalcul getCurrentCalcul()
Set/Get du pointeur du Calcul courant.
static bool _gVisible
Indique si toutes les instances sont visibles.
QVector3D worldToDisplay(const QVector3D &world) const
QVector3D displayToWorld(const QVector3D &display) const
Le role de cette classe est limite a emettre des signaux pouvant etre utilise pour interagir sur le r...
void mouseMoved(int x, int y, Qt::MouseButtons button, Qt::KeyboardModifiers state)
void setActiveCamera(OGLCamera *pCamera)
const TYRenderViewport & getViewport() const
void showInfos(bool state)
TYOpenGLRenderer * getRenderer()
OGLCamera * getActiveCamera()
Repositionnement de la camera en fonction de coordonnees specifiees.
void setZCoord(int zCoord)
void setYCoord(int yCoord)
void setXCoord(int xCoord)
static bool _gVisible
Indique si toutes les instances sont visibles.
static bool _gVisible
Indique si toutes les instances sont visibles.