JavaCAD
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
eu.mihosoft.vrl.v3d.Cylinder Class Reference
Inheritance diagram for eu.mihosoft.vrl.v3d.Cylinder:
Inheritance graph
[legend]
Collaboration diagram for eu.mihosoft.vrl.v3d.Cylinder:
Collaboration graph
[legend]

Public Member Functions

 Cylinder ()
 
 Cylinder (Vector3d start, Vector3d end, double radius, int numSlices)
 
 Cylinder (Vector3d start, Vector3d end, double startRadius, double endRadius, int numSlices)
 
 Cylinder (double radius, double height, int numSlices)
 
 Cylinder (double startRadius, double endRadius, double height, int numSlices)
 
 Cylinder (double radius, double height)
 
 Cylinder (double startRadius, double endRadius, double height)
 
 Cylinder (LengthParameter startRadius, LengthParameter endRadius, LengthParameter height, int numSlices)
 
 Cylinder (LengthParameter startRadius, LengthParameter height, int numSlices)
 
 Cylinder (LengthParameter startRadius, LengthParameter endRadius, LengthParameter height)
 
 Cylinder (LengthParameter startRadius, LengthParameter height)
 
List< PolygontoPolygons ()
 
Vector3d getStart ()
 
void setStart (Vector3d start)
 
Vector3d getEnd ()
 
void setEnd (Vector3d end)
 
double getStartRadius ()
 
void setStartRadius (double radius)
 
double getEndRadius ()
 
void setEndRadius (double radius)
 
int getNumSlices ()
 
void setNumSlices (int numSlices)
 
PropertyStorage getProperties ()
 
- Public Member Functions inherited from eu.mihosoft.vrl.v3d.Primitive
CSG toCSG ()
 

Private Member Functions

Vertex cylPoint (Vector3d axisX, Vector3d axisY, Vector3d axisZ, Vector3d ray, Vector3d s, double r, double stack, double slice, double normalBlend)
 

Private Attributes

Vector3d start
 
Vector3d end
 
double startRadius
 
double endRadius
 
int numSlices =defaultNumSlices
 
final PropertyStorage properties = new PropertyStorage()
 

Static Private Attributes

static final double MINIMUM_RADIUS =0.001
 
static int defaultNumSlices =16
 

Detailed Description

A solid cylinder.

The tessellation can be controlled via the numSlices parameter.

Author
Michael Hoffer <info@.nosp@m.mich.nosp@m.aelho.nosp@m.ffer.nosp@m..de>

Definition at line 51 of file Cylinder.java.

Constructor & Destructor Documentation

◆ Cylinder() [1/11]

eu.mihosoft.vrl.v3d.Cylinder.Cylinder ( )

Constructor. Creates a new cylinder with center

[0,0,0]

and ranging from

[0,-0.5,0]

to

[0,0.5,0]

, i.e.

size = 1

.

Definition at line 76 of file Cylinder.java.

References eu.mihosoft.vrl.v3d.Cylinder.defaultNumSlices.

◆ Cylinder() [2/11]

eu.mihosoft.vrl.v3d.Cylinder.Cylinder ( Vector3d  start,
Vector3d  end,
double  radius,
int  numSlices 
)

Constructor. Creates a cylinder ranging from

to

with the specified

radius

. The resolution of the tessellation can be controlled with

.

Parameters
startcylinder start
endcylinder end
radiuscylinder radius
numSlicesnumber of slices (used for tessellation)

Definition at line 94 of file Cylinder.java.

References eu.mihosoft.vrl.v3d.Cylinder.end, eu.mihosoft.vrl.v3d.Cylinder.MINIMUM_RADIUS, eu.mihosoft.vrl.v3d.Cylinder.numSlices, and eu.mihosoft.vrl.v3d.Cylinder.start.

◆ Cylinder() [3/11]

eu.mihosoft.vrl.v3d.Cylinder.Cylinder ( Vector3d  start,
Vector3d  end,
double  startRadius,
double  endRadius,
int  numSlices 
)

Constructor. Creates a cylinder ranging from

to

with the specified

radius

. The resolution of the tessellation can be controlled with

.

Parameters
startcylinder start
endcylinder end
startRadiuscylinder start radius
endRadiuscylinder end radius
numSlicesnumber of slices (used for tessellation)

Definition at line 113 of file Cylinder.java.

References eu.mihosoft.vrl.v3d.Cylinder.end, eu.mihosoft.vrl.v3d.Cylinder.endRadius, eu.mihosoft.vrl.v3d.Cylinder.MINIMUM_RADIUS, eu.mihosoft.vrl.v3d.Cylinder.numSlices, eu.mihosoft.vrl.v3d.Cylinder.start, and eu.mihosoft.vrl.v3d.Cylinder.startRadius.

◆ Cylinder() [4/11]

eu.mihosoft.vrl.v3d.Cylinder.Cylinder ( double  radius,
double  height,
int  numSlices 
)

Constructor. Creates a cylinder ranging from

[0,0,0]

to

[0,0,height]

with the specified

radius

and

height

