All Packages  This Package  Class Hierarchy  Class Search  Index

Interface com.hermetica.gle.GLE

  Summary

public interface  GLE
{
          // Fields 28
     public static final int GLE_TEXTURE_ENABLE;
     public static final int GLE_TEXTURE_NORMAL_CYL;
     public static final int GLE_TEXTURE_NORMAL_FLAT;
     public static final int GLE_TEXTURE_NORMAL_MODEL_CYL;
     public static final int GLE_TEXTURE_NORMAL_MODEL_FLAT;
     public static final int GLE_TEXTURE_NORMAL_MODEL_SPH;
     public static final int GLE_TEXTURE_NORMAL_SPH;
     public static final int GLE_TEXTURE_STYLE_MASK;
     public static final int GLE_TEXTURE_VERTEX_CYL;
     public static final int GLE_TEXTURE_VERTEX_FLAT;
     public static final int GLE_TEXTURE_VERTEX_MODEL_CYL;
     public static final int GLE_TEXTURE_VERTEX_MODEL_FLAT;
     public static final int GLE_TEXTURE_VERTEX_MODEL_SPH;
     public static final int GLE_TEXTURE_VERTEX_SPH;
     public static final int SUMMARY;
     public static final int TUBE_CONTOUR_CLOSED;
     public static final int TUBE_JN_ANGLE;
     public static final int TUBE_JN_CAP;
     public static final int TUBE_JN_CUT;
     public static final int TUBE_JN_MASK;
     public static final int TUBE_JN_RAW;
     public static final int TUBE_JN_ROUND;
     public static final int TUBE_NORM_EDGE;
     public static final int TUBE_NORM_FACET;
     public static final int TUBE_NORM_MASK;
     public static final int TUBE_NORM_PATH_EDGE;
     public static final int VERBOSE;
     public static final String VERSION;

          // Methods 13
     public abstract void gleExtrusion(int, double[][], double[][], double[], int, double[][], float[][]) throws GLEException;
     public abstract int gleGetJoinStyle();
     public abstract void gleHelicoid(double, double, double, double, double, double[][], double[][], double, double) throws GLEException;
     public abstract void gleLathe(int, double[][], double[][], double[], double, double, double, double, double[][], double[][], double, double) throws GLEException;
     public abstract void glePolyCone(int, double[][], float[][], double[]) throws GLEException;
     public abstract void glePolyCylinder(int, double[][], float[][], double) throws GLEException;
     public abstract void gleScrew(int, double[][], double[][], double[], double, double, double) throws GLEException;
     public abstract void gleSetJoinStyle(int);
     public abstract void gleSpiral(int, double[][], double[][], double[], double, double, double, double, double[][], double[][], double, double) throws GLEException;
     public abstract void gleSuperExtrusion(int, double[][], double[][], double[], int, double[][], float[][], double[][][]) throws GLEException;
     public abstract void gleTextureMode(int);
     public abstract void gleToroid(double, double, double, double, double, double[][], double[][], double, double) throws GLEException;
     public abstract void gleTwistExtrusion(int, double[][], double[][], double[], int, double[][], float[][], double[]) throws GLEException;
}

Encapsulation of the routines supplied by the GLE Tubing and Extrusion library. All the constants defined with GLE are defined here also.

Version:
$Id: GLE.java,v 1.3 1998/05/02 12:06:39 descarte Exp descarte $
Author:
Alligator Descartes <http://www.arcana.co.uk>


  Cross Reference

Returned By:
ProfileGLE.getParent(), TraceGLE.getParent()

Implemented By:
CoreGLE, ProfileGLE, TraceGLE





  Fields

VERSION

Summary  |  Top
   public static final String VERSION

Version information


SUMMARY

Summary  |  Top
   public static final int SUMMARY

Summary execution mode of extended pipelines


VERBOSE

Summary  |  Top
   public static final int VERBOSE

Verbose execution mode of extended pipelines


TUBE_JN_RAW

Summary  |  Top
   public static final int TUBE_JN_RAW

Draw polycylinders, polycones, extrusions &c with no special treatment of the extrusion ends


TUBE_JN_ANGLE

Summary  |  Top
   public static final int TUBE_JN_ANGLE

Draw polyclyinders, polycones, extrusions &c by extending the different segments until the butt into each other with an angular style


