Class RoundedCube

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

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

    • RoundedCube Link icon

      public RoundedCube()
      Constructor. Creates a new rounded cube with center [0,0,0] and dimensions [1,1,1].
    • RoundedCube Link icon

      public RoundedCube(double size)
      Constructor. Creates a new rounded cube with center [0,0,0] and dimensions [size,size,size].
      Parameters:
      size - size
    • RoundedCube Link icon

      public RoundedCube(Vector3d center, Vector3d dimensions)
      Constructor. Creates a new rounded cuboid with the specified center and dimensions.
      Parameters:
      center - center of the cuboid
      dimensions - cube dimensions
    • RoundedCube Link icon

      public RoundedCube(double w, double h, double d)
      Constructor. Creates a new rounded cuboid with center [0,0,0] and with the specified dimensions.
      Parameters:
      w - width
      h - height
      d - depth
  • 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
    • getCenter Link icon

      public Vector3d getCenter()
      Returns:
      the center
    • setCenter Link icon

      public void setCenter(Vector3d center)
      Parameters:
      center - the center to set
    • getDimensions Link icon

      public Vector3d getDimensions()
      Returns:
      the dimensions
    • setDimensions Link icon

      public void setDimensions(Vector3d dimensions)
      Parameters:
      dimensions - the dimensions to set
    • noCenter Link icon

      public RoundedCube noCenter()
      Defines that this cube will not be centered.
      Returns:
      this cube
    • getResolution Link icon

      public int getResolution()
      Returns:
      the resolution
    • setResolution Link icon

      public void setResolution(int resolution)
      Parameters:
      resolution - the resolution to set
    • resolution Link icon

      public RoundedCube resolution(int resolution)
      Parameters:
      resolution - the resolution to set
      Returns:
      this cube
    • getCornerRadius Link icon

      public double getCornerRadius()
      Returns:
      the corner radius
    • setCornerRadius Link icon

      public void setCornerRadius(double cornerRadius)
      Parameters:
      cornerRadius - the corner radius to set
    • cornerRadius Link icon

      public RoundedCube cornerRadius(double cornerRadius)
      Parameters:
      cornerRadius - the corner radius to set
      Returns:
      this cube