Class Polyhedron

java.lang.Object
eu.mihosoft.vrl.v3d.Polyhedron
All Implemented Interfaces:
Primitive

public class Polyhedron extends Object implements Primitive
Polyhedron.
Author:
Michael Hoffer <info@michaelhoffer.de>
  • Constructor Details Link icon

    • Polyhedron Link icon

      public Polyhedron(List<Vector3d> points, List<List<Integer>> faces)
      Constructor. Creates a polyhedron defined by a list of points and a list of faces.
      Parameters:
      points - points (Vector3d list)
      faces - list of faces (list of point index lists)
    • Polyhedron Link icon

      public Polyhedron(Vector3d[] points, Integer[][] faces)
      Constructor. Creates a polyhedron defined by a list of points and a list of faces.
      Parameters:
      points - points (Vector3d array)
      faces - list of faces (array of point index arrays)
  • Method Details Link icon

    • toPolygons Link icon

      public List<Polygon> toPolygons()
      Description copied from interface: Primitive
      Returns the polygons that define this primitive. Note: this method computes the polygons each time this method is called. The polygons can be cached inside a CSG object.
      Specified by:
      toPolygons in interface Primitive
      Returns:
      a list of polygons that define this primitive
    • getProperties Link icon

      public PropertyStorage getProperties()
      Description copied from interface: Primitive
      Returns the property storage of this primitive.
      Specified by:
      getProperties in interface Primitive
      Returns:
      the property storage of this primitive