Class EnlightablePolygon

    • Constructor Detail

      • EnlightablePolygon

        public EnlightablePolygon()
        Initializes an empty Polygon 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
      • updateCenter

        protected void updateCenter()
      • add

        public void add​(Point point)
        Add a point to the polygon.
      • hasAlpha

        public boolean hasAlpha()
      • 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)
        Retrieve a point from the Polygon.
        Returns:
        a Point3d.
      • size

        public int size()
        Indicates the number of points in this Polygon.
        Returns:
        the number of points
      • setColorMapper

        public void setColorMapper​(ColorMapper mapper)
      • setColor

        public void setColor​(Color color)
      • getColor

        public Color getColor()