Package toxi.geom

Class Cone

All Implemented Interfaces:
Comparable<ReadonlyVec3D>, ReadonlyVec3D

public class Cone extends Vec3D
A geometric definition of a cone (and cylinder as a special case) with support for mesh creation/representation. The class is currently still incomplete in that it doesn't provide any other features than the construction of a cone shaped mesh.
  • Field Details

    • dir

      public Vec3D dir
    • radiusSouth

      public float radiusSouth
    • radiusNorth

      public float radiusNorth
    • length

      public float length
  • Constructor Details

    • Cone

      public Cone(ReadonlyVec3D pos, ReadonlyVec3D dir, float rNorth, float rSouth, float len)
      Constructs a new cone instance.
      Parameters:
      pos - centre position
      dir - direction
      rNorth - radius on the side in the forward direction
      rSouth - radius on the side in the opposite direction
      len - length of the cone
  • Method Details

    • toMesh

      public Mesh3D toMesh(int steps)
    • toMesh

      public Mesh3D toMesh(int steps, float thetaOffset)
    • toMesh

      public Mesh3D toMesh(Mesh3D mesh, int steps, float thetaOffset, boolean topClosed, boolean bottomClosed)