JMSLTM Numerical Library 4.0

com.imsl.chart3d
Class DirectionalLight

java.lang.Object
  extended bycom.imsl.chart.AbstractChartNode
      extended bycom.imsl.chart3d.ChartNode3D
          extended bycom.imsl.chart3d.DirectionalLight
All Implemented Interfaces:
Cloneable, Serializable

public class DirectionalLight
extends ChartNode3D
implements Serializable

A directional light.

A directional light is an oriented light with an origin at infinity. The direction is defined by the attribute "Direction".

The light's position is in a coordinate system in which the default viewport is the cube [-1,1] by [-1,1] by [-1,1].

See Also:
Serialized Form

Field Summary
static long serialVersionUID
           
 
Fields inherited from class com.imsl.chart3d.ChartNode3D
AXIS_TITLE_AT_END, AXIS_TITLE_PARALLEL, DATA_TYPE_LINE, DATA_TYPE_MARKER, DATA_TYPE_PICTURE, DATA_TYPE_TUBE, MARKER_TYPE_CUBE, MARKER_TYPE_CUSTOM, MARKER_TYPE_PLUS, MARKER_TYPE_SIMPLE_CUBE, MARKER_TYPE_SIMPLE_PLUS, MARKER_TYPE_SIMPLE_TETRAHEDRON, MARKER_TYPE_SPHERE, MARKER_TYPE_TETRAHEDRON
 
Fields inherited from class com.imsl.chart.AbstractChartNode
AUTOSCALE_DATA, AUTOSCALE_DENSITY, AUTOSCALE_NUMBER, AUTOSCALE_OFF, AUTOSCALE_WINDOW, AXIS_X, AXIS_Y, AXIS_Z, LABEL_TYPE_NONE, LABEL_TYPE_TITLE, LABEL_TYPE_X, LABEL_TYPE_Y, LABEL_TYPE_Z, TRANSFORM_CUSTOM, TRANSFORM_LINEAR, TRANSFORM_LOG
 
Constructor Summary
DirectionalLight(Chart3D parent)
          Creates a directional light pointing in the negative z direction.
DirectionalLight(Chart3D parent, double x, double y, double z)
          Creates a directional light pointing with a specified direction.
 
Method Summary
protected  void addToSceneGraph(Group parent)
          Called to add this object to the scene graph.
 Vector3f getDirection()
          Returns the value of the "Direction" attribute.
 void setDirection(double x, double y, double z)
          Sets the value of the "Direction" attribute to a light direction.
 void setDirection(Vector3f direction)
          Sets the value of the "Direction" attribute to a light direction.
 
Methods inherited from class com.imsl.chart3d.ChartNode3D
getAxisTitlePosition, getBoundingSphere, getChildren, getColorFunction, getConcatenatedViewport, getDataType, getMarkerPulsingCycle, getMarkerPulsingCycleOffset, getMarkerPulsingMaximumScale, getMarkerPulsingMinimumScale, getMarkerRotatingAxis, getMarkerRotatingCycle, getMarkerRotatingCycleOffset, getMarkerType, getMaterial, getParent, getTitle, getViewport, getVirtualUniverse, getZ, setAxisTitlePosition, setBoundingSphere, setColorFunction, setDataType, setMarkerPulsingCycle, setMarkerPulsingCycleOffset, setMarkerPulsingMaximumScale, setMarkerPulsingMinimumScale, setMarkerRotatingAxis, setMarkerRotatingCycle, setMarkerRotatingCycleOffset, setMarkerType, setMaterial, setTitle, setViewport, setViewport, setZ
 
Methods inherited from class com.imsl.chart.AbstractChartNode
clone, clone, clone, clone, getAbstractParent, getAttribute, getAutoscaleInput, getAutoscaleMinimumTimeInterval, getAutoscaleOutput, getBooleanAttribute, getChildList, getColorAttribute, getCustomTransform, getDensity, getDoubleAttribute, getFillColor, getFont, getFontName, getFontSize, getFontStyle, getImage, getIntegerAttribute, getLabelType, getLightColor, getLineColor, getLineWidth, getLocale, getMarkerColor, getMarkerSize, getName, getNumber, getPaint, getStringAttribute, getTextColor, getTextFormat, getTickLength, getTransform, getX, getY, isAncestorOf, isAttributeSet, isAttributeSetAtThisNode, isBitSet, parseColor, remove, setAttribute, setAutoscaleInput, setAutoscaleMinimumTimeInterval, setAutoscaleOutput, setCustomTransform, setDensity, setFillColor, setFillColor, setFont, setFontName, setFontSize, setFontStyle, setImage, setLabelType, setLightColor, setLightColor, setLineColor, setLineColor, setLineWidth, setLocale, setMarkerColor, setMarkerColor, setMarkerSize, setName, setNumber, setPaint, setTextColor, setTextColor, setTextFormat, setTextFormat, setTickLength, setTransform, setX, setY, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

DirectionalLight

public DirectionalLight(Chart3D parent)
Creates a directional light pointing in the negative z direction.

Parameters:
parent - is the Chart3D parent of this node.

DirectionalLight

public DirectionalLight(Chart3D parent,
                        double x,
                        double y,
                        double z)
Creates a directional light pointing with a specified direction.

Parameters:
parent - is the Chart3D parent of this node.
x - is the x-component of the direction vector.
y - is the y-component of the direction vector.
z - is the z-component of the direction vector.
Method Detail

addToSceneGraph

protected void addToSceneGraph(Group parent)
Description copied from class: ChartNode3D
Called to add this object to the scene graph.

Specified by:
addToSceneGraph in class ChartNode3D
Parameters:
parent - is the node in the scene graph at which this object is to be added.

getDirection

public Vector3f getDirection()
Returns the value of the "Direction" attribute.

Returns:
The Vector3f value of the "Direction" attribute, if defined. Otherwise, (0, 0, -1) is returned.

setDirection

public void setDirection(double x,
                         double y,
                         double z)
Sets the value of the "Direction" attribute to a light direction.

Parameters:
x - is the x-component of the direction vector.
y - is the y-component of the direction vector.
z - is the z-component of the direction vector.

setDirection

public void setDirection(Vector3f direction)
Sets the value of the "Direction" attribute to a light direction.

Parameters:
direction - Vector3f direction.

JMSLTM Numerical Library 4.0

Copyright 1970-2006 Visual Numerics, Inc.
Built June 1 2006.