net.jbeans.j3d.modeler.geometry
Class SurfaceModeler

java.lang.Object
  extended bynet.jbeans.j3d.modeler.geometry.GeometryModeler
      extended bynet.jbeans.j3d.modeler.geometry.SurfaceModeler
All Implemented Interfaces:
javax.media.j3d.GeometryUpdater, java.io.Serializable
Direct Known Subclasses:
PolygonModeler, QuadModeler

public abstract class SurfaceModeler
extends GeometryModeler

SurfaceModeler generates a suface geometry from the specified data.

Version:
$Revision: 1.4 $
Author:
Masahiro Takatsuka (masa@jbeans.net)
See Also:
GeometryModeler, Serialized Form

Field Summary
static int ADVANCE_NORMAL
           
protected  double[] alpha
           
protected  double[] color
           
protected  int colorDim
           
protected  int[] colorIndices
           
protected  javax.vecmath.Color3f[] colors3f
           
protected  javax.vecmath.Color4f[] colors4f
           
protected  boolean computeNormalsOnUpdate
           
protected  int[] contourCounts
           
protected  int coordDim
           
protected  int[] coordinateIndices
           
protected  javax.vecmath.Point3f[] coords3f
           
protected  double creaseAngle
           
protected  java.lang.Object[] entryArray
           
protected  int[] essentials
           
protected  GeometryInfo geomInfo
           
protected  boolean hasColors
           
protected  boolean hasTCoords
           
protected  ColorLookupTable lookupTable
           
static int NAIVE_NORMAL
           
protected  double[][] normal
           
protected  int normalDim
           
protected  NormalGenerator normalgen
           
protected  int[] normalIndices
           
protected  javax.vecmath.Vector3f[] normals3f
           
protected  int primitive
           
(package private) static com.sun.j3d.utils.geometry.Stripifier sStripifier
           
(package private) static com.sun.j3d.utils.geometry.Triangulator sTriangulator
           
protected  int[] stripCounts
           
protected  int tCoordDim
           
protected  double[][] tCoords
           
protected  int[] texCoordIndices
           
protected  javax.vecmath.TexCoord2f[] texCoords2f
           
protected  javax.vecmath.TexCoord3f[] texCoords3f
           
protected  double[] tmp
           
protected  int totalIndex
           
protected  double[] x
           
protected  double[] y
           
protected  double[] z
           
 
Fields inherited from class net.jbeans.j3d.modeler.geometry.GeometryModeler
bounds, center, geometryListeners, geoms, SCALAR_MODE_DEFAULT, SCALAR_MODE_USE_CELL_DATA, SCALAR_MODE_USE_POINT_DATA, scalarMode
 
Constructor Summary
SurfaceModeler()
           
 
Method Summary
protected abstract  boolean checkSize()
           
protected static javax.vecmath.Vector3f geomCalcTriNormals(javax.vecmath.Point3f point3f, javax.vecmath.Point3f point3f1, javax.vecmath.Point3f point3f2)
           
 boolean getComputeNormalsOnUpdate()
           
 double getCreaseAngle()
           
 ColorLookupTable getLookupTable()
           
 int getPrimitive()
           
protected abstract  void initGeometry()
           
protected  void initialize()
           
 boolean isComputeNormalsOnUpdate()
          Get the value of computeNormalsOnUpdate.
protected  boolean isDataReady()
           
protected  void modelGeometry()
          Construct a javax.media.j3d.GeometryArray object from geometry information.
protected abstract  boolean needsModel()
           
(package private)  void setColorIndices(int[] colorIndices)
           
 void setColorLookupTable(ColorLookupTable lookupTable)
           
(package private)  void setColors(double[] color)
           
 void setColorTable(java.awt.Color[] colors)
           
 void setComputeNormalsOnUpdate(boolean v)
          Set the value of computeNormalsOnUpdate.
(package private)  void setContourCounts(int[] contourcounts)
           
(package private)  void setCoordinateIndices(int[] coordinateIndices)
           
 void setCreaseAngle(double angle)
           
protected abstract  void setData()
           
(package private)  void setNormalIndices(int[] normalIndices)
           
(package private)  void setNormals(double[][] normal)
           
 void setPrimitive(int primitive)
           
(package private)  void setStripCounts(int[] stripcounts)
           
(package private)  void setTextureCoordinateIndices(int[] texCoordIndices)
           
(package private)  void setTextureCoords(double[][] tCoords)
           
(package private)  void setTransparency(double[] alpha)
           
(package private)  void setupGeometryInfo()
           
protected  void setValueAt(int index, java.lang.Object value)
           
(package private)  void setXCoordinates(double[] x)
           
(package private)  void setYCoordinates(double[] y)
           
(package private)  void setZCoordinates(double[] z)
           
 void updateData(javax.media.j3d.Geometry geom)
           
 
Methods inherited from class net.jbeans.j3d.modeler.geometry.GeometryModeler
addGeometry, addGeometry, addGeometryListener, clearGeometry, getBounds, getBounds, getCenter, getGeometries, getGeometry, getLength, model, removeGeometryListener, setGeometry, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAIVE_NORMAL

