toxi.geom
Class Cone

java.lang.Object
  extended by toxi.geom.Vec3D
      extended by toxi.geom.Cone
All Implemented Interfaces:
java.lang.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.


Nested Class Summary
 
Nested classes/interfaces inherited from class toxi.geom.Vec3D
Vec3D.Axis
 
Field Summary
 Vec3D dir
           
 float length
           
 float radiusNorth
           
 float radiusSouth
           
 
Fields inherited from class toxi.geom.Vec3D
MAX_VALUE, MIN_VALUE, x, X_AXIS, y, Y_AXIS, z, Z_AXIS, ZERO
 
Constructor Summary
Cone(ReadonlyVec3D pos, ReadonlyVec3D dir, float rNorth, float rSouth, float len)
          Constructs a new cone instance.
 
Method Summary
 Mesh3D toMesh(int steps)
           
 Mesh3D toMesh(int steps, float thetaOffset)
           
 Mesh3D toMesh(Mesh3D mesh, int steps, float thetaOffset, boolean topClosed, boolean bottomClosed)
           
 
Methods inherited from class toxi.geom.Vec3D
abs, add, add, add, addSelf, addSelf, angleBetween, angleBetween, clear, compareTo, constrain, constrain, copy, cross, cross, crossInto, crossSelf, distanceTo, distanceToSquared, dot, dot, equals, equalsWithTolerance, floor, frac, fromXYTheta, fromXZTheta, fromYZTheta, getAbs, getComponent, getComponent, getConstrained, getFloored, getFrac, getInverted, getLimited, getNormalized, getNormalizedTo, getReciprocal, getReflected, getRotatedAroundAxis, getRotatedX, getRotatedY, getRotatedZ, getSignum, hashCode, headingXY, headingXZ, headingYZ, immutable, interpolateTo, interpolateTo, interpolateTo, interpolateTo, interpolateToSelf, interpolateToSelf, invert, isInAABB, isInAABB, isMajorAxis, isZeroVector, jitter, jitter, jitter, jitter, jitter, jitter, limit, magnitude, magSquared, max, maxSelf, min, minSelf, modSelf, modSelf, normalize, normalizeTo, randomVector, randomVector, reciprocal, reflect, rotateAroundAxis, rotateX, rotateY, rotateZ, roundToAxis, scale, scale, scale, scale, scaleSelf, scaleSelf, scaleSelf, set, set, set, setComponent, setComponent, setXY, shuffle, signum, sub, sub, sub, subSelf, subSelf, to2DXY, to2DXZ, to2DYZ, toArray, toArray4, toCartesian, toSpherical, toString, x, y, z
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

dir

public Vec3D dir

radiusSouth

public float radiusSouth

radiusNorth

public float radiusNorth

length

public float length
Constructor Detail

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 Detail

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)