All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class vlc.vrml.internal.geometry.Extrusion

java.lang.Object
   |
   +----vlc.vrml.generic.geometry.VrmlObject
           |
           +----vlc.vrml.internal.geometry.VrmlObject
                   |
                   +----vlc.vrml.internal.geometry.Geometry
                           |
                           +----vlc.vrml.internal.geometry.Extrusion

public class Extrusion
extends Geometry
JVerge

Version:
0.8 (beta 4) Copyright 1997 The Virtual Light Company under the GNU LGPL

The latest information and bugs in JVerge can be found at http://www.vlc.com.au/JVerge

For definition of the Extrusion node please see the VRML 97 Extrusion specification

Author:
Justin Couch justin@vlc.com.au

Constructor Index

 o Extrusion()
Default constructor.
 o Extrusion(boolean, boolean, boolean, float, float[][], boolean, float[][], float[][], boolean, float[][])
Constructor when you want to create a non-default Extrusion.
 o Extrusion(Browser)
Default constructor when you want to supply your own Browser reference.
 o Extrusion(Browser, boolean, boolean, boolean, float, float[][], boolean, float[][], float[][], boolean, float[][])
Constructor when you want to create a non-default Extrusion and supply your own Browser reference.

Method Index

 o cleanup()
Called just before a node is to be deleted by its parent.
 o clone()
Make a clone of this object
 o get_beginCap()
is the beginning end cap being used?
 o get_ccw()
Get the value of the ccw field.
 o get_convex()
Does the cross section represent a convex hull shape?
 o get_creaseAngle()
Get the value of the creaseAngle field.
 o get_crossSection()
Get the cross-section of the node.
 o get_endCap()
is the end cap being used?
 o get_orientation()
Get the orientations of the nodes in the spine.
 o get_scale()
Get the scales used in each node of the spine.
 o get_solid()
Get the value of the solid field.
 o get_spine()
Get the spine position values.
 o set_crossSection(float[][])
Set the cross-section of the node that is to be used.
 o set_orientation(float[][])
Set the orientations of the nodes in the spine.
 o set_scale(float[][])
Set the scales to be used in each node of the spine.
 o set_spine(float[][])
Set the spine position values.
 o writeToStream(int)
Prints the formatted contents of this node to the given stream.

Constructors

 o Extrusion
 public Extrusion()
Default constructor. Creates a default Extrusion

 o Extrusion
 public Extrusion(Browser b)
Default constructor when you want to supply your own Browser reference. Creates a default Extrusion

 o Extrusion
 public Extrusion(boolean beginCap,
                  boolean ccw,
                  boolean convex,
                  float creaseAngle,
                  float crossSection[][],
                  boolean endCap,
                  float orientation[][],
                  float scale[][],
                  boolean solid,
                  float spine[][])
Constructor when you want to create a non-default Extrusion.

Parameters:
beginCap - True if you want a cap on the beginning end.
ccw - True for Counter Clockwise ordering of the vertexes.
creaseAngle - The angle in radians below which smooth shading is used.
crossSection - The array of 2D points defining the cross section.
endCap - True if you want a cap on the final end.
orientation - An array of rotation angles in radians corresponding to each point on the spine
scale - An array of 2D scales corresponding to each point on the spine.
solid - True if the object is solid
spine - An array of 3D points specifying the spine of this object
 o Extrusion
 public Extrusion(Browser b,
                  boolean beginCap,
                  boolean ccw,
                  boolean convex,
                  float creaseAngle,
                  float crossSection[][],
                  boolean endCap,
                  float orientation[][],
                  float scale[][],
                  boolean solid,
                  float spine[][])
Constructor when you want to create a non-default Extrusion and supply your own Browser reference.

Parameters:
b - A valid Browser reference.
beginCap - True if you want a cap on the beginning end.
ccw - True for Counter Clockwise ordering of the vertexes.
creaseAngle - The angle in radians below which smooth shading is used.
crossSection - The array of 2D points defining the cross section.
endCap - True if you want a cap on the final end.
orientation - An array of rotation angles in radians corresponding to each point on the spine.
scale - An array of 2D scales corresponding to each point on the spine.
solid - True if the object is solid.
spine - An array of 3D points specifying the spine of this object.

Methods

 o cleanup
 public void cleanup()
Called just before a node is to be deleted by its parent.

Overrides:
cleanup in class VrmlObject
 o writeToStream
 public void writeToStream(int indent)
Prints the formatted contents of this node to the given stream.

Parameters:
indent - The number of spaces to indent this node in the string
Overrides:
writeToStream in class VrmlObject
 o get_beginCap
 public boolean get_beginCap()
is the beginning end cap being used?

Returns:
True if the begin cap is used.
 o get_ccw
 public boolean get_ccw()
Get the value of the ccw field.

Returns:
true if counter clockwise ordering is true. False if not
 o get_convex
 public boolean get_convex()
Does the cross section represent a convex hull shape?

Returns:
True if it is convex, false if not.
 o get_creaseAngle
 public float get_creaseAngle()
Get the value of the creaseAngle field.

Returns:
The angle in radians that shoiuld be the max for smooth shading.
 o set_crossSection
 public void set_crossSection(float sec[][])
Set the cross-section of the node that is to be used. The cross section is a standard 2D set of points only.

Parameters:
sec - Array of 2D points to make the cross section where sec[i][0] = x, sec[i][1] = y
 o get_crossSection
 public float[][] get_crossSection()
Get the cross-section of the node. The cross section is a standard 2D set of points only.

Returns:
Array of 2D points to make the cross section where sec[i][0] = x, sec[i][1] = y
 o get_endCap
 public boolean get_endCap()
is the end cap being used?

Returns:
True if the end cap is used.
 o set_orientation
 public void set_orientation(float coord[][])
Set the orientations of the nodes in the spine. The orientations are standard SFRotations.

Parameters:
coord - Array of 2D points to make the cross section where sec[i][0] = x, sec[i][1] = y, sec[i][2] = z, sec[i][3] = angle
 o get_orientation
 public float[][] get_orientation()
Get the orientations of the nodes in the spine. The orientations are standard SFRotations.

Returns:
Array of 2D points to make the cross section where sec[i][0] = x, sec[i][1] = y, sec[i][2] = z, sec[i][3] = angle
 o set_scale
 public void set_scale(float scale[][])
Set the scales to be used in each node of the spine.

Parameters:
scale. - Array of 2D scales where scale[i][0] = x scale factor, scale[i][1] = y scale factor
 o get_scale
 public float[][] get_scale()
Get the scales used in each node of the spine.

Returns:
Array of 2D scales where return[i][0] = x scale factor, return[i][1] = y scale factor
 o get_solid
 public boolean get_solid()
Get the value of the solid field. This is how the object knows to do backface culling of solid obejcts

Returns:
true if the object is regarded as solid. False if not
 o set_spine
 public void set_spine(float spine[][])
Set the spine position values.

Parameters:
spine - Array of 2D points to make the cross section where spine[i][0] = x, spine[i][1] = y, spine[i][2] = z
 o get_spine
 public float[][] get_spine()
Get the spine position values.

Returns:
Array of 2D scales where return[i][0] = x scale factor, return[i][1] = y scale factor
 o clone
 public Object clone()
Make a clone of this object

Returns:
A deep clone copy of this object
Overrides:
clone in class VrmlObject

All Packages  Class Hierarchy  This Package  Previous  Next  Index