public static final int NAIVE_NORMAL
See Also:
Constant Field Values

ADVANCE_NORMAL

public static final int ADVANCE_NORMAL
See Also:
Constant Field Values

sTriangulator

static com.sun.j3d.utils.geometry.Triangulator sTriangulator

sStripifier

static com.sun.j3d.utils.geometry.Stripifier sStripifier

totalIndex

protected transient int totalIndex

essentials

protected transient int[] essentials

entryArray

protected transient java.lang.Object[] entryArray

tmp

protected transient double[] tmp

normalgen

protected transient NormalGenerator normalgen

geomInfo

protected transient GeometryInfo geomInfo

x

protected transient double[] x

y

protected transient double[] y

z

protected transient double[] z

color

protected transient double[] color

alpha

protected transient double[] alpha

normal

protected transient double[][] normal

tCoords

protected transient double[][] tCoords

coordinateIndices

protected transient int[] coordinateIndices

colorIndices

protected transient int[] colorIndices

normalIndices

protected transient int[] normalIndices

texCoordIndices

protected transient int[] texCoordIndices

stripCounts

protected transient int[] stripCounts

contourCounts

protected transient int[] contourCounts

coords3f

protected transient javax.vecmath.Point3f[] coords3f

colors3f

protected transient javax.vecmath.Color3f[] colors3f

colors4f

protected transient javax.vecmath.Color4f[] colors4f

normals3f

protected transient javax.vecmath.Vector3f[] normals3f

texCoords2f

protected transient javax.vecmath.TexCoord2f[] texCoords2f

texCoords3f

protected transient javax.vecmath.TexCoord3f[] texCoords3f

hasColors

protected transient boolean hasColors

hasTCoords

protected transient boolean hasTCoords

coordDim

protected transient int coordDim

colorDim

protected transient int colorDim

normalDim

protected transient int normalDim

tCoordDim

protected transient int tCoordDim

primitive

protected transient int primitive

computeNormalsOnUpdate

protected boolean computeNormalsOnUpdate

lookupTable

protected ColorLookupTable lookupTable

creaseAngle

protected double creaseAngle
Constructor Detail

SurfaceModeler

public SurfaceModeler()
Method Detail

initialize

protected void initialize()

setCreaseAngle

public void setCreaseAngle(double angle)

getCreaseAngle

public double getCreaseAngle()

initGeometry

protected abstract void initGeometry()

isComputeNormalsOnUpdate

public boolean isComputeNormalsOnUpdate()
Get the value of computeNormalsOnUpdate.

Returns:
value of computeNormalsOnUpdate.

getComputeNormalsOnUpdate

public boolean getComputeNormalsOnUpdate()

setComputeNormalsOnUpdate

public void setComputeNormalsOnUpdate(boolean v)
Set the value of computeNormalsOnUpdate.

Parameters:
v - Value to assign to computeNormalsOnUpdate.

setColorLookupTable

public void setColorLookupTable(ColorLookupTable lookupTable)

getLookupTable

public ColorLookupTable getLookupTable()

setColorTable

public void setColorTable(java.awt.Color[] colors)

setPrimitive

public void setPrimitive(int primitive)

getPrimitive

public int getPrimitive()

setXCoordinates

void setXCoordinates(double[] x)

setYCoordinates

void setYCoordinates(double[] y)

setZCoordinates

void setZCoordinates(double[] z)

setColors

void setColors(double[] color)

setTransparency

void setTransparency(double[] alpha)

setNormals

void setNormals(double[][] normal)

setTextureCoords

void setTextureCoords(double[][] tCoords)

setStripCounts

void setStripCounts(int[] stripcounts)

setContourCounts

void setContourCounts(int[] contourcounts)

setCoordinateIndices

void setCoordinateIndices(int[] coordinateIndices)

setColorIndices

void setColorIndices(int[] colorIndices)

setNormalIndices

void setNormalIndices(int[] normalIndices)

setTextureCoordinateIndices

void setTextureCoordinateIndices(int[] texCoordIndices)

setupGeometryInfo

void setupGeometryInfo()

modelGeometry

protected void modelGeometry()
Construct a javax.media.j3d.GeometryArray object from geometry information.

Specified by:
modelGeometry in class GeometryModeler

updateData

public void updateData(javax.media.j3d.Geometry geom)
Specified by:
updateData in interface javax.media.j3d.GeometryUpdater
Specified by:
updateData in class GeometryModeler

setValueAt

protected void setValueAt(int index,
                          java.lang.Object value)

isDataReady

protected boolean isDataReady()

checkSize

protected abstract boolean checkSize()

needsModel

protected abstract boolean needsModel()

setData

protected abstract void setData()

geomCalcTriNormals

protected static javax.vecmath.Vector3f geomCalcTriNormals(javax.vecmath.Point3f point3f,
                                                           javax.vecmath.Point3f point3f1,
                                                           javax.vecmath.Point3f point3f2)


Copyright © 1995-2004 net.jbeans. All Rights Reserved.