TUBE_JN_CUT

Summary  |  Top
   public static final int TUBE_JN_CUT

Draw polycylinders, polycones, extrusions &c by joining together the different segments and slicing off the joint at half the angle between the segments. A cap is drawn. Note that the slicing plane runs through the origin of the contour coordinate system. Thus, the amount of slice can be varied by offsetting the contour with respect to the origin.

Note that when two segments meet at a shallow angle, the cut join style will potentially shave off a whole lot of the contour leading to ``surprising'' results.


TUBE_JN_ROUND

Summary  |  Top
   public static final int TUBE_JN_ROUND

Joints will be rounded. Strictly speaking, the part of the joint above the origin will be rounded. The part below the origin will come together in an angular join.


TUBE_JN_MASK

Summary  |  Top
   public static final int TUBE_JN_MASK

Mask bits. This can be used to mask off the bit field that defines the join style.


TUBE_JN_CAP

Summary  |  Top
   public static final int TUBE_JN_CAP

If this is set, a cap will be drawn at each end of the extrusion


TUBE_NORM_FACET

Summary  |  Top
   public static final int TUBE_NORM_FACET

A normal vector is generated per facet. Useful for having an extrusion have a ``faceted'' look.


TUBE_NORM_EDGE

Summary  |  Top
   public static final int TUBE_NORM_EDGE

Normal vectors are generated so that they lie along edges. Useful for making angular things look rounded under lighting. For example, when extruding a hexagon and using this flag, the hexagonal extrusion will look ( more like a ) smooth perfectly round cylinder, rather than a six-sided shape.


TUBE_NORM_PATH_EDGE

Summary  |  Top
   public static final int TUBE_NORM_PATH_EDGE

Normal vectors are generated so that they both lie on edges, and so that they interpolate between neighbouring segments. Useful for drawing ``spaghetti'' -- extrusions that follow a spline path. Because the spline path must be ``tessellated'' into small straight segments, each segment will look straight unless this flag is set.


TUBE_NORM_MASK

Summary  |  Top
   public static final int TUBE_NORM_MASK

A mask useful for masking out the ``norm'' bits


TUBE_CONTOUR_CLOSED

Summary  |  Top
   public static final int TUBE_CONTOUR_CLOSED

If this bit is set, the contour will be treated as a ``closed'' contour, where the last point connects back up to the first. It is useful to set this flag when drawing closed shapes ( such as extruded cylinders, star-shapes, I-Beams &c. When drawing open extrusions, e.g., corrugated sheet metal ), you DON'T want to set this flag!


GLE_TEXTURE_ENABLE

Summary  |  Top
   public static final int GLE_TEXTURE_ENABLE

If this bit is set the texturing is enabled. If this bit is NOT set, then automatic texture coordinate generation is disabled.


GLE_TEXTURE_STYLE_MASK

Summary  |  Top
   public static final int GLE_TEXTURE_STYLE_MASK

Bitmask containing the texture styles


GLE_TEXTURE_VERTEX_FLAT

Summary  |  Top
   public static final int GLE_TEXTURE_VERTEX_FLAT

Uses the vertex' ``x'' coordinate as the texture ``u'' coordinate and the accumulated segment length as the ``v'' coordinate.


GLE_TEXTURE_NORMAL_FLAT

Summary  |  Top
   public static final int GLE_TEXTURE_NORMAL_FLAT

Uses the normal vector's ``x'' coordinate as the texture ``u'' coordinate and the accumulated segment length as the ``v'' coordinate


GLE_TEXTURE_VERTEX_CYL

Summary  |  Top
   public static final int GLE_TEXTURE_VERTEX_CYL

Uses u = phi / ( 2 * PI ) = arctan ( vy / vx ) / ( 2 * PI ) as the texture ``u'' coordinate and the accumulated segment length as the ``v'' coordinate. In the above equation, ``vx'' and ``vy'' stand for the vertex' x and y coordinates


GLE_TEXTURE_NORMAL_CYL

Summary  |  Top
   public static final int GLE_TEXTURE_NORMAL_CYL

Uses u = phi / ( 2 * PI ) = arctan ( ny / nx ) / ( 2 * PI ) as the texture ``u'' coordinate and the accumulated segment length as the ``v'' coordinate. In the above equation, ``vx'' and ``vy'' stand for the normal's x and y coordinates


