vona.j3d
Class AxesWidget

java.lang.Object
  extended by vona.j3d.Widget
      extended by vona.j3d.AxesWidget

public class AxesWidget
extends Widget

A widget with an axes triad.

trackWidgetLength(float...) may be called to enable Widget.widgetLength tracking, which causes the axes radius to track Widget.widgetLength*trackRadiusFactor.

Vertex array is 3 C3_V lines.

Copyright (C) 2008 Marsette A. Vona, III

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Author:
Marsette (Marty) A. Vona, III

Field Summary
static java.lang.String AXES_COLORS_STRING
          a short human-readable string giving the mapping from axes to colors
private static java.lang.String cvsid
           
static float DEF_RADIUS
          default axes radius
protected  JOGLGeometry geometry
          the geometry
protected  float radius
          current radius
protected  float trackRadiusFactor
          mapping from Widget.widgetLength to radius, NaN if none
protected  java.nio.FloatBuffer vertexBuffer
          the vertex buffer
 
Fields inherited from class vona.j3d.Widget
alpha, appearance, autoSetBoundingSpheres, boundingSphereCenter, boundingSphereCenterInView, boundingSphereRadius, boundingSphereRadiusInView, dbgEnabled, dbgNormalsGeometry, dbgNormalsVertices, dbgSpheresGeometry, dbgSpheresVertices, DEF_DBG_NORMAL_LENGTH, DEF_WIDGET_LENGTH, enabled, numGeometries, primitiveIterator, propertyMap, rx, vertexAccessor, widgetLength
 
Constructor Summary
AxesWidget()
          makes a new AxesWidget of default radius
AxesWidget(float radius)
          covers AxesWidget(), sets initial axes radius
 
Method Summary
 boolean setRadius(float radius)
          Set the radius.
 void trackWidgetLength(float... trackFactor)
          set trackRadiusFactor, see class header doc
protected  void widgetLengthChanged()
          implements Widget.widgetLength tracking, see class header doc
 
Methods inherited from class vona.j3d.Widget
cons, countGeometryArrays, disableBoundingSphere, disableBoundingSpheres, dump, dump, enableDBGGeometry, enableGeometry, ensureBoundingSpheresInView, getAppearance, getBoundingSphereCenter, getBoundingSphereRadius, getGeometry, getProperty, getWidget, getWidgetAlpha, hasBoundingSphere, hasBoundingSphereInView, hasProperty, indexOf, populateFrom, recomputeBoundingSphere, recomputeBoundingSpheres, removeDBGNormals, removeDBGSpheres, removeGeometry, removeGeometry, removeProperty, replaceAppearanceWithClone, replaceGeometryWithClone, scaleWidget, setAppearance, setBoundingSphereCenter, setBoundingSphereRadius, setGeometry, setGeometryAlpha, setGeometryAlpha, setGeometryAndAppearance, setProperty, setProperty, setWidgetAlpha, setWidgetLength, updateAllDBGNormals, updateAllDBGNormals, updateAllDBGSpheres, updateDBGNormals, updateDBGNormals, updateDBGSpheres, updateExistingDBGNormals, updateExistingDBGSpheres
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cvsid

private static final java.lang.String cvsid
See Also:
Constant Field Values

AXES_COLORS_STRING

public static final java.lang.String AXES_COLORS_STRING
a short human-readable string giving the mapping from axes to colors

See Also:
Constant Field Values

DEF_RADIUS

public static final float DEF_RADIUS
default axes radius

See Also:
Constant Field Values

radius

protected float radius
current radius


trackRadiusFactor

protected float trackRadiusFactor
mapping from Widget.widgetLength to radius, NaN if none


geometry

protected final JOGLGeometry geometry
the geometry


vertexBuffer

protected final java.nio.FloatBuffer vertexBuffer
the vertex buffer

Constructor Detail

AxesWidget

public AxesWidget(float radius)
covers AxesWidget(), sets initial axes radius


AxesWidget

public AxesWidget()
makes a new AxesWidget of default radius

Method Detail

setRadius

public boolean setRadius(float radius)

Set the radius.

Parameters:
radius - the new radius, ignored if NaN, otherwise must be non-negative
Returns:
true if anything changed

trackWidgetLength

public void trackWidgetLength(float... trackFactor)
set trackRadiusFactor, see class header doc

Overrides:
trackWidgetLength in class Widget

widgetLengthChanged

protected void widgetLengthChanged()
implements Widget.widgetLength tracking, see class header doc

Overrides:
widgetLengthChanged in class Widget