27 static const float SourceGraphicDefaultSize = 0.1f;
29 static const float SourceGraphicTypeUserSize = 2.0f;
46 float defaultSize = SourceGraphicDefaultSize;
59 float UserSrcSize = SourceGraphicTypeUserSize;
95 getElement()->getOrientation().normalize();
104 if (!getElement()->isInCurrentCalcul())
114 OColor color = getElement()->getColor();
116 int object = getElement()->getObject();
121 glGetFloatv(GL_CURRENT_COLOR, tmpColor);
128 if (mode == GL_COMPILE)
133 glColor3fv(tmpColor);
138 if (mode == GL_SELECT)
168 getElement()->getOrientation().normalize();
173 glVertex3f(pPt->
_x, pPt->
_y, pPt->
_z);
178 if (mode == GL_SELECT)
191 glNormal3f(0.0f, 1.0f, 0.0f);
197 glNormal3f(0.0f, -1.0f, 0.0f);
203 glNormal3f(0.0f, 0.0f, 1.0f);
209 glNormal3f(0.0f, 0.0f, -1.0f);
215 glNormal3f(-1.0f, 0.0f, 0.0f);
221 glNormal3f(1.0f, 0.0f, 0.0f);
232 glBegin(GL_TRIANGLES);
234 glNormal3f(0.0f, -1.0f, 0.5f);
239 glNormal3f(1.0f, 0.0f, 0.5f);
244 glNormal3f(0.0f, 1.0f, 0.5f);
249 glNormal3f(-1.0f, 0.0f, 0.5f);
258 glNormal3f(0.0f, 0.0f, -1.0f);
269 GLUquadricObj* qobj = gluNewQuadric();
270 glTranslatef(pPt->
_x, pPt->
_y, pPt->
_z);
271 gluSphere(qobj,
_size / 2.0f, 20, 20);
272 glTranslatef(-pPt->
_x, -pPt->
_y, -pPt->
_z);
273 gluDeleteQuadric(qobj);
278 glBegin(GL_TRIANGLES);
281 glNormal3f(0.0f, -1.0f, 0.5f);
286 glNormal3f(1.0f, 0.0f, 0.5f);
291 glNormal3f(0.0f, 1.0f, 0.5f);
296 glNormal3f(-1.0f, 0.0f, 0.5f);
302 glNormal3f(0.5f, -1.0f, 0.0f);
307 glNormal3f(0.5f, 0.0f, -1.0f);
312 glNormal3f(0.5f, 1.0f, 0.0f);
317 glNormal3f(0.5f, 0.0f, 1.0f);
323 glNormal3f(0.0f, 1.0f, 0.5f);
328 glNormal3f(-1.0f, 0.0f, 0.5f);
333 glNormal3f(0.0f, -1.0f, 0.5f);
338 glNormal3f(1.0f, 0.0f, 0.5f);
344 glNormal3f(0.5f, 1.0f, 0.0f);
349 glNormal3f(0.5f, 0.0f, 1.0f);
354 glNormal3f(0.5f, -1.0f, 0.0f);
359 glNormal3f(0.5f, 0.0f, -1.0f);
365 glNormal3f(0.0f, 0.5f, 1.0f);
370 glNormal3f(1.0f, 0.5f, 0.0f);
375 glNormal3f(0.0f, 0.5f, -1.0f);
380 glNormal3f(-1.0f, 0.5f, 0.0f);
386 glNormal3f(0.0f, 0.5f, -1.0f);
391 glNormal3f(-1.0f, 0.5f, 0.0f);
396 glNormal3f(0.0f, 0.5f, 1.0f);
401 glNormal3f(1.0f, 0.5f, 0.0f);
#define TYDIRPREFERENCEMANAGER
Gestion de la table de correspondance indice/element pour le picking (fichier header)
Representation graphique d'une source ponctuelle (fichier header)
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(TYElement *pModelerElement=nullptr)
static OBox _globalBoundingBox
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)
TYElement * _pElement
L'element metier auquel cet element graphique metier est associe.
void drawLineBoundingBox()
static void addElement(TYElement *pElt)
void drawCube(TYPoint *pPt) const
virtual void update(bool force=false)
Mise a jour.
void drawPyramid(TYPoint *pPt) const
float _size
Taille de la source.
void drawStar(TYPoint *pPt) const
virtual ~TYSourcePonctuelleGraphic()
virtual void display(TYElement *pModelerElement=nullptr, GLenum mode=GL_RENDER)
virtual void computeBoundingBox()
calcul de la boite englobante
TYSourcePonctuelleGraphic(TYSourcePonctuelle *pElement)
void drawSphere(TYPoint *pPt) const