GLE_TEXTURE_VERTEX_SPH

Summary  |  Top
   public static final int GLE_TEXTURE_VERTEX_SPH

Uses u = phi / ( 2 * PI ) = arctan ( vy / vx ) / ( 2 * PI ) as the texture ``u'' coordinate and v = theta / PI = ( 1.0 - arccos( vz ) ) / PI as the texture ``v'' coordinate. In the above equation, ``vx'', ``vy'' and ``vz'' stand for the vertex' x, y and z coordinates


GLE_TEXTURE_NORMAL_SPH

Summary  |  Top
   public static final int GLE_TEXTURE_NORMAL_SPH

Uses u = phi / ( 2 * PI ) = arctan ( ny / nx ) / ( 2 * PI ) as the texture ``u'' coordinate and v = theta / PI = ( 1.0 - arccos( nz ) ) / PI as the texture ``v'' coordinate. In the above equation, ``nx'', ``ny'' and ``nz'' stand for the normal's x, y and z coordinates


GLE_TEXTURE_VERTEX_MODEL_FLAT

Summary  |  Top
   public static final int GLE_TEXTURE_VERTEX_MODEL_FLAT

Behaves as GLE_TEXTURE_VERTEX_FLAT except that the untransformed vertices are used. As a result, textures tend to ``stick'' to the extrusion according to the extrusion's local surface coordinates rather than according to real-space coordinates. This will, in general, provide the correct style of texture mapping when affine transforms are being applied to the contour since the coordinates used are those prior to the affine transform.


GLE_TEXTURE_NORMAL_MODEL_FLAT

Summary  |  Top
   public static final int GLE_TEXTURE_NORMAL_MODEL_FLAT

Behaves as GLE_TEXTURE_NORMAL_FLAT except that the untransformed vertices are used. As a result, textures tend to ``stick'' to the extrusion according to the extrusion's local surface coordinates rather than according to real-space coordinates. This will, in general, provide the correct style of texture mapping when affine transforms are being applied to the contour since the coordinates used are those prior to the affine transform.


GLE_TEXTURE_VERTEX_MODEL_CYL

Summary  |  Top
   public static final int GLE_TEXTURE_VERTEX_MODEL_CYL

Behaves as GLE_TEXTURE_VERTEX_CYL except that the untransformed vertices are used. As a result, textures tend to ``stick'' to the extrusion according to the extrusion's local surface coordinates rather than according to real-space coordinates. This will, in general, provide the correct style of texture mapping when affine transforms are being applied to the contour since the coordinates used are those prior to the affine transform.


GLE_TEXTURE_NORMAL_MODEL_CYL

Summary  |  Top
   public static final int GLE_TEXTURE_NORMAL_MODEL_CYL

Behaves as GLE_TEXTURE_NORMAL_CYL except that the untransformed vertices are used. As a result, textures tend to ``stick'' to the extrusion according to the extrusion's local surface coordinates rather than according to real-space coordinates. This will, in general, provide the correct style of texture mapping when affine transforms are being applied to the contour since the coordinates used are those prior to the affine transform.


GLE_TEXTURE_VERTEX_MODEL_SPH

Summary  |  Top
   public static final int GLE_TEXTURE_VERTEX_MODEL_SPH

Behaves as GLE_TEXTURE_VERTEX_SPH except that the untransformed vertices are used. As a result, textures tend to ``stick'' to the extrusion according to the extrusion's local surface coordinates rather than according to real-space coordinates. This will, in general, provide the correct style of texture mapping when affine transforms are being applied to the contour since the coordinates used are those prior to the affine transform.


GLE_TEXTURE_NORMAL_MODEL_SPH

Summary  |  Top
   public static final int GLE_TEXTURE_NORMAL_MODEL_SPH

Behaves as GLE_TEXTURE_NORMAL_SPH except that the untransformed vertices are used. As a result, textures tend to ``stick'' to the extrusion according to the extrusion's local surface coordinates rather than according to real-space coordinates. This will, in general, provide the correct style of texture mapping when affine transforms are being applied to the contour since the coordinates used are those prior to the affine transform.


  Methods

gleGetJoinStyle

