Class Extrusion

All Implemented Interfaces:
Pickable, Hintable, Renderable, Savable

public class Extrusion extends Mesh
An extrusion of a 2D object (Line) along a path (List of Vector3). Either a convenience constructor can be used or the updateGeometry method. It is also capable of doing a cubic spline interpolation for a list of supporting points
  • Constructor Details

  • Method Details

    • updateGeometry

      public void updateGeometry(Line shape, List<ReadOnlyVector3> path, ReadOnlyVector3 up)
      Update vertex, color, index and texture buffers (0) to contain an extrusion of shape along path.
      Parameters:
      shape - an instance of Line that describes the 2D shape
      path - a list of vectors that describe the path the shape should be extruded
      up - up vector
    • updateGeometry

      public void updateGeometry(Line shape, List<ReadOnlyVector3> path, boolean closed, ReadOnlyVector3 up)
      Update vertex, color, index and texture buffers (0) to contain an extrusion of shape along path.
      Parameters:
      shape - an instance of Line that describes the 2D shape
      path - a list of vectors that describe the path the shape should be extruded
      closed - true to connect first and last point
      up - up vector
    • updateGeometry

      public void updateGeometry(Line shape, List<ReadOnlyVector3> points, int segments, ReadOnlyVector3 up)
      Performs cubic spline interpolation to find a path through the supporting points where the second derivative is zero. Then calls updateGeometry(Line, List, ReadOnlyVector3) with this path.
      Parameters:
      shape - an instance of Line that describes the 2D shape
      points - a list of supporting points for the spline interpolation
      segments - number of resulting path segments per supporting point
      up - up vector
    • updateGeometry

      public void updateGeometry(Line shape, List<ReadOnlyVector3> points, int segments, boolean closed, ReadOnlyVector3 up)
      Performs cubic spline interpolation to find a path through the supporting points where the second derivative is zero. Then calls updateGeometry(Line, List, boolean, ReadOnlyVector3) with this path.
      Parameters:
      shape - an instance of Line that describes the 2D shape
      points - a list of supporting points for the spline interpolation
      segments - number of resulting path segments per supporting point
      closed - true to close the shape (connect last and first point)
      up - up vector