. The resolution of the tessellation can be controlled with

.

Parameters
radiuscylinder radius
heightcylinder height
numSlicesnumber of slices (used for tessellation)

Definition at line 131 of file Cylinder.java.

References eu.mihosoft.vrl.v3d.Cylinder.MINIMUM_RADIUS, eu.mihosoft.vrl.v3d.Cylinder.numSlices, eu.mihosoft.vrl.v3d.Vector3d.times(), eu.mihosoft.vrl.v3d.Vector3d.Z_ONE, and eu.mihosoft.vrl.v3d.Vector3d.ZERO.

Here is the call graph for this function:

◆ Cylinder() [5/11]

eu.mihosoft.vrl.v3d.Cylinder.Cylinder ( double  startRadius,
double  endRadius,
double  height,
int  numSlices 
)

Constructor. Creates a cylinder ranging from

[0,0,0]

to

[0,0,height]

with the specified

radius

and

height

. The resolution of the tessellation can be controlled with

.

Parameters
startRadiuscylinder start radius
endRadiuscylinder end radius
heightcylinder height
numSlicesnumber of slices (used for tessellation)

Definition at line 150 of file Cylinder.java.

References eu.mihosoft.vrl.v3d.Cylinder.endRadius, eu.mihosoft.vrl.v3d.Cylinder.MINIMUM_RADIUS, eu.mihosoft.vrl.v3d.Cylinder.numSlices, eu.mihosoft.vrl.v3d.Cylinder.startRadius, eu.mihosoft.vrl.v3d.Vector3d.times(), eu.mihosoft.vrl.v3d.Vector3d.Z_ONE, and eu.mihosoft.vrl.v3d.Vector3d.ZERO.

Here is the call graph for this function:

◆ Cylinder() [6/11]

eu.mihosoft.vrl.v3d.Cylinder.Cylinder ( double  radius,
double  height 
)

Constructor. Creates a cylinder ranging from

[0,0,0]

to

[0,0,height]

with the specified

radius

and

height

. The resolution of the tessellation can be controlled with

.

Parameters
radiuscylinder radius
heightcylinder height

Definition at line 166 of file Cylinder.java.

References eu.mihosoft.vrl.v3d.Cylinder.MINIMUM_RADIUS, eu.mihosoft.vrl.v3d.Vector3d.times(), eu.mihosoft.vrl.v3d.Vector3d.Z_ONE, and eu.mihosoft.vrl.v3d.Vector3d.ZERO.

Here is the call graph for this function:

◆ Cylinder() [7/11]

eu.mihosoft.vrl.v3d.Cylinder.Cylinder ( double  startRadius,
double  endRadius,
double  height 
)

Constructor. Creates a cylinder ranging from

[0,0,0]

to

[0,0,height]

with the specified

radius

and

height

. The resolution of the tessellation can be controlled with

.

Parameters
startRadiuscylinder start radius
endRadiuscylinder end radius
heightcylinder height

Definition at line 183 of file Cylinder.java.

References eu.mihosoft.vrl.v3d.Cylinder.endRadius, eu.mihosoft.vrl.v3d.Cylinder.MINIMUM_RADIUS, eu.mihosoft.vrl.v3d.Cylinder.startRadius, eu.mihosoft.vrl.v3d.Vector3d.times(), eu.mihosoft.vrl.v3d.Vector3d.Z_ONE, and eu.mihosoft.vrl.v3d.Vector3d.ZERO.

Here is the call graph for this function:

◆ Cylinder() [8/11]

eu.mihosoft.vrl.v3d.Cylinder.Cylinder ( LengthParameter  startRadius,
LengthParameter  endRadius,
LengthParameter  height,
int  numSlices 
)

◆ Cylinder() [9/11]

eu.mihosoft.vrl.v3d.Cylinder.Cylinder ( LengthParameter  startRadius,
LengthParameter  height,
int  numSlices 
)

◆ Cylinder() [10/11]

eu.mihosoft.vrl.v3d.Cylinder.Cylinder ( LengthParameter  startRadius,
LengthParameter  endRadius,
LengthParameter  height 
)

◆ Cylinder() [11/11]

eu.mihosoft.vrl.v3d.Cylinder.Cylinder ( LengthParameter  startRadius,
LengthParameter  height 
)

Definition at line 204 of file Cylinder.java.

References eu.mihosoft.vrl.v3d.Cylinder.startRadius.

Member Function Documentation

◆ cylPoint()

Vertex eu.mihosoft.vrl.v3d.Cylinder.cylPoint ( Vector3d  axisX,
Vector3d  axisY,
Vector3d  axisZ,
Vector3d  ray,
Vector3d  s,
double  r,
double  stack,
double  slice,
double  normalBlend 
)
private

Cyl point.

Parameters
axisXthe axis x
axisYthe axis y
axisZthe axis z
raythe ray
sthe s
rthe r
stackthe stack
slicethe slice
normalBlendthe normal blend
Returns
the vertex

Definition at line 275 of file Cylinder.java.

References eu.mihosoft.vrl.v3d.Vector3d.plus(), and eu.mihosoft.vrl.v3d.Vector3d.times().

