toxi.geom
Interface AxisAlignedCylinder

All Known Implementing Classes:
XAxisCylinder, YAxisCylinder, ZAxisCylinder

public interface AxisAlignedCylinder


Method Summary
 boolean containsPoint(Vec3D p)
          Checks if the given point is inside the cylinder.
 float getLength()
           
 Vec3D.Axis getMajorAxis()
           
 Vec3D getPosition()
          Returns the cylinder's position (centroid).
 float getRadius()
           
 void setLength(float length)
           
 void setPosition(Vec3D pos)
           
 void setRadius(float radius)
           
 TriangleMesh toMesh()
          Builds a TriangleMesh representation of the cylinder at a default resolution 30 degrees.
 TriangleMesh toMesh(int steps, float thetaOffset)
          Builds a TriangleMesh representation of the cylinder using the given number of steps and start angle offset.
 

Method Detail

containsPoint

boolean containsPoint(Vec3D p)
Checks if the given point is inside the cylinder.

Parameters:
p -
Returns:
true, if inside

getLength

float getLength()
Returns:
the length

getMajorAxis

Vec3D.Axis getMajorAxis()
Returns:
the cylinder's orientation axis

getPosition

Vec3D getPosition()
Returns the cylinder's position (centroid).

Returns:
the pos

getRadius

float getRadius()
Returns:
the cylinder radius

setLength

void setLength(float length)
Parameters:
length - the length to set

setPosition

void setPosition(Vec3D pos)
Parameters:
pos - the pos to set

setRadius

void setRadius(float radius)
Parameters:
radius -

toMesh

TriangleMesh toMesh()
Builds a TriangleMesh representation of the cylinder at a default resolution 30 degrees.

Returns:
mesh instance

toMesh

TriangleMesh toMesh(int steps,
                    float thetaOffset)
Builds a TriangleMesh representation of the cylinder using the given number of steps and start angle offset.

Parameters:
steps -
thetaOffset -
Returns:
mesh