Summary  |  Top

   public abstract int gleGetJoinStyle() 

Returns the current join style for connected extruded segments



gleSetJoinStyle

Summary  |  Top
   public abstract void gleSetJoinStyle(int style) 

Sets the current join style for connected extruded segments.

Parameter Description
style The new join style



gleTextureMode

Summary  |  Top
   public abstract void gleTextureMode(int mode) 

Sets the current texture coordinate generation mode

Parameter Description
mode Bitwise OR of texture flags



glePolyCylinder

Summary  |  Top
   public abstract void glePolyCylinder(int npoints, 
                                        double[][] pointArray, 
                                        float[][] colourArray, 
                                        double radius)  throws GLEException

Draws a polycylinder, specified as a polyline

Parameter Description
npoints The number of points in the polyline
pointArray An array of points specified as ( x, y, z )
colourArray An array of colors at each polyline vertex specified as RGB
radius The radius of the polycylinder



glePolyCone

Summary  |  Top
   public abstract void glePolyCone(int npoints, 
                                    double[][] pointArray, 
                                    float[][] colourArray, 
                                    double[] radiusArray)  throws GLEException

Draws a polycone specified as a polyline with radii

Parameter Description
npoints The number of points in the polyline
pointArray An array of points specified as ( x, y, z )
colourArray An array of colours at each polyline vertex specified as RGB
radiusArray An array containing the radii of the cone at each polyline vertex



gleExtrusion

Summary  |  Top
   public abstract void gleExtrusion(int ncp, 
                                     double[][] contour, 
                                     double[][] contourNormal, 
                                     double[] up, 
                                     int npoints, 
                                     double[][] pointArray, 
                                     float[][] colourArray)  throws GLEException

Extrudes an arbitrary 2D contour along an arbitrary 3D path.

Parameter Description
ncp The number of contour points
contour An array containing the points forming the 2D contour specified as ( x, y )
contourNormal An array containing the normals for each contour point
up The up vector for the contour
npoints The number of points in the 3D polyline
pointArray An array containing the vertices for the 3D polyline specified as ( x, y, z )
colourArray An array containing the colours at each polyline vertex specified as RGB



gleTwistExtrusion

Summary  |  Top
   public abstract void gleTwistExtrusion(int ncp, 
                                          double[][] contour, 
                                          double[][] contourNormal, 
                                          double[] up, 
                                          int npoints, 
                                          double[][] pointArray, 
                                          float[][] colourArray, 
                                          double[] twistArray)  throws GLEException

Extrudes an arbitrary 2D contour along a 3D path specifying local rotations ( twists ) as the contour is extruded.

Parameter Description
ncp The number of contour points
contour An array containing the points forming the 2D contour specified as ( x, y )
contourNormal An array containing the normals for each contour point
up The up vector for the contour
npoints The number of points in the 3D polyline
pointArray An array containing the vertices for the 3D polyline specified as ( x, y, z )
colourArray An array containing the colours at each polyline vertex specified as RGB
twistArray An array containing the twists to be applied at each contour point ( in degrees )



gleSuperExtrusion

Summary  |  Top
   public abstract void gleSuperExtrusion(int ncp, 
                                          double[][] contour, 
                                          double[][] contourNormal, 
                                          double[] up, 
                                          int npoints, 
                                          double[][] pointArray, 
                                          float[][] colourArray, 
                                          double[][][] xformArray)  throws GLEException

Extrudes an arbitrary 2D contour along a 3D path specifying local affine transformations as the contour is extruded.

Parameter Description
ncp The number of contour points
contour An array containing the points forming the 2D contour specified as ( x, y )
contourNormal An array containing the normals for each contour point
up The up vector for the contour
npoints The number of points in the 3D polyline
pointArray An array containing the vertices for the 3D polyline specified as ( x, y, z )
colourArray An array containing the colours at each polyline vertex specified as RGB
xformArray An array containing the affine transformations to be applied at each contour point ( in degrees )



gleSpiral

Summary  |  Top
   public abstract void gleSpiral(int ncp, 
                                  double[][] contour, 
                                  double[][] contourNormal, 
                                  double[] up, 
                                  double startRadius, 
                                  double drdTheta, 
                                  double startZ, 
                                  double dzdTheta, 
                                  double[][] startTransform, 
                                  double[][] dTransformdTheta, 
                                  double startTheta, 
                                  double sweepTheta)  throws GLEException