Referenced by eu.mihosoft.vrl.v3d.Cylinder.toPolygons().

Here is the call graph for this function:

◆ getEnd()

Vector3d eu.mihosoft.vrl.v3d.Cylinder.getEnd ( )

Gets the end.

Returns
the end

Definition at line 308 of file Cylinder.java.

References eu.mihosoft.vrl.v3d.Cylinder.end.

Referenced by eu.mihosoft.vrl.v3d.Cylinder.toPolygons().

◆ getEndRadius()

double eu.mihosoft.vrl.v3d.Cylinder.getEndRadius ( )

Gets the end radius.

Returns
the radius

Definition at line 344 of file Cylinder.java.

References eu.mihosoft.vrl.v3d.Cylinder.endRadius.

◆ getNumSlices()

int eu.mihosoft.vrl.v3d.Cylinder.getNumSlices ( )

Gets the num slices.

Returns
the number of slices

Definition at line 362 of file Cylinder.java.

References eu.mihosoft.vrl.v3d.Cylinder.numSlices.

◆ getProperties()

PropertyStorage eu.mihosoft.vrl.v3d.Cylinder.getProperties ( )

Returns the property storage of this primitive.

Returns
the property storage of this primitive

Reimplemented from eu.mihosoft.vrl.v3d.Primitive.

Definition at line 379 of file Cylinder.java.

References eu.mihosoft.vrl.v3d.Cylinder.properties.

◆ getStart()

Vector3d eu.mihosoft.vrl.v3d.Cylinder.getStart ( )

Gets the start.

Returns
the start

Definition at line 290 of file Cylinder.java.

References eu.mihosoft.vrl.v3d.Cylinder.start.

Referenced by eu.mihosoft.vrl.v3d.Cylinder.toPolygons().

◆ getStartRadius()

double eu.mihosoft.vrl.v3d.Cylinder.getStartRadius ( )

Gets the start radius.

Returns
the radius

Definition at line 326 of file Cylinder.java.

References eu.mihosoft.vrl.v3d.Cylinder.startRadius.

◆ setEnd()

void eu.mihosoft.vrl.v3d.Cylinder.setEnd ( Vector3d  end)

Sets the end.

Parameters
endthe end to set

Definition at line 317 of file Cylinder.java.

References eu.mihosoft.vrl.v3d.Cylinder.end.

◆ setEndRadius()

void eu.mihosoft.vrl.v3d.Cylinder.setEndRadius ( double  radius)

Sets the end radius.

Parameters
radiusthe radius to set

Definition at line 353 of file Cylinder.java.

◆ setNumSlices()

void eu.mihosoft.vrl.v3d.Cylinder.setNumSlices ( int  numSlices)

Sets the num slices.

Parameters
numSlicesthe number of slices to set

Definition at line 371 of file Cylinder.java.

References eu.mihosoft.vrl.v3d.Cylinder.numSlices.

◆ setStart()

void eu.mihosoft.vrl.v3d.Cylinder.setStart ( Vector3d  start)

Sets the start.

Parameters
startthe start to set

Definition at line 299 of file Cylinder.java.

References eu.mihosoft.vrl.v3d.Cylinder.start.

◆ setStartRadius()

void eu.mihosoft.vrl.v3d.Cylinder.setStartRadius ( double  radius)

Sets the start radius.

Parameters
radiusthe radius to set

Definition at line 335 of file Cylinder.java.

◆ toPolygons()

List<Polygon> eu.mihosoft.vrl.v3d.Cylinder.toPolygons ( )

Member Data Documentation

◆ defaultNumSlices

int eu.mihosoft.vrl.v3d.Cylinder.defaultNumSlices =16
staticprivate

Definition at line 63 of file Cylinder.java.

Referenced by eu.mihosoft.vrl.v3d.Cylinder.Cylinder().

◆ end

Vector3d eu.mihosoft.vrl.v3d.Cylinder.end
private

◆ endRadius

double eu.mihosoft.vrl.v3d.Cylinder.endRadius
private

◆ MINIMUM_RADIUS

final double eu.mihosoft.vrl.v3d.Cylinder.MINIMUM_RADIUS =0.001
staticprivate

Definition at line 52 of file Cylinder.java.

Referenced by eu.mihosoft.vrl.v3d.Cylinder.Cylinder().

◆ numSlices

int eu.mihosoft.vrl.v3d.Cylinder.numSlices =defaultNumSlices
private

◆ properties

final PropertyStorage eu.mihosoft.vrl.v3d.Cylinder.properties = new PropertyStorage()
private

The properties.

Definition at line 69 of file Cylinder.java.

Referenced by eu.mihosoft.vrl.v3d.Cylinder.getProperties(), and eu.mihosoft.vrl.v3d.Cylinder.toPolygons().

◆ start

Vector3d eu.mihosoft.vrl.v3d.Cylinder.start
private

◆ startRadius

double eu.mihosoft.vrl.v3d.Cylinder.startRadius
private

The documentation for this class was generated from the following file: