Class Geometry

    • Constructor Detail

      • Geometry

        public Geometry()
        Initializes an empty Geometry with face status defaulting to true, and wireframe status defaulting to false.
    • Method Detail

      • draw

        public void draw​(IPainter painter)
        Description copied from class: Drawable
        Call OpenGL2 routines for rendering the object.
        Specified by:
        draw in interface IGLRenderer
        Specified by:
        draw in class Drawable
      • drawFace

        protected void drawFace​(IPainter painter)
      • drawWireframe

        protected void drawWireframe​(IPainter painter)
      • callPointForWireframe

        protected void callPointForWireframe​(IPainter painter)
        Drawing the point list in wireframe mode
      • callPointsForFace

        protected void callPointsForFace​(IPainter painter)
        Drawing the point list in face mode (polygon content)
      • begin

        protected abstract void begin​(IPainter painter)
        Invoke GL begin with the actual geometry type GL#GL_POINTS, GL#GL_LINES, GL#GL_TRIANGLES, GL2#GL_POLYGON ...
      • add

        public void add​(float x,
                        float y,
                        float z)
      • add

        public void add​(Coord3d coord)
      • add

        public void add​(Point point)
      • add

        public void add​(Point point,
                        boolean updateBounds)
        Add a point to the polygon.
      • getBarycentre

        public Coord3d getBarycentre()
        Description copied from class: Drawable
        Return the barycentre of this object, which is computed as the center of its bounding box. If the bounding box is not available, the returned value is Coord3d.INVALID
        Overrides:
        getBarycentre in class Drawable
        Returns:
        the center of the bounding box, or Coord3d.INVALID.
      • get

        public Point get​(int p)
      • size

        public int size()
      • setPolygonMode

        public void setPolygonMode​(PolygonMode polygonMode)
        A null polygonMode imply no any call to gl.glPolygonMode(...) at rendering