Sweep an arbitrary contour along a helical path.

Parameter Description
ncp The number of contour points
contour An array containing the points forming the 2D contour specified as ( x, y )
contourNormal An array containing the normals for each contour point
up The up vector for the contour
startRadius The spiral starts in XY plane
drdTheta The change in radius per revolution
startZ The starting Z value
dzdTheta The change in Z per revolution
startTransform The starting contour affine transformation
dTransformdTheta The tangent change transformation per revolution
startTheta The start angle in XY plane
sweepTheta The number of degrees to spiral around



gleLathe

Summary  |  Top
   public abstract void gleLathe(int ncp, 
                                 double[][] contour, 
                                 double[][] contourNormal, 
                                 double[] up, 
                                 double startRadius, 
                                 double drdTheta, 
                                 double startZ, 
                                 double dzdTheta, 
                                 double[][] startTransform, 
                                 double[][] dTransformdTheta, 
                                 double startTheta, 
                                 double sweepTheta)  throws GLEException

Sweep an arbitrary contour along a helical path. The sweep will be performed as a shear along the z-axis so that the orientation of the contour is displaced, rather than translated, as the contour is swept.

Parameter Description
ncp The number of contour points
contour An array containing the points forming the 2D contour specified as ( x, y )
contourNormal An array containing the normals for each contour point
up The up vector for the contour
startRadius The spiral starts in XY plane
drdTheta The change in radius per revolution
startZ The starting Z value
dzdTheta The change in Z per revolution
startTransform The starting contour affine transformation
dTransformdTheta The tangent change transformation per revolution
startTheta The start angle in XY plane
sweepTheta The number of degrees to spiral around



gleHelicoid

Summary  |  Top
   public abstract void gleHelicoid(double rToroid, 
                                    double startRadius, 
                                    double drdTheta, 
                                    double startZ, 
                                    double dzdTheta, 
                                    double[][] startTransform, 
                                    double[][] dTransformdTheta, 
                                    double startTheta, 
                                    double sweepTheta)  throws GLEException

Generalized Torus. Similar to gleSpiral() except contour is a circle. Uses gleSpiral() to draw.

Parameter Description
rToroid The circle contour radius
startRadius The spiral starts in XY plane
drdTheta The change in radius per revolution
startZ The starting Z value
dzdTheta The change in Z per revolution
startTransform The starting contour affine transformation
dTransformdTheta The tangent change transformation per revolution
startTheta The start angle in XY plane
sweepTheta The number of degrees to spiral around

See Also: gleSpiral



gleToroid

Summary  |  Top
   public abstract void gleToroid(double rToroid, 
                                  double startRadius, 
                                  double drdTheta, 
                                  double startZ, 
                                  double dzdTheta, 
                                  double[][] startTransform, 
                                  double[][] dTransformdTheta, 
                                  double startTheta, 
                                  double sweepTheta)  throws GLEException

Generalized Torus. Similar to gleLathe() except contour is a circle. Uses gleLathe() to draw.

Parameter Description
rToroid The circle contour radius
startRadius The spiral starts in XY plane
drdTheta The change in radius per revolution
startZ The starting Z value
dzdTheta The change in Z per revolution
startTransform The starting contour affine transformation
dTransformdTheta The tangent change transformation per revolution
startTheta The start angle in XY plane
sweepTheta The number of degrees to spiral around

See Also: gleSpiral



gleScrew

Summary  |  Top
   public abstract void gleScrew(int ncp, 
                                 double[][] contour, 
                                 double[][] contourNormal, 
                                 double[] up, 
                                 double startz, 
                                 double endz, 
                                 double twist)  throws GLEException

Draws screw-type shapes. Takes a contour and extrudes it along the z-axis from a start z-value of startz to and end z-value of endz. During the extrusion, it will spin the contour along the contour origin by twist degrees.

Parameter Description
ncp The number of contour points
contour An array containing the vertex data for the 2D contour specified as ( x, y )
contourNormal An array containing the normal data for the 2D contour
up The up vector for the contour
startz The start z-value for the segment
endz The end z-value for the segment
twist The number of rotations to be applied to the contour



All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.6