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)
814 TYApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
822 _pElement->getGraphicObject()->update(
true);
830 TYApplication::restoreOverrideCursor();
842 TYApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
849 _pElement->getGraphicObject()->update(
true);
857 TYApplication::restoreOverrideCursor();
875 TYApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
882 _pElement->getGraphicObject()->update(
true);
890 TYApplication::restoreOverrideCursor();
903 TYApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
910 _pElement->getGraphicObject()->update(
true);
918 TYApplication::restoreOverrideCursor();
935 double x = NAN, y = NAN, z = NAN;
940 pSetCameraCoordinates->exec();
942 if (pSetCameraCoordinates->result() == QDialog::Accepted)
959 QString filename = QFileDialog::getSaveFileName(
this, tr(
"Save Image"),
"",
960 tr(
"Images PNG (*.png);;Images JPEG (*.jpg *.jpeg)"));
961 if (!filename.isEmpty())
964 QImage img =
_pView->grabFramebuffer();
967 QPixmap pix = QPixmap::fromImage(img);
975 QImage img =
_pView->grabFramebuffer();
978 QClipboard* clipboard = QApplication::clipboard();
979 clipboard->setImage(img);
1019 if (pDialog->exec() == QDialog::Accepted)
1021 QPrinter* printer =
new QPrinter();
1023 QPrintDialog dialog(printer,
this);
1026 QPainter paint(printer);
1028 double w = double(printer->width());
1029 double h = double(printer->height());
1030 double scalew = w / 700;
1031 double scaleh = h / 700;
1034 QImage img =
_pView->grabFramebuffer();
1035 img = img.scaled(
int(w * 9 / 10),
int(h * 2 / 3), Qt::KeepAspectRatio, Qt::SmoothTransformation);
1036 int x = int(
double(printer->width() - img.width()) / 2);
1037 int y = int(
double(printer->height() - img.height()) * 1 / 3);
1038 QPixmap pm = QPixmap::fromImage(img);
1039 paint.drawPixmap(x, y, pm);
1041 paint.setFont(QFont(
"Times", (
int)(10 * scaleh)));
1043 int(w / 2) - int(paint.fontMetrics().horizontalAdvance(pDialog->
_lineEditTete->text()) / 2);
1046 mid = int(w / 2) - int(paint.fontMetrics().horizontalAdvance(pDialog->
_lineEditPied->text()) / 2);
1047 paint.drawText(mid, printer->height() - 20, pDialog->
_lineEditPied->text());
1049 paint.setFont(QFont(
"Times", (
int)(15 * scaleh), QFont::Bold));
1051 int(w / 2) - int(paint.fontMetrics().horizontalAdvance(pDialog->
_lineEditTitre->text()) / 2);
1054 x = int(50 * scalew);
1055 int x1 = int(w / 2);
1056 y = int(
double(printer->height()) * 2 / 3 + 20 * scaleh);
1057 int stepy = int(10 * scaleh);
1058 paint.setFont(QFont(
"Times", (
int)(10 * scaleh)));
1064 paint.drawText(x, y,
TR(
"id_print_nom_projet"));
1065 paint.drawText(x1, y, pProjet->
getName());
1070 paint.drawText(x, y,
TR(
"id_print_auteur_projet"));
1071 paint.drawText(x1, y, pProjet->
getAuteur());
1076 paint.drawText(x, y,
TR(
"id_print_date_creation"));
1079 paint.drawText(x, y,
TR(
"id_print_date_modif"));
1085 paint.drawText(x, y,
TR(
"id_print_comment"));
1086 paint.drawText(x1, y, pProjet->
getComment());
1093 y += int(
double(stepy) * 1.5);
1096 paint.drawText(x, y,
TR(
"id_print_nom_calcul"));
1097 paint.drawText(x1, y, pCalcul->
getName());
1102 paint.drawText(x, y,
TR(
"id_print_date_creation"));
1105 paint.drawText(x, y,
TR(
"id_print_date_modif"));
1111 paint.drawText(x, y,
TR(
"id_print_comment"));
1112 paint.drawText(x1, y, pCalcul->
getComment());
1119 y += int(
double(stepy) * 1.5);
1126 paint.drawText(x, y,
TR(
"id_print_nom_batiment"));
1127 paint.drawText(x1, y, pBatiment->
getName());
1135 paint.drawText(x, y,
TR(
"id_print_nom_machine"));
1136 paint.drawText(x1, y, pMachine->
getName());
1141 paint.drawText(x, y,
TR(
"id_print_constr"));
1147 paint.drawText(x, y,
TR(
"id_print_model"));
1148 paint.drawText(x1, y, pMachine->
getModele());
1153 paint.drawText(x, y,
TR(
"id_print_cat"));
1154 paint.drawText(x1, y, QString().setNum(pMachine->
getCategorie()));
1159 paint.drawText(x, y,
TR(
"id_print_comment"));
1166 if (pSite !=
nullptr)
1170 paint.drawText(x, y,
TR(
"id_print_nom_site"));
1171 paint.drawText(x1, y, pSite->
getName());
1186 if (
_pElement->edit(
this) == QDialog::Accepted)
1192 _pElement->getGraphicObject()->update(
true);
1205 if (pTYElementGraphic != NULL)
1215 OBox globalBoundingBox;
1220 if (pTYProjet !=
nullptr)
1223 pTYElement = pTYSiteNode;
1228 return globalBoundingBox;
1238 int visibilityStates[9];
1269 float xMin = globalBoundingBox.
_min.
_x;
1270 float xMax = globalBoundingBox.
_max.
_x;
1271 float yMin = globalBoundingBox.
_min.
_y;
1272 float yMax = globalBoundingBox.
_max.
_y;
1273 float zMin = globalBoundingBox.
_min.
_z;
1274 float zMax = globalBoundingBox.
_max.
_z;
1275 float xDist = std::max(abs(xMin), abs(xMax)) * 2;
1276 float yDist = std::max(abs(yMin), abs(yMax)) * 2;
1277 float zDist = std::max(abs(zMin), abs(zMax)) * 2;
1280 QVector3D fromTop{0, 10000, 0};
1281 QVector3D toTop{0, 0, 0};
1282 QVector3D upTop{0, 0, -1};
1287 QVector3D fromBottom{0, -10000, 0};
1288 QVector3D toBottom{0, 0, 0};
1289 QVector3D upBottom{0, 0, 1};
1294 QVector3D fromLeft{-500, 0, 0};
1295 QVector3D toLeft{0, 0, 0};
1296 QVector3D upLeft{0, 1, 0};
1300 QVector3D fromRight{500, 0, 0};
1301 QVector3D toRight{0, 0, 0};
1302 QVector3D upRight{0, 1, 0};
1306 QVector3D fromFront{0, 0, 500};
1307 QVector3D toFront{0, 0, 0};
1308 QVector3D upFront{0, 1, 0};
1312 QVector3D fromRear{0, 0, -500};
1313 QVector3D toRear{0, 0, 0};
1314 QVector3D upRear{0, 1, 0};
1318 QVector3D fromPersp{0, 1000, 1000};
1319 QVector3D toPersp{0, 0, 0};
1320 QVector3D upPersp{0, 1, 0};
1326 QVector3D fromFree{0, 0, 0};
1327 QVector3D toFree{0, 0, 0.1};
1328 QVector3D upFree{0, 1, 0};
1358 activeCamera->
setSize(viewport.width(), viewport.height());
1400 QVector3D extX, extY, extZ;
1468 double dist = org.distanceToPoint(org2);
1469 extX.setX(org.x() + dist);
1474 extY.setZ(org.z() - dist);
1476 extZ.setY(org.y() + dist);
1497 switch (pEvent->key())
1535 case Qt::Key_Control:
1539 if (pEvent->modifiers() == Qt::ControlModifier)
1553 TYApplication::sendEvent(
_pView, pEvent);
1559 switch (pEvent->key())
1561 case Qt::Key_Control:
1565 TYApplication::sendEvent(
_pView, pEvent);
1576 float* pos =
new float[3];
1587 QString msg(
"pos : (%1, %2, %3)");
1589 msg = msg.arg(pos[0], 0,
'f', 2).arg(-pos[2], 0,
'f', 2).arg(pos[1], 0,
'f', 2);
1597 double x = NAN, y = NAN, z = NAN;
1599 QString msg = QString(
"camera pos : (%1, %2, %3)").arg(x).arg(-z).arg(y);
1669 TYApplication::sendEvent(
_pView, pEvent);
1688 TYPreferenceManager::loadGeometryFromPreferences(metaObject()->className(),
this);
1696 TYPreferenceManager::saveGeometryToPreferences(metaObject()->className(),
this);
1731 int gridXMax = viewport.width();
1732 int gridYMax = viewport.height();
1749 if (xAxisPoint1 != xAxisPoint2)
1758 if (yAxisPoint1 != yAxisPoint2)
1769 _pElement->getGraphicObject()->update(force);
1811 float r = NAN, g = NAN, b = NAN;
1813 rendererColor[0] = r / 255;
1814 rendererColor[1] = g / 255;
1815 rendererColor[2] = b / 255;
1819 float r = rendererColor[0] * 255;
1820 float g = rendererColor[1] * 255;
1821 float b = rendererColor[2] * 255;
1830 float r = NAN, g = NAN, b = NAN;
1832 gridColor[0] = r / 255;
1833 gridColor[1] = g / 255;
1834 gridColor[2] = b / 255;
1838 float r = gridColor[0] * 255;
1839 float g = gridColor[1] * 255;
1840 float b = gridColor[2] * 255;
1847 float r = NAN, g = NAN, b = NAN;
1849 fontColor[0] = r / 255;
1850 fontColor[1] = g / 255;
1851 fontColor[2] = b / 255;
1855 float r = fontColor[0] * 255;
1856 float g = fontColor[1] * 255;
1857 float b = fontColor[2] * 255;
1867 float intensity = 0.83f;
1877 if (intensity < 0.1f)
1884 float precisPick = 3.0;
1897 float zoomStep = 1.0f;
1926 int mouseLeftButtonFunct2D = 1;
1929 mouseLeftButtonFunct2D =
1938 switch (mouseLeftButtonFunct2D)
1949 int mouseRightButtonFunct2D = 0;
1952 mouseRightButtonFunct2D =
1958 mouseRightButtonFunct2D);
1961 switch (mouseRightButtonFunct2D)
1972 int mouseMiddleButtonFunct2D = 0;
1975 mouseMiddleButtonFunct2D =
1981 mouseMiddleButtonFunct2D);
1984 switch (mouseMiddleButtonFunct2D)
1996 int mouseLeftButtonFunct3D = 3;
1999 mouseLeftButtonFunct3D =
2007 switch (mouseLeftButtonFunct3D)
2024 int mouseRightButtonFunct3D = 0;
2027 mouseRightButtonFunct3D =
2033 mouseRightButtonFunct3D);
2036 switch (mouseRightButtonFunct3D)
2053 int mouseMiddleButtonFunct3D = 2;
2056 mouseMiddleButtonFunct3D =
2062 mouseMiddleButtonFunct3D);
2065 switch (mouseMiddleButtonFunct3D)
2084 int mouseShiftLeftButtonFunct2D = 1;
2087 mouseShiftLeftButtonFunct2D =
2093 mouseShiftLeftButtonFunct2D);
2096 switch (mouseShiftLeftButtonFunct2D)
2107 int mouseShiftRightButtonFunct2D = 0;
2110 mouseShiftRightButtonFunct2D =
2116 mouseShiftRightButtonFunct2D);
2119 switch (mouseShiftRightButtonFunct2D)
2131 int mouseShiftLeftButtonFunct3D = 1;
2134 mouseShiftLeftButtonFunct3D =
2140 mouseShiftLeftButtonFunct3D);
2143 switch (mouseShiftLeftButtonFunct3D)
2160 int mouseShiftRightButtonFunct3D = 2;
2163 mouseShiftRightButtonFunct3D =
2169 mouseShiftRightButtonFunct3D);
2172 switch (mouseShiftRightButtonFunct3D)
2231 double value = pt0.distanceToPoint(pt1);
2233 int i = floor(log10(value));
2234 int n = floor(value / pow(10, i));
2235 if (n == 3 || n == 4)
2239 else if (n >= 6 && n <= 9)
2244 double distanceInRealWorld = n * pow(10, i);
2245 double distanceInDisplayWorld = 200.0 * distanceInRealWorld / value;
2246 QString max = QString().setNum(distanceInRealWorld,
'g', 3);
2247 QString mid = QString().setNum(distanceInRealWorld / 2,
'g', 3);
2266 QLocale loc = QLocale(QLocale::English);
2268 dialog.setLocale(loc);
2269 dialog.setWindowTitle(title);
2270 dialog.setLabelText(txt);
2271 dialog.setDoubleRange(
min, max);
2272 dialog.setTextValue(QString::number(val));
2273 dialog.setDoubleValue(val);
2274 dialog.setDoubleDecimals(dec);
2275 dialog.setInputMode(QInputDialog::TextInput);
2277 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 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)
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.