49 TYElementGraphic* pTYElementGraphic = getElement()->getPalette()->getGraphicObject();
53 pTYElementGraphic = getElement()->getPanel()->getGraphicObject();
72 pRectangularMaillage->
getPalette()->getGraphicObject()->update(force);
83 int index1 = 0, index2 = 0;
84 unsigned long largeur = 0, hauteur = 0;
90 const unsigned int larg = largeur;
91 const unsigned int haut = hauteur;
95 for (
int i = 0; i < haut - 1; i++)
97 for (
int j = 0; j < larg; j++)
100 index1 = i * larg + j;
103 index2 = (i + 1) * larg + j;
104 pPtCalcul = pPtsCalcul->at(index2);
114 if (getElement()->etat() ==
false)
160 glGetIntegerv(GL_VIEWPORT, viewport);
161 unsigned int width = viewport[2];
162 unsigned int height = viewport[3];
164 GLfloat pointSize = NAN;
165 glGetFloatv(GL_POINT_SIZE, &pointSize);
167 glGetFloatv(GL_CURRENT_COLOR, tmpColor);
173 glColor3f(tmpColor[0], tmpColor[1], tmpColor[2]);
175 glPointSize(pointSize);
182 pTYPaletteGraphic->
display(renderContext);
188 pTYPanelGraphic->
display(renderContext);
202 bool antialiasing =
true;
235 size_t nbTriangles =
_mesh.size();
237 if (nbTriangles > 1000)
248 bmax = (bmax <= nbTriangles ? bmax : nbTriangles);
263 glBegin(GL_TRIANGLES);
264 for (
size_t i = bmin; i < bmax; i++)
275 glColor4f(color0.
r, color0.
g, color0.
b, opacity);
278 glColor4f(color1.
r, color1.
g, color1.
b, opacity);
281 glColor4f(color2.
r, color2.
g, color2.
b, opacity);
288 bmax = (bmax <= nbTriangles ? bmax : nbTriangles);
289 }
while (bmin < nbTriangles);
294 for (
size_t i = 0; i < nbTriangles; i = i + 2)
305 glColor4f(color0.
r, color0.
g, color0.
b, opacity);
308 glColor4f(color0.
r, color0.
g, color0.
b, opacity);
311 glColor4f(color0.
r, color0.
g, color0.
b, opacity);
314 glColor4f(color0.
r, color0.
g, color0.
b, opacity);
344 glGetFloatv(GL_LINE_WIDTH, &lw);
347 std::vector<MPoint>::iterator it;
360 glColor4f(1.0f - color.
r, 1.0f - color.
g, 1.0f - color.
b, opacity);
364 glColor4f(color.
r, color.
g, color.
b, opacity);
386 while ((pPtsCalcul->at(indice)->etat() ==
false) && (indice > 0))
All base classes related to 3D manipulation.
std::vector< LPTYPointCalcul > TYTabLPPointCalcul
Collection de pointeurs de TYPointCalcul.
#define TYDIRPREFERENCEMANAGER
Representation d'une palette graphique (fichier header)
Representation graphique d'un panel d'informations (fichier header)
Gestion de la table de correspondance indice/element pour le picking (fichier header)
Representation graphique d'un maillage rectangulaire (fichier header)
Contexte de rendu utilisé par les fonctions d'affichage.
@ Picking
The current render is only done for picking purpose.
@ Overlay
The current render pass is for overlay elements.
virtual void Enlarge(const OPoint3D &pt)
Enlarge the box with the point if the point is outside the box.
double _y
y coordinate of OCoord3D
double _z
z coordinate of OCoord3D
double _x
x coordinate of OCoord3D
classe graphique pour un element de base
void drawName(TYRenderContext &renderContext)
bool _visible
Inique si l'element est visible.
bool _highlight
Indique si le highlight est active pour cet element.
virtual void update(bool force=false)
void setVisible(bool visible=true)
TYTabLPPointCalcul & getPtsCalcul()
Set/Get de la liste des points de calcul.
void computeMesh(std::vector< MTriangle > &mesh) const
Compute the mesh.
void computeIsoCurve(std::vector< MTriangle > &mesh, std::vector< MPoint > &isoCurve) const
Compute the isocurve.
LPTYPanel getPanel()
Get du panel.
LPTYPalette getPalette()
Get de la palette (_pPalette)
Classe graphique pour representer une palette.
virtual void display(TYRenderContext &renderContext)
const OColor & getColorFromValue(values_type value) const
Set de la lookup table.
classe graphique pour un panel d'informations
virtual void display(TYRenderContext &renderContext)
static void addElement(TYElement *pElt)
Classe de definition d'un point de calcul.C'est une classe derivee a TYPoint avec en plus un spectrep...
std::vector< MPoint > _isoCurve
virtual void displaySurface(TYRenderContext &renderContext)
virtual OBox computeBoundingBox() const
virtual ~TYRectangularMaillageGraphic()
virtual void display(TYRenderContext &renderContext)
enum TYRectangularMaillageGraphic::RenderingMode _Rendering
virtual void displayMixed(TYRenderContext &renderContext)
virtual void update(bool force=false)
virtual void displayLines(TYRenderContext &renderContext, bool invertColors=false)
std::vector< MTriangle > _mesh
int nextPoint(const TYTabLPPointCalcul *pPtsCalcul, const int &index1, const int &index2)
TYRectangularMaillageGraphic(TYRectangularMaillage *pElement)
Classe de definition d'un maillage rectangulaire.
void getDimensionsAndSteps(unsigned long &x, unsigned long &y, OVector3D &stepx, OVector3D &stepy) const
Renvoie le nombre de lignes et de colonnes du maillage.En fonction de ses dimensions en 3D et de la d...
TYPalette::values_type scalar