41 for (
int i = 0; i < 4; i++)
44 (
float)(getElement()->_pts[i]._z));
53 glGetFloatv(GL_CURRENT_COLOR, color);
60 if (mode == GL_COMPILE)
64 glColor3f(color[0], color[1], color[2]);
76 glNormal3f(normal.
_x, normal.
_y, normal.
_z);
78 for (
int i = 0; i < 4; i++)
80 glVertex3f(getElement()->_pts[i]._x, getElement()->_pts[i]._y, getElement()->_pts[i]._z);
Representation graphique d'un rectangle (fichier header)
virtual void Enlarge(const OPoint3D &pt)
Enlarge the box with the point if the point is outside the box.
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
OVector3D normal(const OVector3D &vector2, const OVector3D &vector3) const
Computes the normal with this vector and 2 others.
void normalize()
Normalizes this vector.
classe graphique pour un element de base
void drawName(TYElement *pModelerElement=nullptr)
static OBox _globalBoundingBox
bool _visible
Inique si l'element est visible.
static bool _gDrawNormals
Indique si les normals doivent etre visible.
bool _highlight
Indique si le highlight est active pour cet element.
void displayNormal(OVector3D normal, OPoint3D p1)
virtual void update(bool force=false)
void drawLineBoundingBox()
virtual void update(bool force=false)
virtual void computeBoundingBox()
virtual ~TYRectangleGraphic()
TYRectangleGraphic(TYRectangle *pElement)
virtual void display(TYElement *pModelerElement=nullptr, GLenum mode=GL_RENDER)