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);
311 QVector3D fromTop{0, 10000, 0};
312 QVector3D toTop{0, 0, 0};
313 QVector3D upTop{0, 0, -1};
316 QVector3D fromBottom{0, -10000, 0};
317 QVector3D toBottom{0, 0, 0};
318 QVector3D upBottom{0, 0, -1};
321 QVector3D fromLeft{-500, 0, 0};
322 QVector3D toLeft{0, 0, 0};
323 QVector3D upLeft{0, 1, 0};
326 QVector3D fromRight{500, 0, 0};
327 QVector3D toRight{0, 0, 0};
328 QVector3D upRight{0, 1, 0};
331 QVector3D fromFront{0, 0, 500};
332 QVector3D toFront{0, 0, 0};
333 QVector3D upFront{0, 1, 0};
336 QVector3D fromRear{0, 0, -500};
337 QVector3D toRear{0, 0, 0};
338 QVector3D upRear{0, 1, 0};
341 QVector3D fromPersp{0, 10000, 10000};
342 QVector3D toPersp{0, 0, 0};
343 QVector3D upPersp{0, 1, 0};
346 QVector3D fromFree{0, 0, 0};
347 QVector3D toFree{0, 0, 0.1};
348 QVector3D upFree{0, 1, 0};
369 oColor.
r = fontColor[0];
370 oColor.
g = fontColor[1];
371 oColor.
b = fontColor[2];
489 void (QComboBox::*_qComboBox_activated)(int) = &QComboBox::activated;
558 return QWidget::close();
586 if (pParent ==
getTYApp()->getCurProjet())
621 bool showGridXY =
false;
622 bool showGridXZ =
false;
623 bool showGridZY =
false;
631 labelStr =
TR(
"id_top_view");
636 labelStr =
TR(
"id_bottom_view");
641 labelStr =
TR(
"id_left_view");
646 labelStr =
TR(
"id_right_view");
651 labelStr =
TR(
"id_front_view");
656 labelStr =
TR(
"id_rear_view");
661 labelStr =
TR(
"id_3d_view");
666 labelStr =
TR(
"id_free_view");
689 _pElement->getGraphicObject()->update(
true);
716 if (bUpdateGL ==
true)
811 TYApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
816 _pElement->getGraphicObject()->update(
true);
824 TYApplication::restoreOverrideCursor();
834 TYApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
841 _pElement->getGraphicObject()->update(
true);
849 TYApplication::restoreOverrideCursor();
867 TYApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
874 _pElement->getGraphicObject()->update(
true);
882 TYApplication::restoreOverrideCursor();
895 TYApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
902 _pElement->getGraphicObject()->update(
true);
910 TYApplication::restoreOverrideCursor();
927 double x = NAN, y = NAN, z = NAN;
932 pSetCameraCoordinates->exec();
934 if (pSetCameraCoordinates->result() == QDialog::Accepted)
951 QString filename = QFileDialog::getSaveFileName(
this, tr(
"Save Image"),
"",
952 tr(
"Images PNG (*.png);;Images JPEG (*.jpg *.jpeg)"));
953 if (!filename.isEmpty())
956 QImage img =
_pView->grabFramebuffer();
959 QPixmap pix = QPixmap::fromImage(img);
967 QImage img =
_pView->grabFramebuffer();
970 QClipboard* clipboard = QApplication::clipboard();
971 clipboard->setImage(img);
1011 if (pDialog->exec() == QDialog::Accepted)
1013 QPrinter* printer =
new QPrinter();
1015 QPrintDialog dialog(printer,
this);
1018 QPainter paint(printer);
1020 double w = double(printer->width());
1021 double h = double(printer->height());
1022 double scalew = w / 700;
1023 double scaleh = h / 700;
1026 QImage img =
_pView->grabFramebuffer();
1027 img = img.scaled(
int(w * 9 / 10),
int(h * 2 / 3), Qt::KeepAspectRatio, Qt::SmoothTransformation);
1028 int x = int(
double(printer->width() - img.width()) / 2);
1029 int y = int(
double(printer->height() - img.height()) * 1 / 3);
1030 QPixmap pm = QPixmap::fromImage(img);
1031 paint.drawPixmap(x, y, pm);
1033 paint.setFont(QFont(
"Times", (
int)(10 * scaleh)));
1035 int(w / 2) - int(paint.fontMetrics().horizontalAdvance(pDialog->
_lineEditTete->text()) / 2);
1038 mid = int(w / 2) - int(paint.fontMetrics().horizontalAdvance(pDialog->
_lineEditPied->text()) / 2);
1039 paint.drawText(mid, printer->height() - 20, pDialog->
_lineEditPied->text());
1041 paint.setFont(QFont(
"Times", (
int)(15 * scaleh), QFont::Bold));
1043 int(w / 2) - int(paint.fontMetrics().horizontalAdvance(pDialog->
_lineEditTitre->text()) / 2);
1046 x = int(50 * scalew);
1047 int x1 = int(w / 2);
1048 y = int(
double(printer->height()) * 2 / 3 + 20 * scaleh);
1049 int stepy = int(10 * scaleh);
1050 paint.setFont(QFont(
"Times", (
int)(10 * scaleh)));
1056 paint.drawText(x, y,
TR(
"id_print_nom_projet"));
1057 paint.drawText(x1, y, pProjet->
getName());
1062 paint.drawText(x, y,
TR(
"id_print_auteur_projet"));
1063 paint.drawText(x1, y, pProjet->
getAuteur());
1068 paint.drawText(x, y,
TR(
"id_print_date_creation"));
1071 paint.drawText(x, y,
TR(
"id_print_date_modif"));
1077 paint.drawText(x, y,
TR(
"id_print_comment"));
1078 paint.drawText(x1, y, pProjet->
getComment());
1085 y += int(
double(stepy) * 1.5);
1088 paint.drawText(x, y,
TR(
"id_print_nom_calcul"));
1089 paint.drawText(x1, y, pCalcul->
getName());
1094 paint.drawText(x, y,
TR(
"id_print_date_creation"));
1097 paint.drawText(x, y,
TR(
"id_print_date_modif"));
1103 paint.drawText(x, y,
TR(
"id_print_comment"));
1104 paint.drawText(x1, y, pCalcul->
getComment());
1111 y += int(
double(stepy) * 1.5);
1118 paint.drawText(x, y,
TR(
"id_print_nom_batiment"));
1119 paint.drawText(x1, y, pBatiment->
getName());
1127 paint.drawText(x, y,
TR(
"id_print_nom_machine"));
1128 paint.drawText(x1, y, pMachine->
getName());
1133 paint.drawText(x, y,
TR(
"id_print_constr"));
1139 paint.drawText(x, y,
TR(
"id_print_model"));
1140 paint.drawText(x1, y, pMachine->
getModele());
1145 paint.drawText(x, y,
TR(
"id_print_cat"));
1146 paint.drawText(x1, y, QString().setNum(pMachine->
getCategorie()));
1151 paint.drawText(x, y,
TR(
"id_print_comment"));
1158 if (pSite !=
nullptr)
1162 paint.drawText(x, y,
TR(
"id_print_nom_site"));
1163 paint.drawText(x1, y, pSite->
getName());
1178 if (
_pElement->edit(
this) == QDialog::Accepted)
1184 _pElement->getGraphicObject()->update(
true);
1197 if (pTYElementGraphic != NULL)
1207 OBox globalBoundingBox;
1212 if (pTYProjet !=
nullptr)
1215 pTYElement = pTYSiteNode;
1220 return globalBoundingBox;
1230 int visibilityStates[9];
1261 float xMin = globalBoundingBox.
_min.
_x;
1262 float xMax = globalBoundingBox.
_max.
_x;
1263 float yMin = globalBoundingBox.
_min.
_y;
1264 float yMax = globalBoundingBox.
_max.
_y;
1265 float zMin = globalBoundingBox.
_min.
_z;
1266 float zMax = globalBoundingBox.
_max.
_z;
1267 float xDist = std::max(abs(xMin), abs(xMax)) * 2;
1268 float yDist = std::max(abs(yMin), abs(yMax)) * 2;
1269 float zDist = std::max(abs(zMin), abs(zMax)) * 2;
1272 QVector3D fromTop{0, 10000, 0};
1273 QVector3D toTop{0, 0, 0};
1274 QVector3D upTop{0, 0, -1};
1279 QVector3D fromBottom{0, -10000, 0};
1280 QVector3D toBottom{0, 0, 0};
1281 QVector3D upBottom{0, 0, 1};
1286 QVector3D fromLeft{-500, 0, 0};
1287 QVector3D toLeft{0, 0, 0};
1288 QVector3D upLeft{0, 1, 0};
1292 QVector3D fromRight{500, 0, 0};
1293 QVector3D toRight{0, 0, 0};
1294 QVector3D upRight{0, 1, 0};
1298 QVector3D fromFront{0, 0, 500};
1299 QVector3D toFront{0, 0, 0};
1300 QVector3D upFront{0, 1, 0};
1304 QVector3D fromRear{0, 0, -500};
1305 QVector3D toRear{0, 0, 0};
1306 QVector3D upRear{0, 1, 0};
1310 QVector3D fromPersp{0, 1000, 1000};
1311 QVector3D toPersp{0, 0, 0};
1312 QVector3D upPersp{0, 1, 0};
1318 QVector3D fromFree{0, 0, 0};
1319 QVector3D toFree{0, 0, 0.1};
1320 QVector3D upFree{0, 1, 0};
1350 activeCamera->
setSize(viewport.width(), viewport.height());
1392 QVector3D extX, extY, extZ;
1460 double dist = org.distanceToPoint(org2);
1461 extX.setX(org.x() + dist);
1466 extY.setZ(org.z() - dist);
1468 extZ.setY(org.y() + dist);
1489 switch (pEvent->key())
1527 case Qt::Key_Control:
1531 if (pEvent->modifiers() == Qt::ControlModifier)
1545 TYApplication::sendEvent(
_pView, pEvent);
1551 switch (pEvent->key())
1553 case Qt::Key_Control:
1557 TYApplication::sendEvent(
_pView, pEvent);
1568 float* pos =
new float[3];
1579 QString msg(
"pos : (%1, %2, %3)");
1581 msg = msg.arg(pos[0], 0,
'f', 2).arg(-pos[2], 0,
'f', 2).arg(pos[1], 0,
'f', 2);
1589 double x = NAN, y = NAN, z = NAN;
1591 QString msg = QString(
"camera pos : (%1, %2, %3)").arg(x).arg(-z).arg(y);
1661 TYApplication::sendEvent(
_pView, pEvent);
1680 TYPreferenceManager::loadGeometryFromPreferences(metaObject()->className(),
this);
1688 TYPreferenceManager::saveGeometryToPreferences(metaObject()->className(),
this);
1723 int gridXMax = viewport.width();
1724 int gridYMax = viewport.height();
1741 if (xAxisPoint1 != xAxisPoint2)
1750 if (yAxisPoint1 != yAxisPoint2)
1761 _pElement->getGraphicObject()->update(force);
1803 float r = NAN, g = NAN, b = NAN;
1805 rendererColor[0] = r / 255;
1806 rendererColor[1] = g / 255;
1807 rendererColor[2] = b / 255;
1811 float r = rendererColor[0] * 255;
1812 float g = rendererColor[1] * 255;
1813 float b = rendererColor[2] * 255;
1822 float r = NAN, g = NAN, b = NAN;
1824 gridColor[0] = r / 255;
1825 gridColor[1] = g / 255;
1826 gridColor[2] = b / 255;
1830 float r = gridColor[0] * 255;
1831 float g = gridColor[1] * 255;
1832 float b = gridColor[2] * 255;
1839 float r = NAN, g = NAN, b = NAN;
1841 fontColor[0] = r / 255;
1842 fontColor[1] = g / 255;
1843 fontColor[2] = b / 255;
1847 float r = fontColor[0] * 255;
1848 float g = fontColor[1] * 255;
1849 float b = fontColor[2] * 255;
1859 float intensity = 0.83f;
1869 if (intensity < 0.1f)
1876 float precisPick = 3.0;
1889 float zoomStep = 1.0f;
1918 int mouseLeftButtonFunct2D = 1;
1921 mouseLeftButtonFunct2D =
1930 switch (mouseLeftButtonFunct2D)
1941 int mouseRightButtonFunct2D = 0;
1944 mouseRightButtonFunct2D =
1950 mouseRightButtonFunct2D);
1953 switch (mouseRightButtonFunct2D)
1964 int mouseMiddleButtonFunct2D = 0;
1967 mouseMiddleButtonFunct2D =
1973 mouseMiddleButtonFunct2D);
1976 switch (mouseMiddleButtonFunct2D)
1988 int mouseLeftButtonFunct3D = 3;
1991 mouseLeftButtonFunct3D =
1999 switch (mouseLeftButtonFunct3D)
2016 int mouseRightButtonFunct3D = 0;
2019 mouseRightButtonFunct3D =
2025 mouseRightButtonFunct3D);
2028 switch (mouseRightButtonFunct3D)
2045 int mouseMiddleButtonFunct3D = 2;
2048 mouseMiddleButtonFunct3D =
2054 mouseMiddleButtonFunct3D);
2057 switch (mouseMiddleButtonFunct3D)
2076 int mouseShiftLeftButtonFunct2D = 1;
2079 mouseShiftLeftButtonFunct2D =
2085 mouseShiftLeftButtonFunct2D);
2088 switch (mouseShiftLeftButtonFunct2D)
2099 int mouseShiftRightButtonFunct2D = 0;
2102 mouseShiftRightButtonFunct2D =
2108 mouseShiftRightButtonFunct2D);
2111 switch (mouseShiftRightButtonFunct2D)
2123 int mouseShiftLeftButtonFunct3D = 1;
2126 mouseShiftLeftButtonFunct3D =
2132 mouseShiftLeftButtonFunct3D);
2135 switch (mouseShiftLeftButtonFunct3D)
2152 int mouseShiftRightButtonFunct3D = 2;
2155 mouseShiftRightButtonFunct3D =
2161 mouseShiftRightButtonFunct3D);
2164 switch (mouseShiftRightButtonFunct3D)
2223 double value = pt0.distanceToPoint(pt1);
2225 int i = floor(log10(value));
2226 int n = floor(value / pow(10, i));
2227 if (n == 3 || n == 4)
2231 else if (n >= 6 && n <= 9)
2236 double distanceInRealWorld = n * pow(10, i);
2237 double distanceInDisplayWorld = 200.0 * distanceInRealWorld / value;
2238 QString max = QString().setNum(distanceInRealWorld,
'g', 3);
2239 QString mid = QString().setNum(distanceInRealWorld / 2,
'g', 3);
2258 QLocale loc = QLocale(QLocale::English);
2260 dialog.setLocale(loc);
2261 dialog.setWindowTitle(title);
2262 dialog.setLabelText(txt);
2263 dialog.setDoubleRange(
min, max);
2264 dialog.setTextValue(QString::number(val));
2265 dialog.setDoubleValue(val);
2266 dialog.setDoubleDecimals(dec);
2267 dialog.setInputMode(QInputDialog::TextInput);
2269 return dialog.doubleValue();
2278 return renderContext;
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)
@ Display
The current render is intended to be displayed on screen.
@ Default
The current render pass is for 3D elements.
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 setLeftButtonFunction2D(void(TYCameraEditor::*function)())
void setNavigationOnViewType(int view)
Switch auto entre navi 2D ou 3D.
void setMiddleButtonFunction2D(void(TYCameraEditor::*function)())
void setRightButtonFunction2D(void(TYCameraEditor::*function)())
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)
TYRenderWindowInteractor * getView()
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
virtual TYRenderContext createRenderContext()
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.
bool showDistributedSources
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)