From eb264491b0a923610888684fc6134e0f430932f8 Mon Sep 17 00:00:00 2001
From: Harvey Harrison
diff --git a/src/classes/share/javax/media/j3d/Appearance.java b/src/classes/share/javax/media/j3d/Appearance.java
index 5ebef98..e403915 100644
--- a/src/classes/share/javax/media/j3d/Appearance.java
+++ b/src/classes/share/javax/media/j3d/Appearance.java
@@ -35,13 +35,13 @@ import java.util.Hashtable;
/**
* The Appearance object defines all rendering state that can be set
- * as a component object of a Shape3D node. The rendering state
+ * as a component object of a Shape3D node. The rendering state
* consists of the following:
*
- *
+ *
*
@@ -60,16 +60,16 @@ import java.util.Hashtable;
* including the alpha test function and test value, the raster
* operation, whether vertex colors are ignored, whether invisible
* objects are rendered, and whether the depth buffer is enabled.
- * These attributes are defined in a RenderingAttributes
+ * These attributes are defined in a RenderingAttributes
* object.
*
*
- *
+ *
*
+ *
*
* @param originalNodeComponent the original node to duplicate.
* @param forceDuplicate when set to
* A Java3D application running on a particular machine could have one of
@@ -52,13 +52,13 @@ package javax.media.j3d;
* outputs to.
*
* AudioDevice Interface
- *
+ *
*
@@ -71,9 +71,9 @@ package javax.media.j3d;
*
*Initialization
*
* Audio Playback Type
@@ -92,8 +92,8 @@ package javax.media.j3d;
*
* Distance to Speaker
*
* Instantiating and Registering a New Device
@@ -139,7 +139,7 @@ package javax.media.j3d;
* environment. See PhysicalEnvironment class for more details.
* General Rules for calling AudioDevice methods:
- * It is illegal for an application to call any non-query AudioDevice method
+ * It is illegal for an application to call any non-query AudioDevice method
* if the AudioDevice is created then explicitly assigned to a
* PhysicalEnvironment using PhysicalEnvironment.setAudioDevice();
* When either PhysicalEnvironment.setAudioDevice() is called - including
@@ -151,7 +151,7 @@ package javax.media.j3d;
* initializes it directly, rather than using PhysicalEnvironment.
* setAudioDevice(), that application may make any AudioDevice3D methods calls
* without fear of the Java 3D Core also trying to control the AudioDevice.
- * Under this condition it is safe to call AudioDevice non-query methods.
+ * Under this condition it is safe to call AudioDevice non-query methods.
*/
public interface AudioDevice {
@@ -161,7 +161,7 @@ public interface AudioDevice {
* Constants
*
****************/
- /**
+ /**
* Audio Playback Types
*
* Types of audio output device Java3D sound is played over:
@@ -174,7 +174,7 @@ public interface AudioDevice {
public static final int HEADPHONES = 0;
/**
- * Choosing a
+ * Choosing a
* single near-field monoaural speaker
* as the audio playback type
* specifies that the audio playback will be through a single speaker
@@ -183,11 +183,11 @@ public interface AudioDevice {
public static final int MONO_SPEAKER = 1;
/**
- * Choosing a
+ * Choosing a
* two near-field stereo speakers
* as the audio playback type
* specifies that the audio playback will be through stereo speakers
- * some supplied distance away from, and at some given angle to
+ * some supplied distance away from, and at some given angle to
* the listener.
*/
public static final int STEREO_SPEAKERS = 2;
@@ -239,7 +239,7 @@ public interface AudioDevice {
* @param angle in radians from head Z axis and vector from center ear to speaker
*/
public abstract void setAngleOffsetToSpeaker(float angle);
-
+
/**
* Get Angle Offset (in radians) To Speaker.
* @return angle in radians from head Z axis and vector from center ear to speaker
@@ -248,12 +248,12 @@ public interface AudioDevice {
/**
* Query total number of channels available for sound rendering
- * for this audio device. This returns the maximum number of channels
+ * for this audio device. This returns the maximum number of channels
* available for Java3D sound rendering for all sound sources.
* @return total number of channels that can be used for this audio device
*/
public abstract int getTotalChannels();
-
+
/**
* Query number of channels currently available for use.
* During rendering, when sound nodes are playing, this method returns the
@@ -262,9 +262,9 @@ public interface AudioDevice {
* @return total number of channels current available
*/
public abstract int getChannelsAvailable();
-
+
/**
- * Query number of channels that are used, or would be used to render
+ * Query number of channels that are used, or would be used to render
* a particular sound node. This method returns the number of channels
* needed to render a particular Sound node. The return value is the same
* no matter if the Sound is currently active and enabled (being played) or
diff --git a/src/classes/share/javax/media/j3d/AudioDevice3D.java b/src/classes/share/javax/media/j3d/AudioDevice3D.java
index 81f7e8c..1b9f4b4 100644
--- a/src/classes/share/javax/media/j3d/AudioDevice3D.java
+++ b/src/classes/share/javax/media/j3d/AudioDevice3D.java
@@ -53,7 +53,7 @@ import javax.vecmath.*;
*
* Start, stop, pause, unpause, mute, and unmute of sample on the device.
*
- * Set parameters for each sample corresponding to the fields in the
+ * Set parameters for each sample corresponding to the fields in the
* Sound node.
*
* Set the current active aural parameters that affect all positional samples.
@@ -64,20 +64,20 @@ import javax.vecmath.*;
* Sound types match the Sound node classes defined for Java 3D core
* for BackgroundSound, PointSound, and ConeSound. The type of sound
* a sample is loaded as determines which methods affect it.
- *
+ *
*
* Sound Data Types
*
* Samples can be processed as streaming or buffered data.
* Fully spatializing sound sources may require data to be buffered.
- *
+ *
*/
public interface AudioDevice3D extends AudioDevice {
/**
* Specifies the sound type as background sound.
- */
+ */
public static final int BACKGROUND_SOUND = 1;
/**
@@ -109,7 +109,7 @@ public interface AudioDevice3D extends AudioDevice {
/**
* Accepts a reference to the current View.
* Passes reference to current View Object. The PhysicalEnvironment
- * parameters (with playback type and speaker placement), and the
+ * parameters (with playback type and speaker placement), and the
* PhysicalBody parameters (position/orientation of ears)
* can be obtained from this object, and the transformations to/from
* ViewPlatform coordinate (space the listener's head is in) and
@@ -136,9 +136,9 @@ public interface AudioDevice3D extends AudioDevice {
* specific index, used to reference the sample in future method calls,
* is returned. All the rest of the methods described below require
* this index as a parameter.
- *
+ *
* This method should only be called by Java3D Core and NOT by any application.
- * @param soundType defines the type of Sound Node: Background, Point, and
+ * @param soundType defines the type of Sound Node: Background, Point, and
* Cone
* @param soundData reference to MediaContainer sound data and cached flag
* @return device specific sample index used for referencing this sound
@@ -148,7 +148,7 @@ public interface AudioDevice3D extends AudioDevice {
/**
* Requests that the AudioDevice free all
* resources associated with sample with index id.
- *
+ *
* This method should only be called by Java3D Core and NOT by any application.
* @param index device specific reference number to device driver sample
*/
@@ -159,7 +159,7 @@ public interface AudioDevice3D extends AudioDevice {
* if this information can be determined.
* For non-cached
* streams, this method returns Sound.DURATION_UNKNOWN.
- *
+ *
* This method should only be called by Java3D Core and NOT by any application.
* @param index device specific reference number to device driver sample
* @return sound duration in milliseconds if this can be determined,
@@ -168,47 +168,47 @@ public interface AudioDevice3D extends AudioDevice {
public abstract long getSampleDuration(int index);
/**
- *
- * Retrieves the number of channels (on executing audio device) that
- * this sound is using, if it is playing, or is expected to use
+ *
+ * Retrieves the number of channels (on executing audio device) that
+ * this sound is using, if it is playing, or is expected to use
* if it were begun to be played. This form of this method takes the
* sound's current state (including whether it is muted or unmuted)
* into account.
*
- * For some AudioDevice3D implementations:
+ * For some AudioDevice3D implementations:
*
- * A single sound could be rendered using multiple samples, each taking
+ * A single sound could be rendered using multiple samples, each taking
* up mixer channels.
*
+ *
* This method should only be called by Java3D Core and NOT by any application.
* @param index device specific reference number to device driver sample
* @return number of channels used by sound if it were playing
- */
+ */
public abstract int getNumberOfChannelsUsed(int index);
/**
- *
- * Retrieves the number of channels (on executing audio device) that
+ *
+ * Retrieves the number of channels (on executing audio device) that
* this sound is using, if it is playing, or is projected to use if
* it were to be started playing. Rather than using the actual current
* muted/unmuted state of the sound, the muted parameter is used in
* making the determination.
- *
+ *
* This method should only be called by Java3D Core and NOT by any application.
* @param index device specific reference number to device driver sample
* @param muted flag to use as the current muted state ignoring current
* mute state
* @return number of channels used by sound if it were playing
- */
+ */
public abstract int getNumberOfChannelsUsed(int index, boolean muted);
/**
* Begins a sound playing on the AudioDevice.
- *
+ *
* This method should only be called by Java3D Core and NOT by any application.
* @param index device specific reference number to device driver sample
* @return flag denoting if sample was started; 1 if true, 0 if false
@@ -220,7 +220,7 @@ public interface AudioDevice3D extends AudioDevice {
* was last "started". Note that this start time will be as accurate
* as the AudioDevice implementation can make it - but that it is not
* guaranteed to be exact.
- *
+ *
* This method should only be called by Java3D Core and NOT by any application.
* @param index device specific reference number to device driver sample
* @return system time in milliseconds of the last time sound was started
@@ -229,7 +229,7 @@ public interface AudioDevice3D extends AudioDevice {
/**
* Stops the sound on the AudioDevice.
- *
+ *
* This method should only be called by Java3D Core and NOT by any application.
* @param index device specific reference number to device driver sample
* associated with sound data to be played
@@ -238,12 +238,12 @@ public interface AudioDevice3D extends AudioDevice {
public abstract int stopSample(int index);
/**
- * Sets the overall gain scale factor applied to data associated with this
+ * Sets the overall gain scale factor applied to data associated with this
* source to increase or decrease its overall amplitude.
* The gain scale factor value passed into this method is the combined value
* of the Sound node's Initial Gain and the current AuralAttribute Gain
* scale factors.
- *
+ *
* This method should only be called by Java3D Core and NOT by any application.
* @param index device specific reference number to device driver sample
* @param scaleFactor amplitude (gain) scale factor
@@ -252,9 +252,9 @@ public interface AudioDevice3D extends AudioDevice {
/**
* Sets a sound's loop count.
- * A full description of this parameter and how it is used is in
+ * A full description of this parameter and how it is used is in
* the documentation for Sound.setLoop.
- *
+ *
* This method should only be called by Java3D Core and NOT by any application.
* @param index device specific reference number to device driver sample
* @param count number of times sound is looped during play
@@ -265,7 +265,7 @@ public interface AudioDevice3D extends AudioDevice {
/**
* Passes a reference to the concatenated transformation to be applied to
* local sound position and direction parameters.
- *
+ *
* This method should only be called by Java3D Core and NOT by any application.
* @param index device specific reference number to device driver sample
* @param trans transformation matrix applied to local coordinate parameters
@@ -277,9 +277,9 @@ public interface AudioDevice3D extends AudioDevice {
* Sets this sound's location (in Local coordinates) from specified
* Point. The form of the position parameter matches those of the PointSound
* method of the same name.
- * A full description of this parameter and how it is used is in
+ * A full description of this parameter and how it is used is in
* the documentation for PointSound class.
- *
+ *
* This method should only be called by Java3D Core and NOT by any application.
* @param index device specific reference number to device driver sample
* @param position location of Point or Cone Sound in Virtual World
@@ -291,10 +291,10 @@ public interface AudioDevice3D extends AudioDevice {
/**
* Sets this sound's distance gain elliptical attenuation (not
- * including filter cutoff frequency) by defining corresponding
+ * including filter cutoff frequency) by defining corresponding
* arrays containing distances from the sound's origin and gain
* scale factors applied to all active positional sounds.
- * Gain scale factor is applied to sound based on the distance
+ * Gain scale factor is applied to sound based on the distance
* the listener
* is from sound source.
* These attenuation parameters are ignored for BackgroundSound nodes.
@@ -302,9 +302,9 @@ public interface AudioDevice3D extends AudioDevice {
*
* The form of the attenuation parameters match that of the ConeSound method
* of the same name.
- * A full description of this parameter and how it is used is in
+ * A full description of this parameter and how it is used is in
* the documentation for ConeSound class.
- *
+ *
* This method should only be called by Java3D Core and NOT by any application.
* @param index device specific reference number to device driver sample
* @param frontDistance defines an array of distance along positive axis
@@ -317,17 +317,17 @@ public interface AudioDevice3D extends AudioDevice {
* float[] backDistance, float[] backGain)
* @see ConeSound#setDistanceGain(Point2f[] frontAttenuation,
* Point2f[] backAttenuation)
- */
- public abstract void setDistanceGain(int index,
+ */
+ public abstract void setDistanceGain(int index,
double[] frontDistance, float[] frontAttenuationScaleFactor,
double[] backDistance, float[] backAttenuationScaleFactor);
/**
* Sets this sound's direction from the local coordinate vector provided.
* The form of the direction parameter matches that of the ConeSound method
* of the same name.
- * A full description of this parameter and how it is used is in
+ * A full description of this parameter and how it is used is in
* the documentation for the ConeSound class.
- *
+ *
* This method should only be called by Java3D Core and NOT by any application.
* @param index device specific reference number to device driver sample
* @param direction the new direction vector in local coordinates
@@ -339,22 +339,22 @@ public interface AudioDevice3D extends AudioDevice {
/**
* Sets this sound's angular gain attenuation (including filter)
* by defining corresponding arrays containing angular offsets from
- * the sound's axis, gain scale factors, and frequency cutoff applied
+ * the sound's axis, gain scale factors, and frequency cutoff applied
* to all active directional sounds.
* Gain scale factor is applied to sound based on the angle between the
* sound's axis and the ray from the sound source origin to the listener.
- * The form of the attenuation parameter matches that of the ConeSound
+ * The form of the attenuation parameter matches that of the ConeSound
* method of the same name.
- * A full description of this parameter and how it is used is in
+ * A full description of this parameter and how it is used is in
* the documentation for the ConeSound class.
- *
+ *
* This method should only be called by Java3D Core and NOT by any application.
* @param index device specific reference number to device driver sample
* @param filterType describes type (if any) of filtering defined by attenuation
* @param angle array containing angular distances from sound axis
* @param attenuationScaleFactor array containing gain scale factor
* @param filterCutoff array containing filter cutoff frequencies.
- * The filter values for each tuples can be set to Sound.NO_FILTER.
+ * The filter values for each tuples can be set to Sound.NO_FILTER.
* @see ConeSound#setAngularAttenuation(float[] distance, float[] gain,
* float[] filter)
* @see ConeSound#setAngularAttenuation(Point3f[] attenuation)
@@ -365,9 +365,9 @@ public interface AudioDevice3D extends AudioDevice {
/**
* Changes the speed of sound factor.
- * A full description of this parameter and how it is used is in
+ * A full description of this parameter and how it is used is in
* the documentation for the AuralAttributes class.
- *
+ *
* This method should only be called by Java3D Core and NOT by any application.
* @param rolloff atmospheric gain scale factor (changing speed of sound)
* @see AuralAttributes#setRolloff
@@ -378,10 +378,10 @@ public interface AudioDevice3D extends AudioDevice {
* Sets the Reflective Coefficient scale factor applied to distinct
* low-order early reflections of sound off the surfaces in the region
* defined by the current listening region.
- *
- * A full description of this parameter and how it is used is in
+ *
+ * A full description of this parameter and how it is used is in
* the documentation for the AuralAttributes class.
- *
+ *
* This method should only be called by Java3D Core and NOT by any application.
* @param coefficient reflection/absorption factor applied to reverb
* @see AuralAttributes#setReflectionCoefficient
@@ -395,13 +395,13 @@ public interface AudioDevice3D extends AudioDevice {
* explicitly given in milliseconds.
* A value for delay time of 0.0 disables
* reverberation.
- *
- * A full description of this parameter and how it is used is in
+ *
+ * A full description of this parameter and how it is used is in
* the documentation for the AuralAttributes class.
- *
+ *
* This method should only be called by Java3D Core and NOT by any application.
* @param reverbDelay time between each order of late reflection
- * @see AuralAttributes#setReverbDelay(float reverbDelay)
+ * @see AuralAttributes#setReverbDelay(float reverbDelay)
*/
public abstract void setReverbDelay(float reverbDelay);
@@ -410,9 +410,9 @@ public interface AudioDevice3D extends AudioDevice {
* The reverbOrder parameter specifies the number of times reflections are added to
* reverberation being calculated. A value of -1 specifies an unbounded
* number of reverberations.
- * A full description of this parameter and how it is used is in
+ * A full description of this parameter and how it is used is in
* the documentation for the AuralAttributes class.
- *
+ *
* This method should only be called by Java3D Core and NOT by any application.
* @param reverbOrder number of times reflections added to reverb signal
* @see AuralAttributes#setReverbOrder
@@ -420,35 +420,35 @@ public interface AudioDevice3D extends AudioDevice {
public abstract void setReverbOrder(int reverbOrder);
/**
- * Sets Distance Filter corresponding arrays containing distances and
+ * Sets Distance Filter corresponding arrays containing distances and
* frequency cutoff applied to all active positional sounds.
* Gain scale factor is applied to sound based on the distance the listener
* is from the sound source.
- * A full description of this parameter and how it is used is in
+ * A full description of this parameter and how it is used is in
* the documentation for the AuralAttributes class.
- *
+ *
* This method should only be called by Java3D Core and NOT by any application.
* @param filterType denotes the type of filtering to be applied
* @param distance array of offset distances from sound origin
* @param filterCutoff array of frequency cutoff
* @see AuralAttributes#setDistanceFilter(float[] distance,
- * float[] frequencyCutoff)
- * @see AuralAttributes#setDistanceFilter(Point2f[] attenuation)
+ * float[] frequencyCutoff)
+ * @see AuralAttributes#setDistanceFilter(Point2f[] attenuation)
*/
- public abstract void setDistanceFilter(int filterType,
+ public abstract void setDistanceFilter(int filterType,
double[] distance, float[] filterCutoff);
/**
- * Specifies a scale factor applied to the frequency (or
+ * Specifies a scale factor applied to the frequency (or
* wavelength). A value less than 1.0 will result of slowing the playback
* rate of the sample. A value greater than 1.0 will increase the playback
* rate.
* This parameter is also used to expand or contract the usual
* frequency shift applied to the sound source due to Doppler effect
* calculations. Valid values are >= 0.0.
- * A full description of this parameter and how it is used is in
+ * A full description of this parameter and how it is used is in
* the documentation for the AuralAttributes class.
- *
+ *
* This method should only be called by Java3D Core and NOT by any application.
* @param frequencyScaleFactor factor applied to change of frequency
* @see AuralAttributes#setFrequencyScaleFactor
@@ -457,15 +457,15 @@ public interface AudioDevice3D extends AudioDevice {
/**
* Sets the Velocity scale factor applied during Doppler Effect calculation.
- * This parameter specifies a scale factor applied to the velocity of sound
+ * This parameter specifies a scale factor applied to the velocity of sound
* relative to the listener's position and movement in relation to the sound's
* position and movement. This scale factor is multipled by the calculated
* velocity portion of the Doppler effect equation used during sound rendering.
- * A full description of this parameter and how it is used is in
+ * A full description of this parameter and how it is used is in
* the documentation for the AuralAttributes class.
- *
+ *
* This method should only be called by Java3D Core and NOT by any application.
- * @param velocityScaleFactor applied to velocity of sound in relation
+ * @param velocityScaleFactor applied to velocity of sound in relation
* to listener
* @see AuralAttributes#setVelocityScaleFactor
*/
@@ -477,21 +477,21 @@ public interface AudioDevice3D extends AudioDevice {
* of a playing sound sample. Ideally this is implemented by
* stopping a sample and freeing channel resources (rather than
* just setting the gain of the sample to zero).
- *
+ *
* This method should only be called by Java3D Core and NOT by any application.
* @param index device specific reference number to device driver sample
- */
+ */
public abstract void muteSample(int index);
/**
* Makes a silently playing sample audible.
* In the ideal, this restarts a muted sample by offset from the
* beginning by the number of milliseconds since the time the sample
- * began playing (rather than setting gain to current non-zero gain).
- *
+ * began playing (rather than setting gain to current non-zero gain).
+ *
* This method should only be called by Java3D Core and NOT by any application.
* @param index device specific reference number to device driver sample
- */
+ */
public abstract void unmuteSample(int index);
/**
@@ -500,35 +500,35 @@ public interface AudioDevice3D extends AudioDevice {
* that it can be unpaused at a later time from the same location in the
* sample when the pause was initiated. Pausing a streaming, non-cached
* sound sample will be treated as a mute.
- *
+ *
* This method should only be called by Java3D Core and NOT by any application.
* @param index device specific reference number to device driver sample
- */
+ */
public abstract void pauseSample(int index);
/**
* Restarts the paused sample from the location in the sample where
* paused.
- *
+ *
* This method should only be called by Java3D Core and NOT by any application.
* @param index device specific reference number to device driver sample
- */
+ */
public abstract void unpauseSample(int index);
/**
- *
+ *
* Explicitly updates a Sample.
* This method is called when a Sound is to be explicitly updated.
* It is only called when all a sounds parameters are known to have
* been passed to the audio device. In this way, an implementation
- * can choose to perform lazy-evaluation of a sample, rather than
+ * can choose to perform lazy-evaluation of a sample, rather than
* updating the rendering state of the sample after every individual
* parameter changed.
* This method can be left as a null method if the implementor so chooses.
- *
+ *
* This method should only be called by Java3D Core and NOT by any application.
* @param index device specific reference number to device driver sample
- */
+ */
public abstract void updateSample(int index);
}
diff --git a/src/classes/share/javax/media/j3d/AudioDevice3DL2.java b/src/classes/share/javax/media/j3d/AudioDevice3DL2.java
index 4f5e578..79c098f 100644
--- a/src/classes/share/javax/media/j3d/AudioDevice3DL2.java
+++ b/src/classes/share/javax/media/j3d/AudioDevice3DL2.java
@@ -37,7 +37,7 @@ package javax.media.j3d;
* that are defined in the MIDI Manufactures' Association Interactive Audio
* Special Interest Group (MMA IASIG) Level 2 Specification.
*
- * The reverberation methods of AudioDevice3DL2 interface augment the
+ * The reverberation methods of AudioDevice3DL2 interface augment the
* reverberation methods defined in AudioDevice3D.
*
* The intent is for this interface to be implemented by AudioDevice Driver
@@ -48,10 +48,10 @@ package javax.media.j3d;
* to be performed on.
*
* The non-query methods of this interface should only be called by
- * an application if the AudioDevice instance
+ * an application if the AudioDevice instance
* is not referenced by any PhysicalEnvironment
* explicitly with .setAudioDevice() or implicitly through Universe
- * utility method in which case these are called by Core Java 3D
+ * utility method in which case these are called by Core Java 3D
* Sound classes and Sound Scheduler thread(s).
*
* After the application chooses the AudioDevice3DL2 implementation
@@ -92,17 +92,17 @@ public interface AudioDevice3DL2 extends AudioDevice3D {
*/
public abstract void pause();
- /**
+ /**
* Resumes audio device engine (if previously paused) without reinitializing
* the device.
* Causes all paused cached sounds to be resumed and all streaming sounds
- * restarted.
+ * restarted.
*
* This method should NOT be called by any application if the audio device
* is associated with a Physical Environment used by Java3D Core.
- * This method will be implicitly called when View (associated with this
- * device) is actived.
- */
+ * This method will be implicitly called when View (associated with this
+ * device) is actived.
+ */
public abstract void resume();
/**
@@ -128,7 +128,7 @@ public interface AudioDevice3DL2 extends AudioDevice3D {
* This method should NOT be called by any application if the audio device
* is associated with a Physical Environment used by Java3D Core.
* @param sampleId device specific reference number to device driver sample
- * @param scaleFactor non-negative factor applied to calculated
+ * @param scaleFactor non-negative factor applied to calculated
* amplitudes for all sounds playing on this device
*/
public abstract void setRateScaleFactor(int sampleId, float scaleFactor);
@@ -151,17 +151,17 @@ public interface AudioDevice3DL2 extends AudioDevice3D {
*
* This method should NOT be called by any application if the audio device
* is associated with a Physical Environment used by Java3D Core.
- * @param coefficient late reflection attenuation factor
+ * @param coefficient late reflection attenuation factor
* @see AuralAttributes#setReverbCoefficient
*/
public abstract void setReverbCoefficient(float coefficient);
- /**
+ /**
* Sets the early reflection delay time.
* In this form, the parameter specifies the delay time between each order
* of reflection (while reverberation is being rendered) explicitly given
- * in milliseconds.
+ * in milliseconds.
* Valid values are non-negative floats.
* There may be limitations imposed by the device on how small or large this
* value can be made.
@@ -176,7 +176,7 @@ public interface AudioDevice3DL2 extends AudioDevice3D {
* is associated with a Physical Environment used by Java3D Core.
* @param reflectionDelay time between each order of early reflection
* @see AuralAttributes#setReflectionDelay
- */
+ */
public abstract void setReflectionDelay(float reflectionDelay);
/**
@@ -198,7 +198,7 @@ public interface AudioDevice3DL2 extends AudioDevice3D {
* Set reverb decay filter.
* This provides for frequencies above the given cutoff frequency to be
* attenuated during reverb decay at a different rate than frequencies
- * below this value. Thus, defining a different reverb decay curve for
+ * below this value. Thus, defining a different reverb decay curve for
* frequencies above the cutoff value.
* Default: 1.0 decay is uniform for all frequencies.
*
@@ -206,7 +206,7 @@ public interface AudioDevice3DL2 extends AudioDevice3D {
* Until high frequency attenuation is supported by new Core API,
* this will be set by the Core with the value 1.0.
* It is highly recommended that this method should NOT be
- * called by any application if the audio device is associated with
+ * called by any application if the audio device is associated with
* a Physical Environment used by Java3D Core.
* @param frequencyCutoff value of frequencies in Hertz above which a
* low-pass filter is applied.
@@ -226,14 +226,14 @@ public interface AudioDevice3DL2 extends AudioDevice3D {
*
* This method should NOT be called by any application if the audio device
* is associated with a Physical Environment used by Java3D Core.
- * @param diffusion percentage expressed within the range of 0.0 and 1.0
+ * @param diffusion percentage expressed within the range of 0.0 and 1.0
* @see AuralAttributes#setDiffusion
*/
public abstract void setDiffusion(float diffusion);
/**
* Set reverb density.
- * This defines the modal density (also referred to as 'spectral
+ * This defines the modal density (also referred to as 'spectral
* coloration').
* The value of this parameter is expressed as a percent of the audio
* device's minimum-to-maximum values for this reverb parameter.
@@ -245,10 +245,10 @@ public interface AudioDevice3DL2 extends AudioDevice3D {
* This method should NOT be called by any application if the audio device
* is associated with a Physical Environment used by Java3D Core.
* @param density reverb density expressed as a percentage,
- * within the range of 0.0 and 1.0
+ * within the range of 0.0 and 1.0
* @see AuralAttributes#setDensity
*/
- public abstract void setDensity(float density);
+ public abstract void setDensity(float density);
/**
@@ -282,7 +282,7 @@ public interface AudioDevice3DL2 extends AudioDevice3D {
* called by any application if the audio device is associated with
* a Physical Environment used by Java3D Core.
* @param frequencyCutoff value of frequencies in Hertz above which a
- * low-pass filter is applied.
+ * low-pass filter is applied.
*/
public abstract void setObstructionFilter(int sampleId, float frequencyCutoff);
@@ -318,7 +318,7 @@ public interface AudioDevice3DL2 extends AudioDevice3D {
* called by any application if the audio device is associated with
* a Physical Environment used by Java3D Core.
* @param frequencyCutoff value of frequencies in Hertz above which a
- * low-pass filter is applied.
+ * low-pass filter is applied.
*/
public abstract void setOcclusionFilter(int sampleId, float frequencyCutoff);
}
diff --git a/src/classes/share/javax/media/j3d/AudioDeviceEnumerator.java b/src/classes/share/javax/media/j3d/AudioDeviceEnumerator.java
index 122328d..5eb6bf1 100644
--- a/src/classes/share/javax/media/j3d/AudioDeviceEnumerator.java
+++ b/src/classes/share/javax/media/j3d/AudioDeviceEnumerator.java
@@ -36,7 +36,7 @@ import java.util.NoSuchElementException;
/**
* The class that enumerates all AudioDevices defined in the environment
- *
+ *
* An AudioDeviceEnumerator generates the audio devices defined with the
* execution environment of the currently running Java 3D application.
*/
@@ -50,31 +50,31 @@ class AudioDeviceEnumerator implements Enumeration {
device = physicalEnvironment.getAudioDevice();
if(device == null)
endOfList = true;
- else
+ else
endOfList = false;
}
void reset() {
if(device != null)
endOfList = false;
- }
-
-
- /**
+ }
+
+
+ /**
* Query that tells whether the enumerator has more elements
* @return true if the enumerator has more elements, false otherwise
- */
+ */
public boolean hasMoreElements() {
- if(endOfList == false)
+ if(endOfList == false)
return true;
- else
+ else
return false;
- }
+ }
- /**
+ /**
* Return the next element in the enumerators
* @return the next element in this enumerator
- */
+ */
public Object nextElement() {
if (this.hasMoreElements()) {
endOfList = true;
diff --git a/src/classes/share/javax/media/j3d/AuralAttributes.java b/src/classes/share/javax/media/j3d/AuralAttributes.java
index aaac5a8..4843f4c 100644
--- a/src/classes/share/javax/media/j3d/AuralAttributes.java
+++ b/src/classes/share/javax/media/j3d/AuralAttributes.java
@@ -51,7 +51,7 @@ import javax.vecmath.Point2f;
*
* In Java3D's model for auralization there are several parameters
@@ -97,8 +97,8 @@ import javax.vecmath.Point2f;
*
* Reflection Coefficient
@@ -108,7 +108,7 @@ import javax.vecmath.Point2f;
* for early reflections
* of the composite surfaces in the region the listener is in.
* This scale factor is applied to the sound's amplitude regardless of the
- * sound's position.
+ * sound's position.
* The range of valid values is 0.0 to 1.0.
* A value of 1.0 denotes that reflections are unattenuated -
* the amplitude of reflected sound waves are not decreased.
@@ -171,7 +171,7 @@ import javax.vecmath.Point2f;
* Decay Time
*
@@ -196,15 +196,15 @@ import javax.vecmath.Point2f;
* is proportional to the number of echos per second heard in late
* reverberation, especially noticable at the tail of the reverberation
* decay. The greater the diffusion the more 'natural' the reverberation
- * decay sounds. Reducing diffusion makes the decay sound hollow as
+ * decay sounds. Reducing diffusion makes the decay sound hollow as
* produced in a small highly reflecive space (such as a bathroom).
*
* Reverberation Density
*
- * To simulate Doppler effect, the relative velocity (change in
- * distance in the local coordinate system between the sound source and
+ * To simulate Doppler effect, the relative velocity (change in
+ * distance in the local coordinate system between the sound source and
* the listener over time, in meters per second) is calculated. This
* calculated velocity is multipled by the given VelocityScaleFactor.
* Values must be >= zero. If is a scale factor value of zero is given,
@@ -507,13 +507,13 @@ public class AuralAttributes extends NodeComponent {
ALLOW_REVERB_DELAY_READ,
ALLOW_REVERB_ORDER_READ,
ALLOW_ROLLOFF_READ,
- ALLOW_VELOCITY_SCALE_FACTOR_READ
+ ALLOW_VELOCITY_SCALE_FACTOR_READ
};
-
+
/** *****************
- *
+ *
* Constructors
- *
+ *
* ******************/
/**
* Constructs and initializes a new AuralAttributes object using default
@@ -535,7 +535,7 @@ public class AuralAttributes extends NodeComponent {
* frequency scale factor: 1.0
+ *
*
* @param originalNode the original node to duplicate
* @param forceDuplicate when set to
* This feature allows applications to send arbitrary events into the
@@ -441,7 +441,7 @@ public abstract class Behavior extends Leaf {
* View. So, for instance, Billboard behaviors would be oriented toward
* this primary view, in the case of multiple active views into the same
* scene graph.
- */
+ */
protected View getView() {
return ((BehaviorRetained)this.retained).getView();
}
@@ -452,7 +452,7 @@ public abstract class Behavior extends Leaf {
*
+ *
*
* @param originalNode the original node to duplicate
* @param forceDuplicate when set to
@@ -95,7 +95,7 @@ public class Billboard extends Behavior {
private Point3d viewPosition = new Point3d();
private Point3d yUpPoint = new Point3d();
- private Vector3d eyeVec = new Vector3d();
+ private Vector3d eyeVec = new Vector3d();
private Vector3d yUp = new Vector3d();
private Vector3d zAxis = new Vector3d();
private Vector3d yAxis = new Vector3d();
@@ -150,7 +150,7 @@ public class Billboard extends Behavior {
*
* @param tg the TransformGroup node that this Billboard
* node operates upon
- * @param mode alignment mode, one of ROTATE_ABOUT_AXIS or
+ * @param mode alignment mode, one of ROTATE_ABOUT_AXIS or
* ROTATE_ABOUT_POINT
* @param axis the ray about which the billboard rotates
*/
@@ -171,7 +171,7 @@ public class Billboard extends Behavior {
* that operates on the specified TransformGroup node.
* @param tg the TransformGroup node that this Billboard
* node operates upon
- * @param mode alignment mode, one of ROTATE_ABOUT_AXIS or
+ * @param mode alignment mode, one of ROTATE_ABOUT_AXIS or
* ROTATE_ABOUT_POINT
* @param point the position about which the billboard rotates
*/
@@ -284,15 +284,15 @@ public class Billboard extends Behavior {
* Sets the tranformGroup for this Billboard object.
* @param tg the transformGroup node which replaces the current
* transformGroup node for this Billboard
- */
+ */
public void setTarget(TransformGroup tg ) {
this.tg = tg;
}
/**
* Returns a copy of the transformGroup associated with this Billboard.
- * @return the TranformGroup for this Billboard
- */
+ * @return the TranformGroup for this Billboard
+ */
public TransformGroup getTarget() {
return(tg);
}
@@ -321,7 +321,7 @@ public class Billboard extends Behavior {
wakeupOn(wakeupFrame);
return;
}
-
+
// get viewplatforms's location in virutal world
View v = this.getView();
if( v == null ) {
@@ -362,7 +362,7 @@ public class Billboard extends Behavior {
// project the eye into the rotation plane
status = projectToPlane(eyeVec, nAxis);
- // If the first project was successful ..
+ // If the first project was successful ..
if (status) {
// project the z axis into the rotation plane
zAxis.x = 0.0;
@@ -374,16 +374,16 @@ public class Billboard extends Behavior {
((TransformGroupRetained) tg.retained).getTransform(xform);
if (status) {
- // compute the sign of the angle by checking if the cross product
+ // compute the sign of the angle by checking if the cross product
// of the two vectors is in the same direction as the normal axis
- vector.cross(eyeVec, zAxis);
+ vector.cross(eyeVec, zAxis);
if (vector.dot(nAxis) > 0.0) {
sign = 1.0;
- } else {
+ } else {
sign = -1.0;
}
- // compute the angle between the projected eye vector and the
+ // compute the angle between the projected eye vector and the
// projected z
double dot = eyeVec.dot(zAxis);
@@ -392,12 +392,12 @@ public class Billboard extends Behavior {
} else if (dot < -1.0f) {
dot = -1.0f;
}
-
+
angle = sign*Math.acos(dot);
// use -angle because xform is to *undo* rotation by angle
- aa.x = nAxis.x;
- aa.y = nAxis.y;
+ aa.x = nAxis.x;
+ aa.y = nAxis.y;
aa.z = nAxis.z;
aa.angle = -angle;
bbXform.set(aa);
@@ -416,12 +416,12 @@ public class Billboard extends Behavior {
}
} else { // rotate about point
- // Need to rotate Z axis to point to eye, and Y axis to be
- // parallel to view platform Y axis, rotating around rotation pt
+ // Need to rotate Z axis to point to eye, and Y axis to be
+ // parallel to view platform Y axis, rotating around rotation pt
Transform3D zRotate = new Transform3D();
- // get the eye point
+ // get the eye point
canvas.getCenterEyeInImagePlate(viewPosition);
// derive the yUp point
@@ -466,7 +466,7 @@ public class Billboard extends Behavior {
// rotation axis is cross product of eyeVec and zAxis
vector.cross(eyeVec, zAxis); // vector is cross product
- // if cross product is non-zero, vector is rotation axis and
+ // if cross product is non-zero, vector is rotation axis and
// rotation angle is acos(eyeVec.dot(zAxis)));
double length = vector.length();
@@ -496,11 +496,11 @@ public class Billboard extends Behavior {
yAxis.z = 0.0;
zRotate.transform(yAxis);
- // project the yAxis onto the plane perp to the eyeVec
+ // project the yAxis onto the plane perp to the eyeVec
status = projectToPlane(yAxis, eyeVec);
if (status) {
- // project the yUp onto the plane perp to the eyeVec
+ // project the yUp onto the plane perp to the eyeVec
status = projectToPlane(yUp, eyeVec);
}
@@ -518,11 +518,11 @@ public class Billboard extends Behavior {
angle = Math.acos(dot);
- // check the sign by looking a the cross product vs the eyeVec
+ // check the sign by looking a the cross product vs the eyeVec
vector.cross(yUp, yAxis); // vector is cross product
if (eyeVec.dot(vector) < 0) {
angle *= -1;
- }
+ }
aa.x = eyeVec.x;
aa.y = eyeVec.y;
aa.z = eyeVec.z;
@@ -538,7 +538,7 @@ public class Billboard extends Behavior {
bbXform.mul(xform); // yRotate
bbXform.mul(zRotate); // zRotate
vector.scale(-1.0); // vector to translate back
- xform.set(vector); // xform to translate back
+ xform.set(vector); // xform to translate back
bbXform.mul(xform); // translate back
@@ -566,10 +566,10 @@ private boolean projectToPlane(Vector3d projVec, Vector3d planeVec) {
projVec.z = projVec.z - planeVec.z*dis;
double length = projVec.length();
-
+
if (length < EPSILON) {
return false;
- }
+ }
projVec.scale(1 / length);
return true;
}
@@ -594,13 +594,13 @@ private boolean projectToPlane(Vector3d projVec, Vector3d planeVec) {
return b;
}
-
+
/**
* Copies all Billboard information from
*
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
* The
* Shading Model
*
- * The
*
- *
*
- *
+ *
* If the CompressedGeometry is created with reference access semantics,
* then this allow external compressors or file readers to embed several
* blocks of compressed geometry in a single large byte array, possibly
@@ -193,7 +193,7 @@ public class CompressedGeometryHeader extends Object {
* in by the application.
*
* @see CompressedGeometry
- */
+ */
public CompressedGeometryHeader() {
}
@@ -229,7 +229,7 @@ public class CompressedGeometryHeader extends Object {
case LINE_BUFFER: type = "LINE_BUFFER" ; break ;
case TRIANGLE_BUFFER: type = "TRIANGLE_BUFFER" ; break ;
}
-
+
String data = "" ;
if ((bufferDataPresent & NORMAL_IN_BUFFER) != 0)
data = data + "NORMALS " ;
@@ -237,7 +237,7 @@ public class CompressedGeometryHeader extends Object {
data = data + "COLORS " ;
if ((bufferDataPresent & ALPHA_IN_BUFFER) != 0)
data = data + "ALPHA " ;
-
+
String lbound = "null" ;
if (lowerBound != null)
lbound = lowerBound.toString() ;
diff --git a/src/classes/share/javax/media/j3d/CompressedGeometryRenderMethod.java b/src/classes/share/javax/media/j3d/CompressedGeometryRenderMethod.java
index eb824b1..bbe9157 100644
--- a/src/classes/share/javax/media/j3d/CompressedGeometryRenderMethod.java
+++ b/src/classes/share/javax/media/j3d/CompressedGeometryRenderMethod.java
@@ -54,7 +54,7 @@ class CompressedGeometryRenderMethod implements RenderMethod {
}
return true;
}
-
+
boolean isVisible = false; // True if any of the RAs is visible.
while (ra != null) {
@@ -77,21 +77,21 @@ class CompressedGeometryRenderMethod implements RenderMethod {
cv.raIsVisible = false;
}
cv.ra = ra.renderAtom;
- }
-
+ }
+
ra = ra.next;
}
return isVisible;
-
+
}
void renderCompressedGeo(RenderAtomListInfo ra, RenderMolecule rm, Canvas3D cv) {
-
+
boolean useAlpha ;
CompressedGeometryRetained cgr ;
useAlpha = rm.useAlpha ;
-
+
cgr = (CompressedGeometryRetained)ra.renderAtom.geometryAtom.geometryArray[ra.index];
/* force_decompression if lighting is disabled and
@@ -110,7 +110,7 @@ class CompressedGeometryRenderMethod implements RenderMethod {
// decompressor error
return ;
}
-
+
cgr.mirrorGeometry.execute(cv, ra.renderAtom, rm.isNonUniformScale,
(useAlpha && ra.geometry().noAlpha), rm.alpha,
cv.screen.screen,
diff --git a/src/classes/share/javax/media/j3d/CompressedGeometryRetained.java b/src/classes/share/javax/media/j3d/CompressedGeometryRetained.java
index 82cc98f..113fd04 100644
--- a/src/classes/share/javax/media/j3d/CompressedGeometryRetained.java
+++ b/src/classes/share/javax/media/j3d/CompressedGeometryRetained.java
@@ -92,11 +92,11 @@ class CompressedGeometryRetained extends GeometryRetained {
// True if the platform supports hardware decompression.
private static boolean hardwareDecompression = false ;
-
+
// This field retains a reference to the GeometryRetained object used for
// geometry-based picking. It is normally the same reference as the
// mirror geometry used for rendering unless hardware decompression is
- // supported.
+ // supported.
private GeometryRetained pickGeometry = null ;
/**
@@ -137,25 +137,25 @@ class CompressedGeometryRetained extends GeometryRetained {
execute(cv.ctx, packedVersion, bufferType, bufferContents,
renderFlags, offset, size, compressedGeometry) ;
}
-
+
/**
* The package-scoped constructor.
*/
CompressedGeometryRetained() {
this.geoType = GEO_TYPE_COMPRESSED ;
-
+
// Compressed geometry is always bounded by [-1..1] on each axis, so
// set that as the initial bounding box.
geoBounds.setUpper( 1.0, 1.0, 1.0) ;
geoBounds.setLower(-1.0,-1.0,-1.0) ;
}
-
+
/**
* Compressed geometry is immutable so this method does nothing.
*/
void computeBoundingBox() {
}
-
+
/**
* Update this object. Compressed geometry is immutable so there's
* nothing to do.
@@ -177,7 +177,7 @@ class CompressedGeometryRetained extends GeometryRetained {
// GL_SUNX_geometry_compression extension. The header is unnecessary
// if only the newer GL_SUN_geometry_compression API needs support.
compressedGeometry = new byte[HEADER_LENGTH + this.size] ;
-
+
compressedGeometry[HEADER_MAJOR_VERSION_OFFSET] =
(byte)this.majorVersionNumber ;
@@ -192,7 +192,7 @@ class CompressedGeometryRetained extends GeometryRetained {
compressedGeometry[HEADER_BUFFER_DATA_OFFSET] =
(byte)this.bufferContents ;
-
+
System.arraycopy(geometry, this.offset,
compressedGeometry, HEADER_LENGTH, this.size) ;
@@ -284,7 +284,7 @@ class CompressedGeometryRetained extends GeometryRetained {
// Return this object if hardware decompression is available.
if (hardwareDecompression)
return (GeometryRetained)this ;
-
+
// Check to see if hardware decompression is available.
if (decompressHW(cv.ctx, majorVersionNumber, minorVersionNumber)) {
hardwareDecompression = true ;
@@ -292,7 +292,7 @@ class CompressedGeometryRetained extends GeometryRetained {
// If hardware can't handle by-reference, punt to by-copy.
if (isByReference() && !decompressByRef(cv.ctx)) {
createByCopy(compressedGeometry) ;
- }
+ }
return (GeometryRetained)this ;
}
@@ -334,7 +334,7 @@ class CompressedGeometryRetained extends GeometryRetained {
gdr.getBoundingBox(geoBounds) ;
return pickGeometry ;
}
-
+
//
// The following intersect() methods are used to implement geometry-based
// picking and collision.
@@ -345,7 +345,7 @@ class CompressedGeometryRetained extends GeometryRetained {
return (geomR != null ?
geomR.intersect(pickShape, pickInfo, flags, iPnt, geom, geomIndex) : false);
}
-
+
boolean intersect(Bounds targetBound) {
GeometryRetained geom = getPickGeometry() ;
return (geom != null ? geom.intersect(targetBound) : false);
@@ -353,13 +353,13 @@ class CompressedGeometryRetained extends GeometryRetained {
boolean intersect(Transform3D thisToOtherVworld, GeometryRetained g) {
GeometryRetained geom = getPickGeometry() ;
- return (geom != null ?
+ return (geom != null ?
geom.intersect(thisToOtherVworld, g) : false);
}
boolean intersect(Point3d[] pnts) {
GeometryRetained geom = getPickGeometry() ;
- return (geom != null ? geom.intersect(pnts) : false);
+ return (geom != null ? geom.intersect(pnts) : false);
}
/**
@@ -372,15 +372,15 @@ class CompressedGeometryRetained extends GeometryRetained {
if ((this.bufferContents &
CompressedGeometryHeader.NORMAL_IN_BUFFER) != 0)
vertexFormat |= GeometryArray.NORMALS ;
-
+
if ((this.bufferContents &
CompressedGeometryHeader.COLOR_IN_BUFFER) != 0)
vertexFormat |= GeometryArray.COLOR ;
-
+
if ((this.bufferContents &
CompressedGeometryHeader.ALPHA_IN_BUFFER) != 0)
vertexFormat |= GeometryArray.WITH_ALPHA ;
-
+
return vertexFormat ;
}
diff --git a/src/classes/share/javax/media/j3d/ConeSound.java b/src/classes/share/javax/media/j3d/ConeSound.java
index 48344b8..d4197d6 100644
--- a/src/classes/share/javax/media/j3d/ConeSound.java
+++ b/src/classes/share/javax/media/j3d/ConeSound.java
@@ -43,7 +43,7 @@ import javax.vecmath.Vector3f;
* by gain scale factors and filters based on the angle between the vector from
* the source to the listener, and the ConeSound's direction vector. This
* attenuation is either a single spherical distance gain attenuation (as for
- * a general PointSound source) or dual front and back distance gain
+ * a general PointSound source) or dual front and back distance gain
* attenuations defining elliptical attenuation areas. The angular filter and the
* active AuralAttribute component filter define what filtering is applied to
* the sound source. (See AuralAtttribute class for more details on filtering.)
@@ -51,7 +51,7 @@ import javax.vecmath.Vector3f;
* direction vector and an array of points each containing: angular distance (in
* radians), gain scale factor, and filter (which for now consists of a lowpass
* filter cutoff frequency). Similar to the definition of the back distance gain
- * array for PointSounds, a piece-wise linear curve (defined in terms of
+ * array for PointSounds, a piece-wise linear curve (defined in terms of
* radians from the axis) specifies the slope of these additional attenuation
* values.
*
@@ -68,7 +68,7 @@ import javax.vecmath.Vector3f;
* attenuation array separate from the back distance attenuation array.
* A front distance attenuation array defines monotonically-increasing
* distances from the sound source origin along the position direction
- * vector. A back distance attenuation array (if given) defines
+ * vector. A back distance attenuation array (if given) defines
* monotonically-increasing distances from the sound source origin along the
* negative direction vector. The two arrays must be of the same length.
* The backDistance[i] gain values must be less than or equal to
@@ -105,7 +105,7 @@ import javax.vecmath.Vector3f;
*
* If this is not set, no angular gain attenuation or filtering is performed
* (equivalent to using an angular gain scale factor of 1.0 and an angular
- * filter of Sound.NO_FILTER for all distances).
+ * filter of Sound.NO_FILTER for all distances).
*
* If angular distance from the listener-sound-position vector and a sound's
* direction vector is less than the first distance in the array, only the first
@@ -128,7 +128,7 @@ import javax.vecmath.Vector3f;
* attenuation arrays. Arrays passed into getAngularAttenuation methods
* should all be at least this size.
*
* Unlike the single distance gain attenuation array for PointSounds which
* define spherical areas about the sound source between which gains are
* linearly interpolated, this directed ConeSound can have two distance gain
- * attenuation arrays that define ellipsoidal attenuation areas. See the
+ * attenuation arrays that define ellipsoidal attenuation areas. See the
* setDistanceGain PointSound method for details on how the separate distance
* and distanceGain arrays are interpreted.
*
@@ -262,9 +262,9 @@ public class ConeSound extends PointSound {
* @param region scheduling bounds
* @param priority playback ranking value
* @param position 3D location of source
- * @param frontDistanceAttenuation array of (distance,gain) pairs controlling
+ * @param frontDistanceAttenuation array of (distance,gain) pairs controlling
* attenuation values along the positive direction axis
- * @param backDistanceAttenuation array of (distance,gain) pairs controlling
+ * @param backDistanceAttenuation array of (distance,gain) pairs controlling
* attenuation values along the negative direction axis
* @param direction vector defining cones' axii
*/
@@ -294,13 +294,13 @@ public class ConeSound extends PointSound {
/**
* Constructs a ConeSound node object using the provided parameter values.
- * This form uses individual float parameters for the elements of the
+ * This form uses individual float parameters for the elements of the
* position, direction, and two distance attenuation arrays.
- * Unlike the single distance gain attenuation array for PointSounds, which
+ * Unlike the single distance gain attenuation array for PointSounds, which
* define spherical areas about the sound source between which gains are
* linearly interpolated, this directed ConeSound can have two distance
- * gain attenuation arrays that define ellipsoidal attenuation areas.
- * See the setDistanceGain PointSound method for details on how the
+ * gain attenuation arrays that define ellipsoidal attenuation areas.
+ * See the setDistanceGain PointSound method for details on how the
* separate distance and distanceGain arrays are interpreted.
* The ConeSound's direction vector and angular measurements are defined
* in the local coordinate system of the node.
@@ -338,7 +338,7 @@ public class ConeSound extends PointSound {
float[] backDistanceGain,
float dirX, float dirY, float dirZ ) {
super(soundData, initialGain, loopCount, release, continuous, enable,
- region, priority, posX, posY, posZ,
+ region, priority, posX, posY, posZ,
frontDistance, frontDistanceGain );
// set default read capabilities
@@ -352,7 +352,7 @@ public class ConeSound extends PointSound {
/**
* Constructs a ConeSound node object using all the provided PointSound
* parameter values, which include a single spherical distance attenuation
- * array, but includes an angular attenuation array.
+ * array, but includes an angular attenuation array.
* This form uses points and vectors as input for its position, direction,
* single spherical distanceAttenuation array, and angularAttenuation array.
* It also accepts arrays of points for the distance attenuation and angular
@@ -369,7 +369,7 @@ public class ConeSound extends PointSound {
* @param region scheduling bounds
* @param priority playback ranking value
* @param position 3D location of source
- * @param distanceAttenuation array of (distance,gain) pairs controlling
+ * @param distanceAttenuation array of (distance,gain) pairs controlling
* attenuation values along the positive direction axis
* @param direction vector defining cones' axii
* @param angularAttenuation array of tuples defining angular gain/filtering
@@ -408,7 +408,7 @@ public class ConeSound extends PointSound {
* components of distance attenuation, and separate arrays for the angular
* distance, angular gain, and filtering components of angular attenuation.
* See the setDistanceGain ConeSound method for details on how the separate
- * distance and distanceGain arrays are interpreted. See the
+ * distance and distanceGain arrays are interpreted. See the
* setAngularAttenuation ConeSound method for details on how the separate
* angularDistance, angularGain, and filter arrays are interpreted.
* @param soundData sound source data associated with this node
@@ -447,7 +447,7 @@ public class ConeSound extends PointSound {
float[] angularGain,
float[] frequencyCutoff) {
super(soundData, initialGain, loopCount, release, continuous, enable,
- region, priority, posX, posY, posZ,
+ region, priority, posX, posY, posZ,
distance, distanceGain );
// set default read capabilities
@@ -472,9 +472,9 @@ public class ConeSound extends PointSound {
* @param region scheduling bounds
* @param priority playback ranking value
* @param position 3D location of source
- * @param frontDistanceAttenuation array of (distance,gain) pairs controlling
+ * @param frontDistanceAttenuation array of (distance,gain) pairs controlling
* attenuation values along the positive direction axis
- * @param backDistanceAttenuation array of (distance,gain) pairs controlling
+ * @param backDistanceAttenuation array of (distance,gain) pairs controlling
* attenuation values along the negative direction axis
* @param direction vector defining cones' axii
* @param angularAttenuation array of tuples defining angular gain/filtering
@@ -550,7 +550,7 @@ public class ConeSound extends PointSound {
float[] angularGain,
float[] frequencyCutoff) {
super(soundData, initialGain, loopCount, release, continuous, enable,
- region, priority, posX, posY, posZ,
+ region, priority, posX, posY, posZ,
frontDistance, frontDistanceGain );
// set default read capabilities
@@ -576,20 +576,20 @@ public class ConeSound extends PointSound {
// OVERLOADED Sound methods
//
/**
- * Sets this sound's distance gain elliptical attenuation -
+ * Sets this sound's distance gain elliptical attenuation -
* where gain scale factor is applied to sound based on distance listener
* is from sound source.
* @param frontAttenuation defined by pairs of (distance,gain-scale-factor)
* @param backAttenuation defined by pairs of (distance,gain-scale-factor)
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public void setDistanceGain(Point2f[] frontAttenuation,
Point2f[] backAttenuation ) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_DISTANCE_GAIN_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("ConeSound0"));
-
+
((ConeSoundRetained)this.retained).setDistanceGain(frontAttenuation,
backAttenuation);
}
@@ -602,30 +602,30 @@ public class ConeSound extends PointSound {
* @param backGain array of non-negative scale factors
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public void setDistanceGain(float[] frontDistance, float[] frontGain,
float[] backDistance, float[] backGain) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_DISTANCE_GAIN_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("ConeSound0"));
-
+
((ConeSoundRetained)this.retained).setDistanceGain(
frontDistance, frontGain, backDistance, backGain);
}
/**
- * Sets this sound's back distance gain attenuation - where gain scale
+ * Sets this sound's back distance gain attenuation - where gain scale
* factor is applied to sound based on distance listener along the negative
* sound direction axis from sound source.
* @param attenuation defined by pairs of (distance,gain-scale-factor)
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public void setBackDistanceGain(Point2f[] attenuation) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_DISTANCE_GAIN_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("ConeSound0"));
-
+
((ConeSoundRetained)this.retained).setBackDistanceGain(attenuation);
}
@@ -635,12 +635,12 @@ public class ConeSound extends PointSound {
* @param gain array of non-negative scale factors
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public void setBackDistanceGain(float[] distance, float[] gain) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_DISTANCE_GAIN_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("ConeSound0"));
-
+
((ConeSoundRetained)this.retained).setBackDistanceGain(distance, gain);
}
@@ -652,43 +652,43 @@ public class ConeSound extends PointSound {
* The individual array elements must be allocated by the
* caller. The Point2f x,y values are defined as follows:
* x is the distance, y is the gain.
- * @param frontAttenuation arrays containing forward distances
+ * @param frontAttenuation arrays containing forward distances
* attenuation pairs
- * @param backAttenuation arrays containing backward distances
+ * @param backAttenuation arrays containing backward distances
* attenuation pairs
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public void getDistanceGain(Point2f[] frontAttenuation,
- Point2f[] backAttenuation) {
+ Point2f[] backAttenuation) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_DISTANCE_GAIN_READ))
throw new CapabilityNotSetException(J3dI18N.getString("ConeSound2"));
-
+
((ConeSoundRetained)this.retained).getDistanceGain(
frontAttenuation, backAttenuation);
}
/**
- * Gets this sound's elliptical distance gain attenuation values in
+ * Gets this sound's elliptical distance gain attenuation values in
* separate arrays. The arrays must be large enough to hold all
* of the values.
* @param frontDistance array of float distances along the sound axis
- * @param frontGain array of non-negative scale factors associated with
+ * @param frontGain array of non-negative scale factors associated with
* front distances
- * @param backDistance array of float negative distances along the sound
+ * @param backDistance array of float negative distances along the sound
* axis
- * @param backGain array of non-negative scale factors associated with
+ * @param backGain array of non-negative scale factors associated with
* back distances
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public void getDistanceGain(float[] frontDistance, float[] frontGain,
- float[] backDistance, float[] backGain) {
+ float[] backDistance, float[] backGain) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_DISTANCE_GAIN_READ))
throw new CapabilityNotSetException(J3dI18N.getString("ConeSound10"));
-
+
((ConeSoundRetained)this.retained).getDistanceGain(
frontDistance, frontGain, backDistance, backGain);
}
@@ -703,7 +703,7 @@ public class ConeSound extends PointSound {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_DIRECTION_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("ConeSound3"));
-
+
((ConeSoundRetained)this.retained).setDirection(direction);
}
@@ -740,9 +740,9 @@ public class ConeSound extends PointSound {
/**
* Sets this sound's angular gain attenuation (not including filter).
- * In this form of setAngularAttenuation, only the angular distances
- * and angular gain scale factors pairs are given. The filter values for
- * these tuples are implicitly set to Sound.NO_FILTER.
+ * In this form of setAngularAttenuation, only the angular distances
+ * and angular gain scale factors pairs are given. The filter values for
+ * these tuples are implicitly set to Sound.NO_FILTER.
* @param attenuation array containing angular distance and gain
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
@@ -756,7 +756,7 @@ public class ConeSound extends PointSound {
}
/**
- * In the second form of setAngularAttenuation, an array of all three values
+ * In the second form of setAngularAttenuation, an array of all three values
* is supplied.
* @param attenuation array containing angular distance, gain, and filter
* @exception CapabilityNotSetException if appropriate capability is
@@ -778,7 +778,7 @@ public class ConeSound extends PointSound {
* angularDistance array length, the array elements beyond the length of
* the angularDistance array are ignored. If the angularGain or filtering
* array is shorter than the angularDistance array, the last value of the
- * short array is repeated to fill an array of length equal to
+ * short array is repeated to fill an array of length equal to
* angularDistance array.
* @param distance array containing angular distance
* @param gain array containing angular gain attenuation
@@ -801,24 +801,24 @@ public class ConeSound extends PointSound {
* All arrays are forced to same size.
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public int getAngularAttenuationLength() {
- if (isLiveOrCompiled())
- if(!this.getCapability(ALLOW_ANGULAR_ATTENUATION_READ))
- throw new CapabilityNotSetException(J3dI18N.getString("ConeSound9"));
-
+ if (isLiveOrCompiled())
+ if(!this.getCapability(ALLOW_ANGULAR_ATTENUATION_READ))
+ throw new CapabilityNotSetException(J3dI18N.getString("ConeSound9"));
+
return (((ConeSoundRetained)this.retained).getAngularAttenuationLength());
}
/**
- * Copies the array of attenuation values from this sound, including
+ * Copies the array of attenuation values from this sound, including
* gain and filter, into the specified array. The array must be
* large enough to hold all of the points. The individual array
* elements must be allocated by the caller. The Point3f x,y,z values
* are defined as follows: x is the angular distance, y is
* the angular gain attenuation, and z is the frequency
* cutoff.
- * @param attenuation the array to receive the attenuation values
+ * @param attenuation the array to receive the attenuation values
* applied to gain when listener is between cones
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
@@ -896,7 +896,7 @@ public class ConeSound extends PointSound {
*
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
- * User is responsible for data sanity and must make sure that
+ * User is responsible for data sanity and must make sure that
* extrusionShape does not cause intersection of adjacent glyphs
* or within single glyph. Else undefined output may be generated.
*
@@ -95,7 +95,7 @@ public class FontExtrusion extends Object {
* A null shape specifies that a straight line from 0.0 to 0.2
* (straight bevel) is used.
*
- * @exception IllegalArgumentException if multiple contours in
+ * @exception IllegalArgumentException if multiple contours in
* extrusionShape, or contour is not monotonic or least x-value
* of a contour point is not 0.0f
*
@@ -122,7 +122,7 @@ public class FontExtrusion extends Object {
* This corresponds to the
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
@@ -61,7 +61,7 @@ package javax.media.j3d;
* 1) The array return is a copied of internal array.
@@ -160,13 +160,13 @@ public interface InputDevice {
/**
* Gets the specified Sensor associated with the device. Each InputDevice
* implementation is responsible for creating and managing its own set of
- * sensors. The sensor indices begin at zero and end at number of
- * sensors minus one. Each sensor should have had
+ * sensors. The sensor indices begin at zero and end at number of
+ * sensors minus one. Each sensor should have had
* Sensor.setDevice(InputDevice) set properly before addInputDevice
* is called.
* @param sensorIndex the sensor to retrieve
* @return Returns the specified sensor.
*/
- public Sensor getSensor(int sensorIndex);
+ public Sensor getSensor(int sensorIndex);
}
diff --git a/src/classes/share/javax/media/j3d/InputDeviceBlockingThread.java b/src/classes/share/javax/media/j3d/InputDeviceBlockingThread.java
index 74dd195..27505cd 100644
--- a/src/classes/share/javax/media/j3d/InputDeviceBlockingThread.java
+++ b/src/classes/share/javax/media/j3d/InputDeviceBlockingThread.java
@@ -70,7 +70,7 @@ class InputDeviceBlockingThread extends Thread {
// yield() call should not be necessary (and may be ineffective),
// but we can't call MasterControl.threadYield() because it will
// sleep for at least a millisecond.
- while (running) {
+ while (running) {
while (!stop) {
device.pollAndProcessInput();
Thread.yield();
diff --git a/src/classes/share/javax/media/j3d/InputDeviceScheduler.java b/src/classes/share/javax/media/j3d/InputDeviceScheduler.java
index 53f5729..e3f7773 100644
--- a/src/classes/share/javax/media/j3d/InputDeviceScheduler.java
+++ b/src/classes/share/javax/media/j3d/InputDeviceScheduler.java
@@ -35,8 +35,8 @@ import java.util.*;
/**
* This thread manages all input device scheduling. It monitors and caches
- * all device additions and removals. It spawns new threads for blocking
- * devices, manages all non-blocking drivers itself, and tags the sensors
+ * all device additions and removals. It spawns new threads for blocking
+ * devices, manages all non-blocking drivers itself, and tags the sensors
* of demand_driven devices. This implementation assume that
* processMode of InputDevice will not change after addInputDevice().
*
@@ -51,7 +51,7 @@ class InputDeviceScheduler extends J3dThread {
ArrayList blockingDevices = new ArrayList(1);
ArrayList threads = new ArrayList(1);
- // This is used by MasterControl to keep track activeViewRef
+ // This is used by MasterControl to keep track activeViewRef
PhysicalEnvironment physicalEnv;
// store all inputDevices
@@ -78,7 +78,7 @@ class InputDeviceScheduler extends J3dThread {
return instanceNum;
}
- InputDeviceScheduler(ThreadGroup threadGroup,
+ InputDeviceScheduler(ThreadGroup threadGroup,
PhysicalEnvironment physicalEnv) {
super(threadGroup);
setName("J3D-InputDeviceScheduler-" + getInstanceNum());
@@ -101,11 +101,11 @@ class InputDeviceScheduler extends J3dThread {
switch(device.getProcessingMode()) {
case InputDevice.BLOCKING:
- InputDeviceBlockingThread thread =
+ InputDeviceBlockingThread thread =
VirtualUniverse.mc.getInputDeviceBlockingThread(device);
thread.start();
synchronized (blockingDevices) {
- threads.add(thread);
+ threads.add(thread);
blockingDevices.add(device);
}
break;
@@ -120,7 +120,7 @@ class InputDeviceScheduler extends J3dThread {
default: // InputDevice.DEMAND_DRIVEN:
// tag the sensors
for (int i=device.getSensorCount()-1; i>=0; i--) {
- device.getSensor(i).demand_driven = true;
+ device.getSensor(i).demand_driven = true;
}
break;
}
@@ -135,7 +135,7 @@ class InputDeviceScheduler extends J3dThread {
// tell the thread to clean up and permanently block
synchronized (blockingDevices) {
int idx = blockingDevices.indexOf(device);
- InputDeviceBlockingThread thread =
+ InputDeviceBlockingThread thread =
(InputDeviceBlockingThread) threads.remove(idx);
thread.finish();
blockingDevices.remove(idx);
@@ -150,10 +150,10 @@ class InputDeviceScheduler extends J3dThread {
}
}
break;
- default: // InputDevice.DEMAND_DRIVEN:
+ default: // InputDevice.DEMAND_DRIVEN:
// untag the sensors
for (int i=device.getSensorCount()-1; i>=0; i--) {
- device.getSensor(i).demand_driven = false;
+ device.getSensor(i).demand_driven = false;
}
}
}
@@ -185,7 +185,7 @@ class InputDeviceScheduler extends J3dThread {
VirtualUniverse.mc.removeInputDeviceScheduler(this);
}
}
-
+
// stop all spawn threads
synchronized (blockingDevices) {
for (int i=threads.size()-1; i >=0; i--) {
diff --git a/src/classes/share/javax/media/j3d/IntegerFreeList.java b/src/classes/share/javax/media/j3d/IntegerFreeList.java
index 5558ede..0dce527 100644
--- a/src/classes/share/javax/media/j3d/IntegerFreeList.java
+++ b/src/classes/share/javax/media/j3d/IntegerFreeList.java
@@ -55,5 +55,5 @@ class IntegerFreeList extends MemoryFreeList {
super.clear();
count = 0;
}
-
+
}
diff --git a/src/classes/share/javax/media/j3d/Interpolator.java b/src/classes/share/javax/media/j3d/Interpolator.java
index a053db9..ed6d2f3 100644
--- a/src/classes/share/javax/media/j3d/Interpolator.java
+++ b/src/classes/share/javax/media/j3d/Interpolator.java
@@ -49,15 +49,15 @@ public abstract class Interpolator extends Behavior {
Alpha alpha;
- /**
+ /**
* Default WakeupCondition for all interpolators. The
* wakeupOn method of Behavior, which takes a WakeupCondition as
* the method parameter, will need to be called at the end
* of the processStimulus method of any class that subclasses
- * Interpolator; this can be done with the following method call:
+ * Interpolator; this can be done with the following method call:
* wakeupOn(defaultWakeupCriterion).
*/
- protected WakeupCriterion defaultWakeupCriterion =
+ protected WakeupCriterion defaultWakeupCriterion =
(WakeupCriterion) new WakeupOnElapsedFrames(0);
@@ -116,7 +116,7 @@ public abstract class Interpolator extends Behavior {
*
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
* The Java 3D lighting model approximates the way light works in
- * the real world. Light is defined in terms of the red, green, and
+ * the real world. Light is defined in terms of the red, green, and
* blue components that combine to create the light color. The
* three color components represent the amount of light emitted
* by the source.
@@ -77,12 +77,12 @@ import java.util.Enumeration;
* red and green but no blue, produces a yellow light.
*
* If a scene has multiple lights and all lights illuminate an object,
- * the effect of the light on the object is the sum of the
- * lights. For example, in a scene with two lights, if the first
- * light emits (R1, G1, B1) and
- * the second light emits (R2, G2,
- * B2), the components are added together giving
- * (R1+R2, G1+G2,
+ * the effect of the light on the object is the sum of the
+ * lights. For example, in a scene with two lights, if the first
+ * light emits (R1, G1, B1) and
+ * the second light emits (R2, G2,
+ * B2), the components are added together giving
+ * (R1+R2, G1+G2,
* B1+B2).
* If the sums of any of the color values is greater than 1.0,
* brighter than the maximum brightness permitted, the color value is
@@ -103,15 +103,15 @@ import java.util.Enumeration;
*
* The surface of each object in the scene has
* certain material properties that define how light affects its
- * appearance. The object might reflect light in various ways,
+ * appearance. The object might reflect light in various ways,
* depending on the object's surface type. The object
- * might even emit its own light. The Java 3D lighting model specifies
+ * might even emit its own light. The Java 3D lighting model specifies
* these material properties as five independent components: emitted
* color, ambient color, diffuse color, specular color, and shininess.
- * All of these properties are computed independently, then added
+ * All of these properties are computed independently, then added
* together to define how the surface of the object appears under
- * light (an exception is Ambient light, which does not contribute
- * to specular reflection). The material properties are defined
+ * light (an exception is Ambient light, which does not contribute
+ * to specular reflection). The material properties are defined
* in the Material class.
*
* Influencing Bounds
@@ -126,11 +126,11 @@ import java.util.Enumeration;
* should both objects be set.
*
* A Bounds object represents a convex, closed volume. Bounds
- * defines three different types of containing
- * volumes: an axis-aligned-box volume, a spherical volume, and a
+ * defines three different types of containing
+ * volumes: an axis-aligned-box volume, a spherical volume, and a
* bounding polytope. A BoundingLeaf object also specifies a region
- * of influence, but allows an application to specify a bounding
- * region in one coordinate system (the local coordinate system of
+ * of influence, but allows an application to specify a bounding
+ * region in one coordinate system (the local coordinate system of
* the BoundingLeaf node) other than the local coordinate
* system of the node that references the bounds (the Light).
*
@@ -140,7 +140,7 @@ import java.util.Enumeration;
* region of a scene, lighting can also be limited to groups of
* nodes, defined by a Group object. This is known as "scoping."
* All nodes attached to a Group node define a list of scopes.
- * Methods in the Light class permit the setting, addition, insertion,
+ * Methods in the Light class permit the setting, addition, insertion,
* removal, and enumeration of nodes in the list of scopes.
*
* Two-sided Lighting of Polygons
@@ -167,14 +167,14 @@ import java.util.Enumeration;
*
* If lighting is not enabled, the current color of an
* object in the scene is simply mapped onto the object, and none of
- * the lighting equations regarding Material properties, such as ambient
+ * the lighting equations regarding Material properties, such as ambient
* color, diffuse color, specular color, and shininess, are performed.
* However, an object's emitted color, if specified and enabled, will
* still affect that object's appearance.
*
* To disable lighting, call setEnable with
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
*
*
*
* If antialiasing is enabled, the lines are considered transparent
- * for rendering purposes. They are rendered with all the other transparent
+ * for rendering purposes. They are rendered with all the other transparent
* objects and adhere to the other transparency settings such as the
- * View transparency sorting policy and the View depth buffer freeze
+ * View transparency sorting policy and the View depth buffer freeze
* transparent enable.
- *
*
* User-defined Line Patterns
*
- * A user-defined line pattern is specified with a pattern mask and
+ * A user-defined line pattern is specified with a pattern mask and
* an optional scale factor.
*
* The Pattern Mask
*
* The pattern is specified
- * using a 16-bit mask that specifies on and off segments. Bit 0 in
- * the pattern mask corresponds to the first pixel of the line or line
- * strip primitive. A value of 1 for a bit in the pattern mask indicates
+ * using a 16-bit mask that specifies on and off segments. Bit 0 in
+ * the pattern mask corresponds to the first pixel of the line or line
+ * strip primitive. A value of 1 for a bit in the pattern mask indicates
* that the corresponding pixel is drawn, while a value of 0
- * indicates that the corresponding pixel is not drawn. After all 16 bits
+ * indicates that the corresponding pixel is not drawn. After all 16 bits
* in the pattern are used, the pattern is repeated.
*
* For example, a mask of 0x00ff defines a dashed line with a repeating
- * pattern of 8 pixels on followed by 8 pixels off. A value of 0x0101
- * defines a a dotted line with a repeating pattern of 1 pixel on and 7
+ * pattern of 8 pixels on followed by 8 pixels off. A value of 0x0101
+ * defines a a dotted line with a repeating pattern of 1 pixel on and 7
* pixels off.
*
* The pattern continues around individual line segments of a line strip
- * primitive. It is restarted at the beginning of each new line strip.
- * For line array primitives, the pattern is restarted at the beginning
+ * primitive. It is restarted at the beginning of each new line strip.
+ * For line array primitives, the pattern is restarted at the beginning
* of each line.
*
* The Scale Factor
*
* The pattern is multiplied by the scale factor such that each bit in
* the pattern mask corresponds to that many consecutive pixels.
- * For example, a scale factor of 3 applied to a pattern mask of 0x001f
+ * For example, a scale factor of 3 applied to a pattern mask of 0x001f
* would produce a repeating pattern of 15 pixels on followed by 33
* pixels off. The valid range for this attribute is [1,15]. Values
* outside this range are clamped.
- *
+ *
* @see Appearance
* @see View
*/
@@ -192,9 +192,9 @@ public class LineAttributes extends NodeComponent {
private static final int[] readCapabilities = {
ALLOW_ANTIALIASING_READ,
ALLOW_PATTERN_READ,
- ALLOW_WIDTH_READ
+ ALLOW_WIDTH_READ
};
-
+
/**
* Constructs a LineAttributes object with default parameters.
* The default values are as follows:
@@ -242,7 +242,7 @@ public class LineAttributes extends NodeComponent {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_WIDTH_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("LineAttributes1"));
- if (isLive())
+ if (isLive())
((LineAttributesRetained)this.retained).setLineWidth(lineWidth);
else
((LineAttributesRetained)this.retained).initLineWidth(lineWidth);
@@ -283,7 +283,7 @@ public class LineAttributes extends NodeComponent {
else
((LineAttributesRetained)this.retained).initLinePattern(linePattern);
-
+
}
/**
@@ -407,11 +407,11 @@ public class LineAttributes extends NodeComponent {
* for this LineAttributes component object.
*
* If antialiasing is enabled, the lines are considered transparent
- * for rendering purposes. They are rendered with all the other
- * transparent objects and adhere to the other transparency settings
- * such as the View transparency sorting policy and the View depth buffer
+ * for rendering purposes. They are rendered with all the other
+ * transparent objects and adhere to the other transparency settings
+ * such as the View transparency sorting policy and the View depth buffer
* freeze transparent enable.
- *
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
+ *
*
* @param originalNodeComponent the original node component to duplicate.
* @param forceDuplicate when set to
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
*
* @see Locale
- * @see BranchGroup
+ * @see BranchGroup
*
* @since Java 3D 1.4
*/
public class PickInfo extends Object {
-
+
static final int PICK_ALL = 1;
static final int PICK_ANY = 2;
@@ -61,50 +61,50 @@ public class PickInfo extends Object {
/* The intersected pickable node object */
private Node node;
-
+
/* A copy of LocalToVworld transform of the pickable node */
private Transform3D l2vw;
/* The closest intersection point */
private Point3d closestIntersectionPoint;
-
+
/* Distance between start point of pickShape and closest intersection point */
private double closestDistance;
/* An array to store intersection results */
private IntersectionInfo[] intersectionInfoArr;
-
+
/* The following references are for internal geometry computation use only */
private ArrayList intersectionInfoList = new ArrayList();
private boolean intersectionInfoListSorted = false;
private Transform3D l2vwRef;
private Node nodeRef;
-
+
/**
* Specifies a Pick using the bounds of the pickable nodes.
*/
public static final int PICK_BOUNDS = 1;
-
+
/**
* Specifies a Pick using the geometry of the pickable nodes.
*/
public static final int PICK_GEOMETRY = 2;
-
+
/**
* Specifies that this PickInfo returns the computed SceneGraphPath object.
*/
public static final int SCENEGRAPHPATH = 0x01;
-
+
/**
* Specifies that this PickInfo returns the computed intersected Node object.
*/
public static final int NODE = 0x02;
-
+
/**
* Specifies that this PickInfo returns the computed local to vworld transform.
*/
public static final int LOCAL_TO_VWORLD = 0x04;
-
+
/**
* Specifies that this PickInfo returns the closest intersection point.
*/
@@ -116,13 +116,13 @@ public class PickInfo extends Object {
public static final int CLOSEST_DISTANCE = 0x10;
/**
- * Specifies that this PickInfo returns only the closest intersection
+ * Specifies that this PickInfo returns only the closest intersection
* geometry information.
*/
public static final int CLOSEST_GEOM_INFO = 0x20;
/**
- * Specifies that this PickInfo returns all the closest intersection
+ * Specifies that this PickInfo returns all the closest intersection
* geometry informations.
*/
public static final int ALL_GEOM_INFO = 0x40;
@@ -132,48 +132,48 @@ public class PickInfo extends Object {
PickInfo() {
}
-
+
void setSceneGraphPath(SceneGraphPath sgp) {
this.sgp = sgp;
}
-
+
void setNode(Node node) {
this.node = node;
}
-
+
void setLocalToVWorld(Transform3D l2vw) {
this.l2vw = l2vw;
}
-
+
void setClosestIntersectionPoint(Point3d cIPt) {
this.closestIntersectionPoint = cIPt;
}
-
+
void setClosestDistance(double cDist) {
this.closestDistance = cDist;
}
-
+
void setLocalToVWorldRef(Transform3D l2vwRef) {
this.l2vwRef = l2vwRef;
}
-
+
void setNodeRef(Node nodeRef) {
this.nodeRef = nodeRef;
}
-
+
IntersectionInfo createIntersectionInfo() {
return new IntersectionInfo();
}
-
+
void insertIntersectionInfo(IntersectionInfo iInfo) {
intersectionInfoList.add(iInfo);
intersectionInfoListSorted = false;
}
-
+
void sortIntersectionInfoArray(IntersectionInfo[] iInfoArr) {
class Sort {
-
+
IntersectionInfo iInfoArr[];
Sort(IntersectionInfo[] iInfoArr) {
@@ -186,7 +186,7 @@ public class PickInfo extends Object {
// System.err.println(" -- insertSort.");
insertSort();
} else {
- // System.err.println(" -- quicksort.");
+ // System.err.println(" -- quicksort.");
quicksort(0, iInfoArr.length-1);
}
}
@@ -194,7 +194,7 @@ public class PickInfo extends Object {
// Insertion sort on smallest arrays
final void insertSort() {
for (int i=0; i
* If the Shape3D being picked has multiple geometry arrays, the possible arrays
- * of IntersectionInfo are stored in the PickInfo and referred to by a geometry
- * index. If the picked geometry is of type, Text3D or CompressGeometry,
- * getVertexIndices is invalid. If the picked Node is an Morph
+ * of IntersectionInfo are stored in the PickInfo and referred to by a geometry
+ * index. If the picked geometry is of type, Text3D or CompressGeometry,
+ * getVertexIndices is invalid. If the picked Node is an Morph
* object, the geometry used in pick computation is alway at index 0.
*
*
* @since Java 3D 1.4
- */
-
+ */
+
public class IntersectionInfo extends Object {
-
+
/* The index to the intersected geometry in the pickable node */
private int geomIndex;
@@ -1012,11 +1012,11 @@ public class PickInfo extends Object {
/* Distance between start point of pickShape and intersection point */
private double distance;
- /* The vertex indices of the intersected primitive in the geometry */
+ /* The vertex indices of the intersected primitive in the geometry */
private int[] vertexIndices;
/* The interpolation weights for each of the verticies of the primitive */
- // private float[] weights; Not supported. Should be done in util. package
+ // private float[] weights; Not supported. Should be done in util. package
/** IntersectionInfo Constructor */
IntersectionInfo() {
@@ -1026,20 +1026,20 @@ public class PickInfo extends Object {
void setGeometryIndex(int geomIndex) {
this.geomIndex = geomIndex;
}
-
+
void setGeometry(Geometry geom) {
this.geom = geom;
}
-
+
void setIntersectionPoint(Point3d intersectionPoint) {
assert(intersectionPoint != null);
this.intersectionPoint = new Point3d(intersectionPoint);
}
-
+
void setDistance(double distance) {
this.distance = distance;
- }
-
+ }
+
void setVertexIndices(int[] vertexIndices) {
assert(vertexIndices != null);
this.vertexIndices = new int[vertexIndices.length];
@@ -1048,7 +1048,7 @@ public class PickInfo extends Object {
}
}
-
+
/**
* Retrieves the index to the intersected geometry in the picked node, either a Shape3D or Morph.
* @return the index of the intersected geometry in the pickable node.
@@ -1074,15 +1074,15 @@ public class PickInfo extends Object {
}
/**
- * Retrieves the distance between the start point of the pickShape and the
+ * Retrieves the distance between the start point of the pickShape and the
* intersection point.
- * @return distance between the start point of the pickShape and the
+ * @return distance between the start point of the pickShape and the
* intersection point.
*/
- public double getDistance() {
+ public double getDistance() {
return distance;
}
-
+
/**
* Retrieves the vertex indices of the intersected primitive in the geometry.
* @return the vertex indices of the intersected primitive.
diff --git a/src/classes/share/javax/media/j3d/PickPoint.java b/src/classes/share/javax/media/j3d/PickPoint.java
index d83ccd2..9c50b74 100644
--- a/src/classes/share/javax/media/j3d/PickPoint.java
+++ b/src/classes/share/javax/media/j3d/PickPoint.java
@@ -93,23 +93,23 @@ public final class PickPoint extends PickShape {
}
// Only use within J3D.
- // Return a new PickPoint that is the transformed (t3d) of this pickPoint.
+ // Return a new PickPoint that is the transformed (t3d) of this pickPoint.
PickShape transform(Transform3D t3d) {
-
+
PickPoint newPPt = new PickPoint();
-
+
newPPt.location.x = location.x;
newPPt.location.y = location.y;
newPPt.location.z = location.z;
-
+
t3d.transform(newPPt.location);
-
+
return newPPt;
}
Point3d getStartPoint() {
return location;
- }
+ }
int getPickType() {
return PICKPOINT;
diff --git a/src/classes/share/javax/media/j3d/PickRay.java b/src/classes/share/javax/media/j3d/PickRay.java
index db71b33..7c52831 100644
--- a/src/classes/share/javax/media/j3d/PickRay.java
+++ b/src/classes/share/javax/media/j3d/PickRay.java
@@ -105,25 +105,25 @@ public final class PickRay extends PickShape {
// Only use within J3D.
- // Return a new PickRay that is the transformed (t3d) of this pickRay.
+ // Return a new PickRay that is the transformed (t3d) of this pickRay.
PickShape transform(Transform3D t3d) {
Point3d end = new Point3d();
-
+
PickRay newPR = new PickRay(origin, direction);
-
+
end.x = origin.x + direction.x;
end.y = origin.y + direction.y;
end.z = origin.z + direction.z;
-
+
t3d.transform(newPR.origin);
t3d.transform(end);
-
+
newPR.direction.x = end.x - newPR.origin.x;
newPR.direction.y = end.y - newPR.origin.y;
newPR.direction.z = end.z - newPR.origin.z;
newPR.direction.normalize();
-
+
return newPR;
}
diff --git a/src/classes/share/javax/media/j3d/PickSegment.java b/src/classes/share/javax/media/j3d/PickSegment.java
index f7b1841..2a449d0 100644
--- a/src/classes/share/javax/media/j3d/PickSegment.java
+++ b/src/classes/share/javax/media/j3d/PickSegment.java
@@ -45,7 +45,7 @@ public final class PickSegment extends PickShape {
Point3d start;
Point3d end;
- /**
+ /**
* Constructs an empty PickSegment.
* The start and end points of the line segment are
* initialized to (0,0,0).
@@ -105,9 +105,9 @@ public final class PickSegment extends PickShape {
}
-
+
// Only use within J3D.
- // Return a new PickSegment that is the transformed (t3d) of this pickSegment.
+ // Return a new PickSegment that is the transformed (t3d) of this pickSegment.
PickShape transform(Transform3D t3d) {
PickSegment newPS = new PickSegment(start, end);
t3d.transform(newPS.start);
diff --git a/src/classes/share/javax/media/j3d/PickShape.java b/src/classes/share/javax/media/j3d/PickShape.java
index 82c9ad1..975f32b 100644
--- a/src/classes/share/javax/media/j3d/PickShape.java
+++ b/src/classes/share/javax/media/j3d/PickShape.java
@@ -45,12 +45,12 @@ public abstract class PickShape {
// Use for picking
static final int PICKRAY = 1;
static final int PICKSEGMENT = 2;
- static final int PICKPOINT = 3;
- static final int PICKCYLINDER = 4;
- static final int PICKCONE = 5;
- static final int PICKBOUNDINGBOX = 6;
- static final int PICKBOUNDINGSPHERE = 7;
- static final int PICKBOUNDINGPOLYTOPE = 8;
+ static final int PICKPOINT = 3;
+ static final int PICKCYLINDER = 4;
+ static final int PICKCONE = 5;
+ static final int PICKBOUNDINGBOX = 6;
+ static final int PICKBOUNDINGSPHERE = 7;
+ static final int PICKBOUNDINGPOLYTOPE = 8;
static final int PICKUNKNOWN = 9;
/**
@@ -63,7 +63,7 @@ public abstract class PickShape {
* Return true if shape intersect with bounds.
* The point of intersection is stored in pickPos.
*/
- abstract boolean intersect(Bounds bounds, Point4d pickPos);
+ abstract boolean intersect(Bounds bounds, Point4d pickPos);
// Only use within J3D.
// Return a new PickShape that is the transformed (t3d) of this pickShape.
@@ -81,7 +81,7 @@ public abstract class PickShape {
double y = iPnt.y - p.y;
double z = iPnt.z - p.z;
return Math.sqrt(x*x + y*y + z*z);
- }
+ }
// Return one of PickShape type constant define above
abstract int getPickType();
diff --git a/src/classes/share/javax/media/j3d/Pipeline.java b/src/classes/share/javax/media/j3d/Pipeline.java
index af8bbb1..f021b1a 100644
--- a/src/classes/share/javax/media/j3d/Pipeline.java
+++ b/src/classes/share/javax/media/j3d/Pipeline.java
@@ -44,7 +44,7 @@ abstract class Pipeline {
// Native rendering pipelines using OGL or D3D library
NATIVE_OGL,
NATIVE_D3D,
-
+
// Java rendering pipeline using Java Bindings for OpenGL
JOGL,
@@ -129,7 +129,7 @@ abstract class Pipeline {
return true;
}
-
+
/**
* Initialize the Pipeline. Called exactly once by
* MasterControl.loadLibraries() to create the singleton
@@ -355,7 +355,7 @@ abstract class Pipeline {
int vcount, int vformat,
int texCoordSetCount, int[] texCoordSetMap,
int texCoordSetMapLen, int[] texCoordSetMapOffset,
- int vertexAttrCount, int[] vertexAttrSizes,
+ int vertexAttrCount, int[] vertexAttrSizes,
double[] xform, double[] nxform,
float[] varray);
@@ -519,7 +519,7 @@ abstract class Pipeline {
Object imageBuffer,
int depthFormat,
Object depthBuffer);
-
+
// ---------------------------------------------------------------------
//
@@ -1072,7 +1072,7 @@ abstract class Pipeline {
int imgXOffset, int imgYOffset,
int tilew, int width, int height,
int imageDataType, Object data, boolean useAutoMipMap);
-
+
abstract void updateTexture2DLodRange(Context ctx,
int baseLevel, int maximumLevel,
float minimumLod, float maximumLod);
@@ -1166,14 +1166,14 @@ abstract class Pipeline {
int width, int height,
int boundaryWidth,
int imageDataType, Object imageData, boolean useAutoMipMap);
-
+
abstract void updateTextureCubeMapSubImage(Context ctx,
int face, int level, int xoffset, int yoffset,
int textureFormat, int imageFormat,
int imgXOffset, int imgYOffset,
int tilew, int width, int height,
int imageDataType, Object imageData, boolean useAutoMipMap);
-
+
abstract void updateTextureCubeMapLodRange(Context ctx,
int baseLevel, int maximumLevel,
float minimumLod, float maximumLod);
@@ -1212,7 +1212,7 @@ abstract class Pipeline {
// Method to initialize the native J3D library
abstract boolean initializeJ3D(boolean disableXinerama);
- // Maximum lights supported by the native API
+ // Maximum lights supported by the native API
abstract int getMaximumLights();
@@ -1372,19 +1372,19 @@ abstract class Pipeline {
boolean releaseCtx(Context ctx, long dpy) {
return false;
}
-
+
abstract void clear(Context ctx, float r, float g, float b, boolean clearStencil);
-
+
abstract void textureFillBackground(Context ctx, float texMinU, float texMaxU, float texMinV, float texMaxV,
float mapMinX, float mapMaxX, float mapMinY, float mapMaxY, boolean useBiliearFilter);
-
+
abstract void textureFillRaster(Context ctx, float texMinU, float texMaxU, float texMinV, float texMaxV,
float mapMinX, float mapMaxX, float mapMinY, float mapMaxY, float mapZ, float alpha, boolean useBiliearFilter);
- abstract void executeRasterDepth(Context ctx, float posX, float posY, float posZ,
- int srcOffsetX, int srcOffsetY, int rasterWidth, int rasterHeight, int depthWidth, int depthHeight,
- int depthType, Object depthData);
-
+ abstract void executeRasterDepth(Context ctx, float posX, float posY, float posZ,
+ int srcOffsetX, int srcOffsetY, int rasterWidth, int rasterHeight, int depthWidth, int depthHeight,
+ int depthType, Object depthData);
+
// The native method for setting the ModelView matrix.
abstract void setModelViewMatrix(Context ctx, double[] viewMatrix, double[] modelMatrix);
@@ -1457,7 +1457,7 @@ abstract class Pipeline {
abstract int getStencilSize(Canvas3D cv);
abstract boolean hasSceneAntialiasingMultisample(Canvas3D cv);
abstract boolean hasSceneAntialiasingAccum(Canvas3D cv);
-
+
// Methods to get native WS display and screen
abstract long getDisplay();
abstract int getScreen(GraphicsDevice graphicsDevice);
diff --git a/src/classes/share/javax/media/j3d/PointArray.java b/src/classes/share/javax/media/j3d/PointArray.java
index 82292ff..b22aced 100644
--- a/src/classes/share/javax/media/j3d/PointArray.java
+++ b/src/classes/share/javax/media/j3d/PointArray.java
@@ -159,7 +159,7 @@ public class PointArray extends GeometryArray {
this.retained.setSource(this);
}
-
+
/**
* @deprecated replaced with cloneNodeComponent(boolean forceDuplicate)
*/
diff --git a/src/classes/share/javax/media/j3d/PointArrayRetained.java b/src/classes/share/javax/media/j3d/PointArrayRetained.java
index 63d21cc..9dd10d3 100644
--- a/src/classes/share/javax/media/j3d/PointArrayRetained.java
+++ b/src/classes/share/javax/media/j3d/PointArrayRetained.java
@@ -53,7 +53,7 @@ class PointArrayRetained extends GeometryArrayRetained {
initialVertexIndex : initialCoordIndex);
Point3d pnt = new Point3d();
int[] vtxIndexArr = new int[1];
-
+
switch (pickShape.getPickType()) {
case PickShape.PICKRAY:
PickRay pickRay= (PickRay) pickShape;
@@ -72,27 +72,27 @@ class PointArrayRetained extends GeometryArrayRetained {
y = pnt.y;
z = pnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
break;
case PickShape.PICKSEGMENT:
PickSegment pickSegment = (PickSegment) pickShape;
- Vector3d dir =
- new Vector3d(pickSegment.end.x - pickSegment.start.x,
+ Vector3d dir =
+ new Vector3d(pickSegment.end.x - pickSegment.start.x,
pickSegment.end.y - pickSegment.start.y,
pickSegment.end.z - pickSegment.start.z);
while (i < validVertexCount) {
vtxIndexArr[0] = i;
getVertexData(i++, pnt);
- if (intersectPntAndRay(pnt, pickSegment.start,
+ if (intersectPntAndRay(pnt, pickSegment.start,
dir, sdist) &&
(sdist[0] <= 1.0)) {
if (flags == 0) {
@@ -104,13 +104,13 @@ class PointArrayRetained extends GeometryArrayRetained {
y = pnt.y;
z = pnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
@@ -134,13 +134,13 @@ class PointArrayRetained extends GeometryArrayRetained {
y = pnt.y;
z = pnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
@@ -162,13 +162,13 @@ class PointArrayRetained extends GeometryArrayRetained {
y = pnt.y;
z = pnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
@@ -189,13 +189,13 @@ class PointArrayRetained extends GeometryArrayRetained {
y = pnt.y;
z = pnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
@@ -204,8 +204,8 @@ class PointArrayRetained extends GeometryArrayRetained {
// Should not happen since API already check for this
throw new IllegalArgumentException(J3dI18N.getString("PointArrayRetained0"));
default:
- throw new RuntimeException ("PickShape not supported for intersection");
- }
+ throw new RuntimeException ("PickShape not supported for intersection");
+ }
if (minDist < Double.MAX_VALUE) {
iPnt.x = x;
@@ -220,12 +220,12 @@ class PointArrayRetained extends GeometryArrayRetained {
Point3d point = new Point3d();
int i = ((vertexFormat & GeometryArray.BY_REFERENCE) == 0 ?
initialVertexIndex : initialCoordIndex);
-
+
switch (pnts.length) {
case 3: // Triangle
while (i < validVertexCount) {
getVertexData(i++, point);
- if (intersectTriPnt(pnts[0], pnts[1], pnts[2], point)) {
+ if (intersectTriPnt(pnts[0], pnts[1], pnts[2], point)) {
return true;
}
}
@@ -233,8 +233,8 @@ class PointArrayRetained extends GeometryArrayRetained {
case 4: // Quad
while (i < validVertexCount) {
getVertexData(i++, point);
- if (intersectTriPnt(pnts[0], pnts[1], pnts[2], point) ||
- intersectTriPnt(pnts[0], pnts[2], pnts[3], point)) {
+ if (intersectTriPnt(pnts[0], pnts[1], pnts[2], point) ||
+ intersectTriPnt(pnts[0], pnts[2], pnts[3], point)) {
return true;
}
}
@@ -257,8 +257,8 @@ class PointArrayRetained extends GeometryArrayRetained {
case 1: // Point
while (i < validVertexCount) {
getVertexData(i++, point);
- if ((pnts[0].x == point.x) &&
- (pnts[0].y == point.y) &&
+ if ((pnts[0].x == point.x) &&
+ (pnts[0].y == point.y) &&
(pnts[0].z == point.z)) {
return true;
}
@@ -266,7 +266,7 @@ class PointArrayRetained extends GeometryArrayRetained {
break;
}
return false;
- }
+ }
boolean intersect(Transform3D thisToOtherVworld,
@@ -292,7 +292,7 @@ class PointArrayRetained extends GeometryArrayRetained {
int i = ((vertexFormat & GeometryArray.BY_REFERENCE) == 0 ?
initialVertexIndex : initialCoordIndex);
Point3d pnt = new Point3d();
-
+
while (i < validVertexCount) {
getVertexData(i++, pnt);
if (targetBound.intersect(pnt)) {
diff --git a/src/classes/share/javax/media/j3d/PointAttributes.java b/src/classes/share/javax/media/j3d/PointAttributes.java
index deaa406..c2e2378 100644
--- a/src/classes/share/javax/media/j3d/PointAttributes.java
+++ b/src/classes/share/javax/media/j3d/PointAttributes.java
@@ -32,12 +32,12 @@
package javax.media.j3d;
/**
- * The PointAttributes object defines all attributes that apply to
+ * The PointAttributes object defines all attributes that apply to
* point primitives. The point attributes that can be defined are:
*
- *
*
* If antialiasing is enabled, the points are considered transparent
- * for rendering purposes. They are rendered with all the other transparent
+ * for rendering purposes. They are rendered with all the other transparent
* objects and adhere to the other transparency settings such as the
- * View transparency sorting policy and the View depth buffer freeze
+ * View transparency sorting policy and the View depth buffer freeze
* transparent enable.
- *
* If antialiasing is enabled, the points are considered transparent
- * for rendering purposes. They are rendered with all the other
- * transparent objects and adhere to the other transparency settings
- * such as the View transparency sorting policy and the View depth
+ * for rendering purposes. They are rendered with all the other
+ * transparent objects and adhere to the other transparency settings
+ * such as the View transparency sorting policy and the View depth
* buffer freeze transparent enable.
- *
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
@@ -54,7 +54,7 @@ import javax.vecmath.Point3f;
* Associated with distances from the listener to the sound source via an
* array of (distance, gain-scale-factor) pairs. The gain scale factor
* applied to the sound source is the linear interpolated gain value between
- * the distance value range that includes the current distance from
+ * the distance value range that includes the current distance from
* the listener to the sound source. If the distance from the listener to
* the sound source is less than the first distance in the array, the first
* gain scale factor is applied to the sound source. This creates a
@@ -69,16 +69,16 @@ import javax.vecmath.Point3f;
* positive floating point numbers. While for most applications this list
* of gain scale factors will usually be monotonically-decreasing, they
* do not have to be.
- * If this
- * is not set, no distance gain attenuation is performed (equivalent to
- * using a distance gain of 1.0 for all distances).
+ * If this
+ * is not set, no distance gain attenuation is performed (equivalent to
+ * using a distance gain of 1.0 for all distances).
*
* getDistanceGainLength method returns the length of the distance gain
* attenuation arrays. Arrays passed into getDistanceGain methods should all
* be at least this size.
*
* There are two methods for getDistanceGain, one returning an array of
- * points, the other returning separate arrays for each attenuation
+ * points, the other returning separate arrays for each attenuation
* component.
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
*
*
*
*
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
- *
+ *
*
- *
+ *
*
- *
+ *
*
- *
+ *
*
*
- *
+ *
*
- *
+ *
*
- *
+ *
*
- *
+ *
*
*
- *
+ *
*
- *
+ *
*
- *
+ *
*
- *
+ *
*
- *
+ *
*
- *
+ *
*
- *
+ *
*
*
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
* New for Java 3D 1.2, an off-screen rendering mode allows rendering
* to a memory image, which is possibly larger than the screen. The
- * setSize and getSize methods are defined specifically for this
+ * setSize and getSize methods are defined specifically for this
* mode. Note that the off-screen size, physical width, and physical height
* must be set prior to rendering
- * to the associated off-screen canvas. Failure to do so will result
+ * to the associated off-screen canvas. Failure to do so will result
* in an exception.
* Calibration Parameters
* The Screen3D object must be calibrated with the coexistence volume.
@@ -145,7 +145,7 @@ public class Screen3D extends Object {
Transform3D headTrackerToLeftImagePlate = new Transform3D();
Transform3D headTrackerToRightImagePlate = new Transform3D();
-
+
// Physical screen size related field has changed.
static final int PHYSICAL_SCREEN_SIZE_DIRTY = 0x01;
// Screen size field has changed.
@@ -153,14 +153,14 @@ public class Screen3D extends Object {
// Tracker base to image plate field has changed.
static final int TRACKER_BASE_TO_IMAGE_PLATE_DIRTY = 0x04;
// Head tracker to image plate field has changed.
- static final int HEAD_TRACKER_TO_IMAGE_PLATE_DIRTY = 0x08;
+ static final int HEAD_TRACKER_TO_IMAGE_PLATE_DIRTY = 0x08;
// Mask that indicates this Screen3D view dependence info. has changed,
// and CanvasViewCache may need to recompute the final view matries.
int scrDirtyMask = (PHYSICAL_SCREEN_SIZE_DIRTY | SCREEN_SIZE_DIRTY_DIRTY
| TRACKER_BASE_TO_IMAGE_PLATE_DIRTY
- | HEAD_TRACKER_TO_IMAGE_PLATE_DIRTY);
-
+ | HEAD_TRACKER_TO_IMAGE_PLATE_DIRTY);
+
//
// View cache for this screen
//
@@ -168,7 +168,7 @@ public class Screen3D extends Object {
// The renderer for this screen
Renderer renderer = null;
-
+
// Hashtable that maps a GraphicsDevice to its associated renderer
static Hashtable deviceRendererMap = new Hashtable();
@@ -272,7 +272,7 @@ public class Screen3D extends Object {
if (!offScreen)
throw new IllegalStateException(J3dI18N.getString("Screen3D1"));
-
+
synchronized(this) {
screenSize.width = width;
screenSize.height = height;
@@ -298,7 +298,7 @@ public class Screen3D extends Object {
public void setSize(Dimension d) {
if (!offScreen)
throw new IllegalStateException(J3dI18N.getString("Screen3D1"));
-
+
synchronized(this) {
screenSize.width = d.width;
screenSize.height = d.height;
@@ -341,7 +341,7 @@ public class Screen3D extends Object {
}
notifyUsers();
}
-
+
/**
* Retrieves the the screen's physical height in meters.
* @return the screen's physical height in meters
@@ -375,7 +375,7 @@ public class Screen3D extends Object {
*/
Screen3D(GraphicsConfiguration graphicsConfiguration, boolean offScreen) {
this.offScreen = offScreen;
- this.graphicsDevice = graphicsConfiguration.getDevice();
+ this.graphicsDevice = graphicsConfiguration.getDevice();
screenViewCache = new ScreenViewCache(this);
@@ -444,11 +444,11 @@ public class Screen3D extends Object {
throw new BadTransformException(J3dI18N.getString("Screen3D0"));
}
headTrackerToLeftImagePlate.setWithLock(t);
- scrDirtyMask |= Screen3D.HEAD_TRACKER_TO_IMAGE_PLATE_DIRTY;
+ scrDirtyMask |= Screen3D.HEAD_TRACKER_TO_IMAGE_PLATE_DIRTY;
}
notifyUsers();
}
-
+
/**
* Retrieves the head-tracker coordinate system to left image-plate
* coordinate system transform and copies it into the specified
@@ -477,7 +477,7 @@ public class Screen3D extends Object {
}
notifyUsers();
}
-
+
/**
* Retrieves the head-tracker coordinate system to right image-plate
* coordinate system transform and copies it into the specified
@@ -498,14 +498,14 @@ public class Screen3D extends Object {
screenViewCache.snapshot();
}
}
-
+
/**
* Increment canvas count, initialize renderer if needed
*/
synchronized void incCanvasCount() {
canvasCount++;
}
-
+
/**
* Decrement canvas count, kill renderer if needed
*/
diff --git a/src/classes/share/javax/media/j3d/ScreenViewCache.java b/src/classes/share/javax/media/j3d/ScreenViewCache.java
index e75a295..e686be3 100644
--- a/src/classes/share/javax/media/j3d/ScreenViewCache.java
+++ b/src/classes/share/javax/media/j3d/ScreenViewCache.java
@@ -55,14 +55,14 @@ class ScreenViewCache extends Object {
int screenHeight;
// Mask that indicates Screen3D view dependence info. has changed,
- // and CanvasViewCache may need to recompute the final view matries.
+ // and CanvasViewCache may need to recompute the final view matries.
// Issue 163: Array of dirty bits is used because the Renderer and
// RenderBin run asynchronously. Now that they each have a separate
// instance of CanvasViewCache (due to the fix for Issue 109), they
// need separate dirty bits. Array element 0 is used for the Renderer and
// element 1 is used for the RenderBin.
int[] scrvcDirtyMask = new int[2];
-
+
//
// Tracker-base coordinate system to image-plate coordinate
// system transform. If head tracking is enabled, this transform
@@ -113,14 +113,14 @@ class ScreenViewCache extends Object {
physicalScreenHeight = screen.physicalScreenHeight;
screenWidth = screen.screenSize.width;
screenHeight = screen.screenSize.height;
-
+
screen.trackerBaseToImagePlate.getWithLock(trackerBaseToImagePlate);
screen.headTrackerToLeftImagePlate.getWithLock
(headTrackerToLeftImagePlate);
screen.headTrackerToRightImagePlate.getWithLock
(headTrackerToRightImagePlate);
-
+
// This isn't really API data, but since we have no other derived
// data, and it's a simple calculation, it's easier if we just do
// it here.
diff --git a/src/classes/share/javax/media/j3d/Sensor.java b/src/classes/share/javax/media/j3d/Sensor.java
index 418b3d2..9082fa6 100644
--- a/src/classes/share/javax/media/j3d/Sensor.java
+++ b/src/classes/share/javax/media/j3d/Sensor.java
@@ -38,8 +38,8 @@ import javax.vecmath.*;
* data. Examples include six-degree-of-freedom tracking, a joystick,
* or a data file being read back during a program. A sensor must be
* used in conjuction with an implementation of the InputDevice
- * interface.
- *
+ * interface.
+ *
* The Sensor object provides an abstract concept of a hardware
* input device. A Sensor consists of a timestamped sequence of
* input values and the state of buttons or switches at the time
@@ -60,15 +60,15 @@ import javax.vecmath.*;
* Java 3D includes three special six-degrees-of-freedom (6DOF) entities.
* These include UserHead, DominantHand, and NondominantHand. You
* can assign or change which sensor drives one
- * of these predefined entities. Java 3D uses the specified sensor to
+ * of these predefined entities. Java 3D uses the specified sensor to
* drive the 6DOF entity - most visibly the View.
*
- * Java 3D does not provide raw tracker or joystick-generated data in
- * a sensor. At a minimum, Java 3D normalizes the raw data using the
- * registration and calibration parameters either provided by or
- * provided for the end user. It additionally may filter and process
+ * Java 3D does not provide raw tracker or joystick-generated data in
+ * a sensor. At a minimum, Java 3D normalizes the raw data using the
+ * registration and calibration parameters either provided by or
+ * provided for the end user. It additionally may filter and process
* the data to remove noise and improve latency.
- * The application programmer can suppress this latter effect on a
+ * The application programmer can suppress this latter effect on a
* sensor-by-sensor basis.
*
* @see SensorRead
@@ -111,13 +111,13 @@ public class Sensor {
public static final int HAND_PREDICTOR = 64;
/**
- * Default SensorRead object count (30); the number of SensorRead
+ * Default SensorRead object count (30); the number of SensorRead
* objects constructed if no count is specified.
*/
public static final int DEFAULT_SENSOR_READ_COUNT = 30;
/**
- * SENSOR_READ_COUNT_BUFFER is the number of extra sensor reading
+ * SENSOR_READ_COUNT_BUFFER is the number of extra sensor reading
* values to store at the end of the circular list. It helps provide
* MT-safeness. This is necessary if someone asks for the last
* k sensor values and k is close to sensor read count.
@@ -128,7 +128,7 @@ public class Sensor {
static int num_reads_so_far = 0;
- // specifies whether a DEMAND_DRIVEN device has been added that
+ // specifies whether a DEMAND_DRIVEN device has been added that
// manages this sensor
boolean demand_driven = false;
@@ -136,7 +136,7 @@ public class Sensor {
int sensorReadCount;
// Prediction policy -- unused
- private int predictionPolicy = NO_PREDICTOR;
+ private int predictionPolicy = NO_PREDICTOR;
// Predictor type -- unused
private int predictorType = PREDICT_NONE;
@@ -155,10 +155,10 @@ public class Sensor {
// These matrices used as a temporary workspace for the local SVD
// calculations (thus minimimizing garbage collection).
- Matrix3d orig_rot = new Matrix3d();
- Matrix3d orig_rot_transpose = new Matrix3d();
- Matrix3d temp_rot = new Matrix3d();
- Matrix3d local_svd = new Matrix3d();
+ Matrix3d orig_rot = new Matrix3d();
+ Matrix3d orig_rot_transpose = new Matrix3d();
+ Matrix3d temp_rot = new Matrix3d();
+ Matrix3d local_svd = new Matrix3d();
/**
@@ -205,7 +205,7 @@ public class Sensor {
new Point3d(0.0,0.0, 0.0));
}
- /**
+ /**
* Constructs a Sensor object for the specified input device using
* the specified hotspot.
* Default values are used for all other parameters.
@@ -258,7 +258,7 @@ public class Sensor {
this.hotspot = new Point3d(hotspot);
}
- // argument of 0 is last reading (ie, currentIndex), argument
+ // argument of 0 is last reading (ie, currentIndex), argument
// of 1 means next to last index, etc.
int previousIndex(int k){
int temp = currentIndex - k;
@@ -291,7 +291,7 @@ public class Sensor {
*
* @deprecated As of Java 3D version 1.4, prediction is not a
* supported feature.
- */
+ */
public int getPredictor(){
return predictorType;
}
@@ -322,7 +322,7 @@ public class Sensor {
*
* @deprecated As of Java 3D version 1.4, prediction is not a
* supported feature.
- */
+ */
public int getPredictionPolicy(){
return predictionPolicy;
}
@@ -397,8 +397,8 @@ public class Sensor {
/**
* Extracts the kth-most recent sensor reading and copies that value into
- * the specified argument; where 0 is the most recent sensor reading, 1 is
- * the next most recent sensor reading, etc.
+ * the specified argument; where 0 is the most recent sensor reading, 1 is
+ * the next most recent sensor reading, etc.
* @param read the matrix that will receive the most recent sensor reading
* @param kth the kth previous sensor reading
*/
@@ -438,14 +438,14 @@ public class Sensor {
* placed
*/
public void lastButtons(int[] values) {
- System.arraycopy(readings[currentIndex].buttonValues, 0, values,
+ System.arraycopy(readings[currentIndex].buttonValues, 0, values,
0, sensorButtonCount);
}
/**
* Places the kth-most recent sensor reading value for each button into
- * the array parameter; where k=0 is the most recent sensor reading, k=1
- * is the next most recent sensor reading, etc.; will throw an
+ * the array parameter; where k=0 is the most recent sensor reading, k=1
+ * is the next most recent sensor reading, etc.; will throw an
* ArrayIndexOutOfBoundsException if values.length is less than
* the number of buttons.
* @param k the time associated with the most recent sensor reading
@@ -470,8 +470,8 @@ public class Sensor {
}
/**
- * Set the number of sensor read objects per Sensor. This is a
- * calibration parameter that should normally be set in this
+ * Set the number of sensor read objects per Sensor. This is a
+ * calibration parameter that should normally be set in this
* object's constructor. Calling this method resets all of this
* sensor's values that are already in the buffer.
* It is illegal to change this value after the device has been
@@ -487,7 +487,7 @@ public class Sensor {
}
currentIndex = 0;
}
-
+
/**
* Returns the number of buttons associated with this sensor.
@@ -502,7 +502,7 @@ public class Sensor {
* @return the current sensor read object
*/
public SensorRead getCurrentSensorRead() {
- // not sure if this should return a reference or a copy
+ // not sure if this should return a reference or a copy
SensorRead read = new SensorRead(sensorButtonCount);
read.set(readings[currentIndex]);
return read;
@@ -511,7 +511,7 @@ public class Sensor {
/**
* Sets the next sensor read to the specified values; once these
* values are set via this method they become the current values
- * returned by methods such as lastRead(), lastTime(), and
+ * returned by methods such as lastRead(), lastTime(), and
* lastButtons(); note that if there are no buttons associated with
* this sensor, values can just be an empty array.
* @param time the next SensorRead's associated time
@@ -523,7 +523,7 @@ public class Sensor {
int temp = currentIndex + 1;
if (temp > MaxSensorReadIndex) temp = 0;
-
+
readings[temp].setTime(time);
readings[temp].set(transform);
if(sensorButtonCount > 0)
@@ -537,10 +537,10 @@ public class Sensor {
* returned by methods such as lastRead(), lastTime(), and
* lastButtons().
* @param read the next SensorRead's values
- */
+ */
public void setNextSensorRead(SensorRead read) {
- int temp = currentIndex + 1;
- if (temp > MaxSensorReadIndex) temp = 0;
+ int temp = currentIndex + 1;
+ if (temp > MaxSensorReadIndex) temp = 0;
readings[temp].set(read);
currentIndex = temp;
}
diff --git a/src/classes/share/javax/media/j3d/SensorRead.java b/src/classes/share/javax/media/j3d/SensorRead.java
index 2326237..b51a896 100644
--- a/src/classes/share/javax/media/j3d/SensorRead.java
+++ b/src/classes/share/javax/media/j3d/SensorRead.java
@@ -84,7 +84,7 @@ public class SensorRead {
/**
* Constructs a SensorRead object with the specified number
* of buttons.
- * @param numButtons the number of buttons for this SensorRead
+ * @param numButtons the number of buttons for this SensorRead
*/
public SensorRead(int numButtons){
this.read = new Transform3D();
@@ -137,10 +137,10 @@ public class SensorRead {
}
/**
- * Sets the values of all buttons for this SensorRead object.
+ * Sets the values of all buttons for this SensorRead object.
* @param values array contining the new buttons for this SensorRead
- * @exception ArrayIndexOutOfBoundsException if this object
- * has 0 buttons or if values.length is less than the number of
+ * @exception ArrayIndexOutOfBoundsException if this object
+ * has 0 buttons or if values.length is less than the number of
* buttons in this object.
*/
public void setButtons(int[] values) {
@@ -154,7 +154,7 @@ public class SensorRead {
System.arraycopy(values, 0, buttonValues, 0, numButtons);
}
-
+
/**
* Copies the array of button values for this SensorRead object into
* the specified array.
@@ -167,7 +167,7 @@ public class SensorRead {
public void getButtons(int[] values) {
if(numButtons > 0)
System.arraycopy(buttonValues, 0, values, 0, numButtons);
- }
+ }
/**
diff --git a/src/classes/share/javax/media/j3d/SetLiveState.java b/src/classes/share/javax/media/j3d/SetLiveState.java
index 506936d..1df3b6c 100644
--- a/src/classes/share/javax/media/j3d/SetLiveState.java
+++ b/src/classes/share/javax/media/j3d/SetLiveState.java
@@ -48,7 +48,7 @@ class SetLiveState extends Object {
// The transforms used to update state
Transform3D[][] currentTransforms = new Transform3D[1][];
int[][] currentTransformsIndex = new int[1][];
-
+
// The keys used when dealing with SharedGroups
HashKey[] keys = null;
@@ -123,9 +123,9 @@ class SetLiveState extends Object {
ArrayList ogCIOTableList = new ArrayList(5);
/**
- * List of BranchGroup from this node to the root of tree
- * This is used by BranchGroupRetained to construct
- * BranchGroup lists for picking.
+ * List of BranchGroup from this node to the root of tree
+ * This is used by BranchGroupRetained to construct
+ * BranchGroup lists for picking.
*
* @see NodeRetained.branchGroupPaths
*/
@@ -150,7 +150,7 @@ class SetLiveState extends Object {
// many references of the original branch that attach()/detach()
int refCount = 1;
- // background node whose geometry branch contains this node
+ // background node whose geometry branch contains this node
BackgroundRetained geometryBackground = null;
// behavior nodes
@@ -184,7 +184,7 @@ class SetLiveState extends Object {
GroupRetained parentSwitchLink = null;
SharedGroupRetained lastSharedGroup = null;
-
+
int traverseFlags = 0;
// Use for set live.
@@ -197,13 +197,13 @@ class SetLiveState extends Object {
int[] hashkeyIndex = null;
ArrayList switchStates = null;
-
+
SetLiveState(VirtualUniverse u) {
universe = u;
}
- void reset(Locale l) {
+ void reset(Locale l) {
locale = l;
clear();
}
@@ -215,7 +215,7 @@ class SetLiveState extends Object {
nodeList.clear();
viewScopedNodeList = null;
scopedNodesViewList = null;
-
+
notifyThreads = 0;
transformTargets = null;
lights = null;
@@ -226,7 +226,7 @@ class SetLiveState extends Object {
changedViewGroup = null;
changedViewList = null;
keyList = null;
-
+
behaviorNodes.clear();
traverseFlags = 0;
@@ -261,13 +261,13 @@ class SetLiveState extends Object {
localToVworld = null;
localToVworldIndex = null;
localToVworldKeys = null;
-
+
// XXXX: optimization for targetThreads computation, require
// cleanup in GroupRetained.doSetLive()
//transformTargetThreads = 0;
hashkeyIndex = null;
-
+
// Fix for issue 75
parentBranchGroupPaths = null;
branchGroupPaths = null;
diff --git a/src/classes/share/javax/media/j3d/ShaderAppearance.java b/src/classes/share/javax/media/j3d/ShaderAppearance.java
index e18bdc6..5e27e3f 100644
--- a/src/classes/share/javax/media/j3d/ShaderAppearance.java
+++ b/src/classes/share/javax/media/j3d/ShaderAppearance.java
@@ -165,7 +165,7 @@ public class ShaderAppearance extends Appearance {
}
((ShaderAppearanceRetained)this.retained).setShaderProgram(shaderProgram);
-
+
}
diff --git a/src/classes/share/javax/media/j3d/ShaderAppearanceRetained.java b/src/classes/share/javax/media/j3d/ShaderAppearanceRetained.java
index 506e971..ac37215 100644
--- a/src/classes/share/javax/media/j3d/ShaderAppearanceRetained.java
+++ b/src/classes/share/javax/media/j3d/ShaderAppearanceRetained.java
@@ -44,13 +44,13 @@ class ShaderAppearanceRetained extends AppearanceRetained {
// Issue 485 - these values must start after the last value in Appearance
static final int SHADER_PROGRAM = 0x0800;
- static final int SHADER_ATTRIBUTE_SET = 0x1000;
+ static final int SHADER_ATTRIBUTE_SET = 0x1000;
//
// State variables: these should all be initialized to approproate
// Java 3D defaults.
//
-
+
protected ShaderProgramRetained shaderProgram = null;
protected ShaderAttributeSetRetained shaderAttributeSet = null;
protected boolean isMirror = false; // For Debugging.
@@ -71,14 +71,14 @@ class ShaderAppearanceRetained extends AppearanceRetained {
}
if (sp != null) {
- ((ShaderProgramRetained)sp.retained).setLive(inBackgroundGroup,
+ ((ShaderProgramRetained)sp.retained).setLive(inBackgroundGroup,
refCount);
((ShaderProgramRetained)sp.retained).copyMirrorUsers(this);
}
-
- sendMessage(SHADER_PROGRAM,
+
+ sendMessage(SHADER_PROGRAM,
(sp != null ? ((ShaderProgramRetained)sp.retained).mirror : null));
-
+
}
if (sp == null) {
@@ -95,7 +95,7 @@ class ShaderAppearanceRetained extends AppearanceRetained {
* @return current shader program object
*/
ShaderProgram getShaderProgram() {
- return (shaderProgram == null ? null : (ShaderProgram)shaderProgram.source);
+ return (shaderProgram == null ? null : (ShaderProgram)shaderProgram.source);
}
@@ -116,18 +116,18 @@ class ShaderAppearanceRetained extends AppearanceRetained {
}
if (sas != null) {
- ((ShaderAttributeSetRetained)sas.retained).setLive(inBackgroundGroup,
+ ((ShaderAttributeSetRetained)sas.retained).setLive(inBackgroundGroup,
refCount);
((ShaderAttributeSetRetained)sas.retained).copyMirrorUsers(this);
}
-
+
// System.err.println(" -- testing needed!");
- sendMessage(SHADER_ATTRIBUTE_SET,
- (sas != null ?
+ sendMessage(SHADER_ATTRIBUTE_SET,
+ (sas != null ?
((ShaderAttributeSetRetained)sas.retained).mirror : null));
-
+
}
-
+
if (sas == null) {
this.shaderAttributeSet = null;
} else {
@@ -142,7 +142,7 @@ class ShaderAppearanceRetained extends AppearanceRetained {
* @return current ShaderAttributeSet object
*/
ShaderAttributeSet getShaderAttributeSet() {
- return (shaderAttributeSet == null ? null : (ShaderAttributeSet)shaderAttributeSet.source);
+ return (shaderAttributeSet == null ? null : (ShaderAttributeSet)shaderAttributeSet.source);
}
@@ -155,7 +155,7 @@ class ShaderAppearanceRetained extends AppearanceRetained {
boolean equals(ShaderAppearanceRetained sApp) {
boolean flag;
flag = (sApp == this);
-
+
// If the reference is the same, we can stop check.
if(flag)
return flag;
@@ -164,16 +164,16 @@ class ShaderAppearanceRetained extends AppearanceRetained {
flag = ((sApp != null) &&
(shaderProgram == sApp.shaderProgram) &&
(shaderAttributeSet == sApp.shaderAttributeSet));
-
+
if (!flag)
return flag;
-
+
return super.equals(sApp);
}
-
+
synchronized void createMirrorObject() {
// System.err.println("ShaderAppearanceRetained : createMirrorObject()");
@@ -205,11 +205,11 @@ class ShaderAppearanceRetained extends AppearanceRetained {
mirrorApp.shaderProgram = (ShaderProgramRetained)shaderProgram.mirror;
}
else {
- mirrorApp.shaderProgram = null;
+ mirrorApp.shaderProgram = null;
}
if(shaderAttributeSet != null) {
- mirrorApp.shaderAttributeSet =
+ mirrorApp.shaderAttributeSet =
(ShaderAttributeSetRetained)shaderAttributeSet.mirror;
}
else {
@@ -235,7 +235,7 @@ class ShaderAppearanceRetained extends AppearanceRetained {
else if ((component & SHADER_ATTRIBUTE_SET) != 0) {
mirrorApp.shaderAttributeSet = (ShaderAttributeSetRetained)value;
}
-
+
}
/**
@@ -280,25 +280,25 @@ class ShaderAppearanceRetained extends AppearanceRetained {
synchronized void addAMirrorUser(Shape3DRetained shape) {
super.addAMirrorUser(shape);
- if (shaderProgram != null)
+ if (shaderProgram != null)
shaderProgram.addAMirrorUser(shape);
- if (shaderAttributeSet != null)
+ if (shaderAttributeSet != null)
shaderAttributeSet.addAMirrorUser(shape);
}
-
+
synchronized void removeAMirrorUser(Shape3DRetained shape) {
-
+
super.removeAMirrorUser(shape);
- if (shaderProgram != null)
+ if (shaderProgram != null)
shaderProgram.removeAMirrorUser(shape);
- if (shaderAttributeSet != null)
+ if (shaderAttributeSet != null)
shaderAttributeSet.removeAMirrorUser(shape);
}
-
-
+
+
final void sendMessage(int attrMask, Object attr) {
ArrayList univList = new ArrayList();
- ArrayList gaList = Shape3DRetained.getGeomAtomsList(mirror.users, univList);
+ ArrayList gaList = Shape3DRetained.getGeomAtomsList(mirror.users, univList);
// Send to rendering attribute structure, regardless of
// whether there are users or not (alternate appearance case ..)
J3dMessage createMessage = new J3dMessage();
@@ -311,13 +311,13 @@ class ShaderAppearanceRetained extends AppearanceRetained {
createMessage.args[3] = new Integer(changedFrequent);
VirtualUniverse.mc.processMessage(createMessage);
-
+
//System.err.println("univList.size is " + univList.size());
for(int i=0; i
* 1) querying the sound's duration (Sound.DURATION_UNKNOWN will be returned),
* Initial Gain
*
- *
* Loop
*
*
- * A sound can be looped a specified number of times after it is activated
+ * A sound can be looped a specified number of times after it is activated
* before it is completed. The loop count value explicitly sets the number
* of times the sound is looped. Any non-negative number is a valid value.
* A value of zero denotes that the looped section is not repeated, but is
@@ -88,20 +88,20 @@ package javax.media.j3d;
*
* Release Flag
*
- *
* Continuous Flag
*
- *
* Enable Sound
@@ -111,14 +111,14 @@ package javax.media.j3d;
* state, gain control parameters, continuation state, and spatialization
* parameters. If the continuous state is true, even if the sound is not
* active, enabling the sound starts the sound silently "playing," so that
- * when the sound is activated, the sound is (potentially) heard from
+ * when the sound is activated, the sound is (potentially) heard from
* somewhere in the middle of the sound data. Activation state can change
* from active to inactive any number of times without stopping or starting
* the sound. To re-start a sound at the beginning of its data, re-enable
* the sound by calling setEnable with true.
*
* Setting the enable flag to true during construction acts as a request
- * to start the sound playing "as soon as it can" be started.
+ * to start the sound playing "as soon as it can" be started.
* This could be close to immediately in limited cases, but several conditions,
* detailed below, must be met for a sound to be ready to be played.
@@ -131,20 +131,20 @@ package javax.media.j3d;
*
* Setting the enable flag to true during construction acts as a request
- * to start the sound playing "as soon as it can" be started.
+ * to start the sound playing "as soon as it can" be started.
* This could be close to immediately in limited cases, but several conditions,
* detailed below, must be met for a sound to be ready to be played.
* Scheduling Bounds
*
*
* Scheduling Bounding Leaf
- *
- *
@@ -153,11 +153,11 @@ package javax.media.j3d;
*
@@ -172,7 +172,7 @@ package javax.media.j3d;
* channels
* and the fourth sound needs only one channel. The first and second sounds
* can be started because they require seven of the eight available channels. The
- * third sound can not be audibly started because it requires three channels and
+ * third sound can not be audibly started because it requires three channels and
* only one is still available. Consequently, the third sound starts playing
* 'silently.' The fourth sound can and will be started since it only requires
* one channel. The third sound will be made audible when three channels become
@@ -186,8 +186,8 @@ package javax.media.j3d;
* available audio output resources are described in the AudioDevice class.
* Duration
- *
- *
* Preparing a Sound to be Played
@@ -232,7 +232,7 @@ package javax.media.j3d;
* 2) is enabled then deactivated while playing; it continues playing silently
- * When the sound finishes playing it's sound data (including all loops), it
+ * When the sound finishes playing it's sound data (including all loops), it
* is implicitly disabled.
* @see AudioDevice
@@ -242,9 +242,9 @@ public abstract class Sound extends Leaf {
// Constants for Sound object.
//
// These flags, when enabled using the setCapability method, allow an
- // application to invoke methods that respectively read and write the
- // sound fields.
- // These capability flags are enforced only when the node is part of
+ // application to invoke methods that respectively read and write the
+ // sound fields.
+ // These capability flags are enforced only when the node is part of
// a live or compiled scene graph.
/**
@@ -316,7 +316,7 @@ public abstract class Sound extends Leaf {
*/
public static final int
ALLOW_CONT_PLAY_WRITE = CapabilityBits.SOUND_ALLOW_CONT_PLAY_WRITE;
-
+
/**
* Specifies that this node allows access to its object's sound on
* information.
@@ -330,7 +330,7 @@ public abstract class Sound extends Leaf {
*/
public static final int
ALLOW_ENABLE_WRITE = CapabilityBits.SOUND_ALLOW_ENABLE_WRITE;
-
+
/**
* Specifies that this node allows read access to its scheduling bounds
* information.
@@ -344,21 +344,21 @@ public abstract class Sound extends Leaf {
*/
public static final int
ALLOW_SCHEDULING_BOUNDS_WRITE = CapabilityBits.SOUND_ALLOW_SCHEDULING_BOUNDS_WRITE;
-
+
/**
* Specifies that this node allows read access to its priority order
* value.
*/
public static final int
ALLOW_PRIORITY_READ = CapabilityBits.SOUND_ALLOW_PRIORITY_READ;
-
+
/**
* Specifies that this node allows write access to its priority order
* value.
*/
public static final int
ALLOW_PRIORITY_WRITE = CapabilityBits.SOUND_ALLOW_PRIORITY_WRITE;
-
+
/**
* Specifies that this node allows access to its object's sound duration
* information.
@@ -386,7 +386,7 @@ public abstract class Sound extends Leaf {
*/
public static final int
ALLOW_CHANNELS_USED_READ = CapabilityBits.SOUND_ALLOW_CHANNELS_USED_READ;
-
+
/**
* Specifies that this node allows access to its object's mute flag
* information.
@@ -475,10 +475,10 @@ public abstract class Sound extends Leaf {
ALLOW_RATE_SCALE_FACTOR_READ,
ALLOW_RELEASE_READ,
ALLOW_SCHEDULING_BOUNDS_READ,
- ALLOW_SOUND_DATA_READ
+ ALLOW_SOUND_DATA_READ
};
-
-
+
+
/**
* Constructs and initializes a new Sound node using default
* parameters. The following defaults values are used:
@@ -500,11 +500,11 @@ public abstract class Sound extends Leaf {
public Sound() {
// set default read capabilities
setDefaultReadCapabilities(readCapabilities);
- }
+ }
/**
- * Constructs and initializes a new Sound node object using the provided
- * data and gain parameter values, and defaults for all other fields. This
+ * Constructs and initializes a new Sound node object using the provided
+ * data and gain parameter values, and defaults for all other fields. This
* constructor implicitly loads the sound data associated with this node if
* the implementation uses sound caching.
* @param soundData description of JMF source data used by this sound source
@@ -516,7 +516,7 @@ public abstract class Sound extends Leaf {
((SoundRetained)this.retained).setSoundData(soundData);
((SoundRetained)this.retained).setInitialGain(initialGain);
- }
+ }
/**
@@ -531,7 +531,7 @@ public abstract class Sound extends Leaf {
* when disabled
* @param enable flag specifying whether the sound is enabled
* @param region scheduling bounds
- * @param priority defines playback priority if too many sounds started
+ * @param priority defines playback priority if too many sounds started
*/
public Sound(MediaContainer soundData,
float initialGain,
@@ -552,7 +552,7 @@ public abstract class Sound extends Leaf {
((SoundRetained)this.retained).setEnable(enable);
((SoundRetained)this.retained).setSchedulingBounds(region);
((SoundRetained)this.retained).setPriority(priority);
- }
+ }
/**
* Constructs and initializes a new Sound node using provided parameter
@@ -566,7 +566,7 @@ public abstract class Sound extends Leaf {
* when disabled
* @param enable flag specifying whether the sound is enabled
* @param region scheduling bounds
- * @param priority defines playback priority if too many sounds started
+ * @param priority defines playback priority if too many sounds started
* @param rateFactor defines playback sample rate scale factor
* @since Java 3D 1.3
*/
@@ -581,7 +581,7 @@ public abstract class Sound extends Leaf {
float rateFactor ) {
// set default read capabilities
setDefaultReadCapabilities(readCapabilities);
-
+
((SoundRetained)this.retained).setSoundData(soundData);
((SoundRetained)this.retained).setInitialGain(initialGain);
((SoundRetained)this.retained).setLoop(loopCount);
@@ -591,7 +591,7 @@ public abstract class Sound extends Leaf {
((SoundRetained)this.retained).setSchedulingBounds(region);
((SoundRetained)this.retained).setPriority(priority);
((SoundRetained)this.retained).setRateScaleFactor(rateFactor);
- }
+ }
/**
* Sets fields that define the sound source data of this node.
@@ -603,8 +603,8 @@ public abstract class Sound extends Leaf {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_SOUND_DATA_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("Sound0"));
-
- if (this instanceof BackgroundSound)
+
+ if (this instanceof BackgroundSound)
((SoundRetained)this.retained).setSoundData(soundData);
else // instanceof PointSound or ConeSound
((PointSoundRetained)this.retained).setSoundData(soundData);
@@ -620,12 +620,12 @@ public abstract class Sound extends Leaf {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_SOUND_DATA_READ))
throw new CapabilityNotSetException(J3dI18N.getString("Sound1"));
-
+
return ((SoundRetained)this.retained).getSoundData();
}
/**
- * Set the overall gain scale factor applied to data associated with this
+ * Set the overall gain scale factor applied to data associated with this
* source to increase or decrease its overall amplitude.
* @param amplitude (gain) scale factor
* @exception CapabilityNotSetException if appropriate capability is
@@ -635,7 +635,7 @@ public abstract class Sound extends Leaf {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_INITIAL_GAIN_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("Sound2"));
-
+
((SoundRetained)this.retained).setInitialGain(amplitude);
}
@@ -649,7 +649,7 @@ public abstract class Sound extends Leaf {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_INITIAL_GAIN_READ))
throw new CapabilityNotSetException(J3dI18N.getString("Sound3"));
-
+
return ((SoundRetained)this.retained).getInitialGain();
}
@@ -663,7 +663,7 @@ public abstract class Sound extends Leaf {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_LOOP_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("Sound4"));
-
+
((SoundRetained)this.retained).setLoop(loopCount);
}
@@ -677,10 +677,10 @@ public abstract class Sound extends Leaf {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_LOOP_READ))
throw new CapabilityNotSetException(J3dI18N.getString("Sound5"));
-
+
return ((SoundRetained)this.retained).getLoop();
}
-
+
/**
* Enables or disables the release flag for the sound associated with
* this sound.
@@ -692,7 +692,7 @@ public abstract class Sound extends Leaf {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_RELEASE_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("Sound6"));
-
+
((SoundRetained)this.retained).setReleaseEnable(state);
}
@@ -706,10 +706,10 @@ public abstract class Sound extends Leaf {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_RELEASE_READ))
throw new CapabilityNotSetException(J3dI18N.getString("Sound7"));
-
+
return ((SoundRetained)this.retained).getReleaseEnable();
}
-
+
/**
* Enables or disables continuous play flag.
* @param state denotes if deactivated sound silently continues playing
@@ -720,7 +720,7 @@ public abstract class Sound extends Leaf {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_CONT_PLAY_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("Sound8"));
-
+
((SoundRetained)this.retained).setContinuousEnable(state);
}
@@ -734,10 +734,10 @@ public abstract class Sound extends Leaf {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_CONT_PLAY_READ))
throw new CapabilityNotSetException(J3dI18N.getString("Sound9"));
-
+
return ((SoundRetained)this.retained).getContinuousEnable();
}
-
+
/**
* Enable or disable sound.
* @param state enable (on/off) flag denotes if active sound is heard
@@ -748,13 +748,13 @@ public abstract class Sound extends Leaf {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_ENABLE_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("Sound10"));
-
- if (this instanceof BackgroundSound)
+
+ if (this instanceof BackgroundSound)
((SoundRetained)this.retained).setEnable(state);
else // instanceof PointSound or ConeSound
((PointSoundRetained)this.retained).setEnable(state);
}
-
+
/**
* Retrieves sound's enabled flag.
* @return sound enabled flag
@@ -765,7 +765,7 @@ public abstract class Sound extends Leaf {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_ENABLE_READ))
throw new CapabilityNotSetException(J3dI18N.getString("Sound21"));
-
+
return ((SoundRetained)this.retained).getEnable();
}
@@ -777,7 +777,7 @@ public abstract class Sound extends Leaf {
* region.
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public void setSchedulingBounds(Bounds region) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_SCHEDULING_BOUNDS_WRITE))
@@ -786,12 +786,12 @@ public abstract class Sound extends Leaf {
((SoundRetained)this.retained).setSchedulingBounds(region);
}
- /**
+ /**
* Retrieves the Sound node's scheduling bounds.
* @return this Sound's scheduling bounds information
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public Bounds getSchedulingBounds() {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_SCHEDULING_BOUNDS_READ))
@@ -809,7 +809,7 @@ public abstract class Sound extends Leaf {
* node's new scheduling region.
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public void setSchedulingBoundingLeaf(BoundingLeaf region) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_SCHEDULING_BOUNDS_WRITE))
@@ -818,12 +818,12 @@ public abstract class Sound extends Leaf {
((SoundRetained)this.retained).setSchedulingBoundingLeaf(region);
}
- /**
+ /**
* Retrieves the Sound node's scheduling bounding leaf.
* @return this Sound's scheduling bounding leaf information
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public BoundingLeaf getSchedulingBoundingLeaf() {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_SCHEDULING_BOUNDS_READ))
@@ -838,26 +838,26 @@ public abstract class Sound extends Leaf {
* @param priority value used to order sound's importance for playback.
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public void setPriority(float priority) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_PRIORITY_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("Sound15"));
-
+
((SoundRetained)this.retained).setPriority(priority);
}
-
+
/**
* Retrieves sound's priority value.
* @return sound priority value
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public float getPriority() {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_PRIORITY_READ))
throw new CapabilityNotSetException(J3dI18N.getString("Sound16"));
-
+
return ((SoundRetained)this.retained).getPriority();
}
@@ -869,7 +869,7 @@ public abstract class Sound extends Leaf {
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
- public long getDuration() {
+ public long getDuration() {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_DURATION_READ))
throw new CapabilityNotSetException(J3dI18N.getString("Sound17"));
@@ -890,7 +890,7 @@ public abstract class Sound extends Leaf {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_IS_READY_READ))
throw new CapabilityNotSetException(J3dI18N.getString("Sound22"));
-
+
return ((SoundRetained)this.retained).isReady();
}
@@ -908,7 +908,7 @@ public abstract class Sound extends Leaf {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_IS_READY_READ))
throw new CapabilityNotSetException(J3dI18N.getString("Sound22"));
-
+
return ((SoundRetained)this.retained).isReady(view);
}
@@ -924,7 +924,7 @@ public abstract class Sound extends Leaf {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_IS_PLAYING_READ))
throw new CapabilityNotSetException(J3dI18N.getString("Sound18"));
-
+
return ((SoundRetained)this.retained).isPlaying();
}
@@ -942,7 +942,7 @@ public abstract class Sound extends Leaf {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_IS_PLAYING_READ))
throw new CapabilityNotSetException(J3dI18N.getString("Sound18"));
-
+
return ((SoundRetained)this.retained).isPlaying(view);
}
@@ -957,7 +957,7 @@ public abstract class Sound extends Leaf {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_IS_PLAYING_READ))
throw new CapabilityNotSetException(J3dI18N.getString("Sound18"));
-
+
return ((SoundRetained)this.retained).isPlayingSilently();
}
@@ -977,23 +977,23 @@ public abstract class Sound extends Leaf {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_IS_PLAYING_READ))
throw new CapabilityNotSetException(J3dI18N.getString("Sound18"));
-
+
return ((SoundRetained)this.retained).isPlayingSilently(view);
}
- /**
+ /**
* Retrieves number of channels that are being used to render this sound
* on the audio device associated with the Virtual Universe's primary view.
* @return number of channels used by sound; returns 0 if not playing
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public int getNumberOfChannelsUsed() {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_CHANNELS_USED_READ))
throw new CapabilityNotSetException(J3dI18N.getString("Sound20"));
-
+
return ((SoundRetained)this.retained).getNumberOfChannelsUsed();
}
@@ -1010,7 +1010,7 @@ public abstract class Sound extends Leaf {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_CHANNELS_USED_READ))
throw new CapabilityNotSetException(J3dI18N.getString("Sound20"));
-
+
return ((SoundRetained)this.retained).getNumberOfChannelsUsed(view);
}
@@ -1026,13 +1026,13 @@ public abstract class Sound extends Leaf {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_MUTE_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("Sound23"));
-
+
((SoundRetained)this.retained).setMute(state);
}
/**
* Retrieves sound Mute state.
- * A return value of true does not imply that the sound has
+ * A return value of true does not imply that the sound has
* been started playing or is still playing silently.
* @return mute state flag
* @exception CapabilityNotSetException if appropriate capability is
@@ -1043,7 +1043,7 @@ public abstract class Sound extends Leaf {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_MUTE_READ))
throw new CapabilityNotSetException(J3dI18N.getString("Sound24"));
-
+
return ((SoundRetained)this.retained).getMute();
}
@@ -1058,13 +1058,13 @@ public abstract class Sound extends Leaf {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_PAUSE_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("Sound25"));
-
+
((SoundRetained)this.retained).setPause(state);
}
/**
* Retrieves the value of the Pause state flag.
- * A return value of true does not imply that the sound was
+ * A return value of true does not imply that the sound was
* started playing and then paused.
* @return pause state
* @exception CapabilityNotSetException if appropriate capability is
@@ -1075,7 +1075,7 @@ public abstract class Sound extends Leaf {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_PAUSE_READ))
throw new CapabilityNotSetException(J3dI18N.getString("Sound26"));
-
+
return ((SoundRetained)this.retained).getPause();
}
@@ -1093,7 +1093,7 @@ public abstract class Sound extends Leaf {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_RATE_SCALE_FACTOR_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("Sound27"));
-
+
((SoundRetained)this.retained).setRateScaleFactor(scaleFactor);
}
@@ -1108,7 +1108,7 @@ public abstract class Sound extends Leaf {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_RATE_SCALE_FACTOR_READ))
throw new CapabilityNotSetException(J3dI18N.getString("Sound28"));
-
+
return ((SoundRetained)this.retained).getRateScaleFactor();
}
@@ -1117,7 +1117,7 @@ public abstract class Sound extends Leaf {
*
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
- *
*
- * Rather than the programmer having to explicitly assign texture
+ * Rather than the programmer having to explicitly assign texture
* coordinates, Java 3D can automatically generate the texture
* coordinates to achieve texture mapping onto contours.
* The TexCoordGeneration attributes specify the functions for automatically
- * generating texture coordinates. The texture attributes that can be
+ * generating texture coordinates. The texture attributes that can be
* defined are:
*
*
*
@@ -99,12 +99,12 @@ import javax.vecmath.Vector4f;
* are the plane equation coefficients transformed into eye
* coordinates.
*
*
- *
@@ -114,8 +114,8 @@ import javax.vecmath.Vector4f;
* if TextureCubeMap is available.
*
*
*
*
@@ -58,7 +58,7 @@ import java.util.Hashtable;
* S and T coordinates, respectively. The boundary modes are as
* follows:
*
*
*
*
*
- * 0
through
* stateArray.length-1
.
*
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @exception IllegalStateException if the specified array is
@@ -719,7 +719,7 @@ public class Appearance extends NodeComponent {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_TEXTURE_UNIT_STATE_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("Appearance20"));
-
+
// Do illegal sharing check
if (stateArray != null) {
for(int j=0; jcloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
@@ -899,62 +899,62 @@ public class Appearance extends NodeComponent {
*/
void duplicateAttributes(NodeComponent originalNodeComponent,
boolean forceDuplicate) {
- super.duplicateAttributes(originalNodeComponent, forceDuplicate);
-
+ super.duplicateAttributes(originalNodeComponent, forceDuplicate);
+
Hashtable hashtable = originalNodeComponent.nodeHashtable;
-
+
AppearanceRetained app = (AppearanceRetained) originalNodeComponent.retained;
AppearanceRetained rt = (AppearanceRetained) retained;
-
+
rt.setMaterial((Material) getNodeComponent(app.getMaterial(),
forceDuplicate,
hashtable));
-
+
rt.setColoringAttributes((ColoringAttributes) getNodeComponent(
app.getColoringAttributes(),
forceDuplicate,
hashtable));
-
-
+
+
rt.setTransparencyAttributes((TransparencyAttributes) getNodeComponent(
app.getTransparencyAttributes(),
forceDuplicate,
hashtable));
-
-
+
+
rt.setRenderingAttributes((RenderingAttributes) getNodeComponent(
app.getRenderingAttributes(),
forceDuplicate,
hashtable));
-
-
+
+
rt.setPolygonAttributes((PolygonAttributes) getNodeComponent(
app.getPolygonAttributes(),
forceDuplicate,
hashtable));
-
-
+
+
rt.setLineAttributes((LineAttributes) getNodeComponent(
app.getLineAttributes(),
forceDuplicate,
hashtable));
-
-
+
+
rt.setPointAttributes((PointAttributes) getNodeComponent(
app.getPointAttributes(),
forceDuplicate,
hashtable));
-
+
rt.setTexture((Texture) getNodeComponent(app.getTexture(),
forceDuplicate,
hashtable));
-
+
rt.setTextureAttributes((TextureAttributes) getNodeComponent(
app.getTextureAttributes(),
forceDuplicate,
hashtable));
-
+
rt.setTexCoordGeneration((TexCoordGeneration) getNodeComponent(
app.getTexCoordGeneration(),
forceDuplicate,
@@ -970,14 +970,14 @@ public class Appearance extends NodeComponent {
hashtable));
}
}
-
+
}
-
+
/**
* This function is called from getNodeComponent() to see if any of
- * the sub-NodeComponents duplicateOnCloneTree flag is true.
- * If it is the case, current NodeComponent needs to
- * duplicate also even though current duplicateOnCloneTree flag is false.
+ * the sub-NodeComponents duplicateOnCloneTree flag is true.
+ * If it is the case, current NodeComponent needs to
+ * duplicate also even though current duplicateOnCloneTree flag is false.
* This should be overwrite by NodeComponent which contains sub-NodeComponent.
*/
boolean duplicateChild() {
@@ -991,27 +991,27 @@ public class Appearance extends NodeComponent {
nc = rt.getMaterial();
if ((nc != null) && nc.getDuplicateOnCloneTree())
return true;
-
+
nc = rt.getColoringAttributes();
if ((nc != null) && nc.getDuplicateOnCloneTree())
return true;
-
+
nc = rt.getTransparencyAttributes();
if ((nc != null) && nc.getDuplicateOnCloneTree())
return true;
-
+
nc = rt.getPolygonAttributes();
if ((nc != null) && nc.getDuplicateOnCloneTree())
return true;
-
+
nc = rt.getLineAttributes();
if ((nc != null) && nc.getDuplicateOnCloneTree())
return true;
-
+
nc = rt.getPointAttributes();
if ((nc != null) && nc.getDuplicateOnCloneTree())
return true;
-
+
nc = rt.getTexture();
if ((nc != null) && nc.duplicateChild())
return true;
@@ -1025,7 +1025,7 @@ public class Appearance extends NodeComponent {
return true;
// XXXX: TextureUnitState
-
+
return false;
}
diff --git a/src/classes/share/javax/media/j3d/AppearanceRetained.java b/src/classes/share/javax/media/j3d/AppearanceRetained.java
index 9e3629f..b771957 100644
--- a/src/classes/share/javax/media/j3d/AppearanceRetained.java
+++ b/src/classes/share/javax/media/j3d/AppearanceRetained.java
@@ -82,10 +82,10 @@ class AppearanceRetained extends NodeComponentRetained {
// Lock used for synchronization of live state
Object liveStateLock = new Object();
-
+
// NOTE: Consider grouping random state into common objects
- // Cache used during compilation. If map == compState, then
+ // Cache used during compilation. If map == compState, then
// mapAppearance can be used for this appearance
CompileState map = null;
AppearanceRetained mapAppearance = null;
@@ -131,7 +131,7 @@ class AppearanceRetained extends NodeComponentRetained {
// appaearance as users of this material
((MaterialRetained)material.retained).copyMirrorUsers(this);
}
- sendMessage(MATERIAL,
+ sendMessage(MATERIAL,
(material != null ?
((MaterialRetained)material.retained).mirror : null), true);
}
@@ -150,7 +150,7 @@ class AppearanceRetained extends NodeComponentRetained {
Material getMaterial() {
return (material == null ? null : (Material)material.source);
}
-
+
/**
* Sets the texture object to the specified object.
* @param texture object that specifies the desired texture
@@ -169,11 +169,11 @@ class AppearanceRetained extends NodeComponentRetained {
((TextureRetained)texture.retained).setLive(inBackgroundGroup, refCount);
((TextureRetained)texture.retained).copyMirrorUsers(this);
}
- sendMessage(TEXTURE,
+ sendMessage(TEXTURE,
(texture != null ?
((TextureRetained)texture.retained).mirror : null), true);
- }
+ }
if (texture == null) {
@@ -185,7 +185,7 @@ class AppearanceRetained extends NodeComponentRetained {
}
/**
- * Retrieves the current texture object.
+ * Retrieves the current texture object.
* @return the texture object
*/
Texture getTexture() {
@@ -211,12 +211,12 @@ class AppearanceRetained extends NodeComponentRetained {
((TextureAttributesRetained)textureAttributes.retained).setLive(inBackgroundGroup, refCount);
((TextureAttributesRetained)textureAttributes.retained).copyMirrorUsers(this);
}
- sendMessage(TEXTURE_ATTR,
+ sendMessage(TEXTURE_ATTR,
(textureAttributes != null ?
((TextureAttributesRetained)textureAttributes.retained).mirror:
null), true);
- }
+ }
if (textureAttributes == null) {
@@ -255,11 +255,11 @@ class AppearanceRetained extends NodeComponentRetained {
((ColoringAttributesRetained)coloringAttributes.retained).setLive(inBackgroundGroup, refCount);
((ColoringAttributesRetained)coloringAttributes.retained).copyMirrorUsers(this);
}
- sendMessage(COLOR,
- (coloringAttributes != null ?
+ sendMessage(COLOR,
+ (coloringAttributes != null ?
((ColoringAttributesRetained)coloringAttributes.retained).mirror:
null), true);
- }
+ }
if (coloringAttributes == null) {
@@ -299,10 +299,10 @@ class AppearanceRetained extends NodeComponentRetained {
((TransparencyAttributesRetained)transparencyAttributes.retained).copyMirrorUsers(this);
}
- sendMessage(TRANSPARENCY,
- (transparencyAttributes != null ?
+ sendMessage(TRANSPARENCY,
+ (transparencyAttributes != null ?
((TransparencyAttributesRetained)transparencyAttributes.retained).mirror: null), true);
- }
+ }
if (transparencyAttributes == null) {
@@ -389,12 +389,12 @@ class AppearanceRetained extends NodeComponentRetained {
((PolygonAttributesRetained)polygonAttributes.retained).setLive(inBackgroundGroup, refCount);
((PolygonAttributesRetained)polygonAttributes.retained).copyMirrorUsers(this);
}
- sendMessage(POLYGON,
+ sendMessage(POLYGON,
(polygonAttributes != null ?
((PolygonAttributesRetained)polygonAttributes.retained).mirror :
null), true);
- }
+ }
if (polygonAttributes == null) {
this.polygonAttributes = null;
@@ -432,10 +432,10 @@ class AppearanceRetained extends NodeComponentRetained {
((LineAttributesRetained)lineAttributes.retained).setLive(inBackgroundGroup, refCount);
((LineAttributesRetained)lineAttributes.retained).copyMirrorUsers(this);
}
- sendMessage(LINE,
- (lineAttributes != null ?
+ sendMessage(LINE,
+ (lineAttributes != null ?
((LineAttributesRetained)lineAttributes.retained).mirror: null), true);
- }
+ }
if (lineAttributes == null) {
@@ -473,11 +473,11 @@ class AppearanceRetained extends NodeComponentRetained {
((PointAttributesRetained)pointAttributes.retained).setLive(inBackgroundGroup, refCount);
((PointAttributesRetained)pointAttributes.retained).copyMirrorUsers(this);
}
- sendMessage(POINT,
+ sendMessage(POINT,
(pointAttributes != null ?
- ((PointAttributesRetained)pointAttributes.retained).mirror:
+ ((PointAttributesRetained)pointAttributes.retained).mirror:
null), true);
- }
+ }
if (pointAttributes == null) {
@@ -515,10 +515,10 @@ class AppearanceRetained extends NodeComponentRetained {
((TexCoordGenerationRetained)texGen.retained).setLive(inBackgroundGroup, refCount);
((TexCoordGenerationRetained)texGen.retained).copyMirrorUsers(this);
}
- sendMessage(TEXCOORD_GEN,
+ sendMessage(TEXCOORD_GEN,
(texGen != null ?
((TexCoordGenerationRetained)texGen.retained).mirror : null), true);
- }
+ }
if (texGen == null) {
this.texCoordGeneration = null;
@@ -545,7 +545,7 @@ class AppearanceRetained extends NodeComponentRetained {
void setTextureUnitState(TextureUnitState[] stateArray) {
int i;
-
+
synchronized(liveStateLock) {
if (source.isLive()) {
@@ -567,9 +567,9 @@ class AppearanceRetained extends NodeComponentRetained {
// -1 index means the entire array is to be set
args[0] = new Integer(-1);
-
+
// make a copy of the array for the message,
- TextureUnitStateRetained mirrorStateArray[] =
+ TextureUnitStateRetained mirrorStateArray[] =
new TextureUnitStateRetained[stateArray.length];
args[1] = (Object) mirrorStateArray;
@@ -592,7 +592,7 @@ class AppearanceRetained extends NodeComponentRetained {
} else {
sendMessage(TEXTURE_UNIT_STATE, null, true);
}
- }
+ }
// assign the retained copy of the texture unit state to the
// appearance
@@ -603,14 +603,14 @@ class AppearanceRetained extends NodeComponentRetained {
// make another copy of the array for the retained object
// itself if it doesn't have a copy or the array size is
// not the same
- if ((this.texUnitState == null) ||
+ if ((this.texUnitState == null) ||
(this.texUnitState.length != stateArray.length)) {
this.texUnitState = new TextureUnitStateRetained[
stateArray.length];
}
for (i = 0; i < stateArray.length; i++) {
if (stateArray[i] != null) {
- this.texUnitState[i] =
+ this.texUnitState[i] =
(TextureUnitStateRetained)stateArray[i].retained;
} else {
this.texUnitState[i] = null;
@@ -621,7 +621,7 @@ class AppearanceRetained extends NodeComponentRetained {
}
void setTextureUnitState(int index, TextureUnitState state) {
-
+
synchronized(liveStateLock) {
if (source.isLive()) {
@@ -648,7 +648,7 @@ class AppearanceRetained extends NodeComponentRetained {
args[1] = null;
sendMessage(TEXTURE_UNIT_STATE, args, true);
}
- }
+ }
// assign the retained copy of the texture unit state to the
// appearance
@@ -672,7 +672,7 @@ class AppearanceRetained extends NodeComponentRetained {
if (texUnitState == null) {
return null;
} else {
- TextureUnitState tus[] =
+ TextureUnitState tus[] =
new TextureUnitState[texUnitState.length];
for (int i = 0; i < texUnitState.length; i++) {
if (texUnitState[i] != null) {
@@ -687,13 +687,13 @@ class AppearanceRetained extends NodeComponentRetained {
/**
* Retrieves the texture unit state object at the specified
- * index within the texture unit state array.
+ * index within the texture unit state array.
*/
TextureUnitState getTextureUnitState(int index) {
// let Java throw an exception if texUnitState == null or
// index is >= length
- if (texUnitState[index] != null)
+ if (texUnitState[index] != null)
return (TextureUnitState)texUnitState[index].source;
else
return null;
@@ -719,7 +719,7 @@ class AppearanceRetained extends NodeComponentRetained {
synchronized void createMirrorObject() {
if (mirror == null) {
// we can't check isStatic() since it sub-NodeComponent
- // create a new one, we should create a
+ // create a new one, we should create a
// new AppearanceRetained() even though isStatic() = true.
// For simplicity, always create a retained side.
mirror = new AppearanceRetained();
@@ -742,24 +742,24 @@ class AppearanceRetained extends NodeComponentRetained {
// Fix for Issue 33: copy the changedFrequent mask to mirror
mirrorApp.changedFrequent = changedFrequent;
- if (material != null) {
+ if (material != null) {
mirrorApp.material = (MaterialRetained)material.mirror;
} else {
mirrorApp.material = null;
}
- if (texture != null) {
+ if (texture != null) {
mirrorApp.texture = (TextureRetained)texture.mirror;
} else {
mirrorApp.texture = null;
}
- if (texCoordGeneration != null) {
+ if (texCoordGeneration != null) {
mirrorApp.texCoordGeneration = (TexCoordGenerationRetained)texCoordGeneration.mirror;
} else {
mirrorApp.texCoordGeneration = null;
}
- if (textureAttributes != null) {
+ if (textureAttributes != null) {
mirrorApp.textureAttributes = (TextureAttributesRetained)textureAttributes.mirror;
} else {
mirrorApp.textureAttributes = null;
@@ -767,11 +767,11 @@ class AppearanceRetained extends NodeComponentRetained {
// TextureUnitState supercedes the single texture interface
if (texUnitState != null && texUnitState.length > 0) {
- mirrorApp.texUnitState =
+ mirrorApp.texUnitState =
new TextureUnitStateRetained[texUnitState.length];
for (int i = 0; i < texUnitState.length; i++) {
if (texUnitState[i] != null) {
- mirrorApp.texUnitState[i] =
+ mirrorApp.texUnitState[i] =
(TextureUnitStateRetained)texUnitState[i].mirror;
}
}
@@ -787,44 +787,44 @@ class AppearanceRetained extends NodeComponentRetained {
mirrorApp.texCoordGeneration);
}
- if (coloringAttributes != null) {
+ if (coloringAttributes != null) {
mirrorApp.coloringAttributes = (ColoringAttributesRetained)coloringAttributes.mirror;
} else {
mirrorApp.coloringAttributes = null;
}
- if (transparencyAttributes != null) {
+ if (transparencyAttributes != null) {
mirrorApp.transparencyAttributes = (TransparencyAttributesRetained)transparencyAttributes.mirror;
} else {
mirrorApp.transparencyAttributes = null;
}
- if (renderingAttributes != null) {
+ if (renderingAttributes != null) {
mirrorApp.renderingAttributes = (RenderingAttributesRetained)renderingAttributes.mirror;
} else {
mirrorApp.renderingAttributes = null;
}
- if (polygonAttributes != null) {
+ if (polygonAttributes != null) {
mirrorApp.polygonAttributes = (PolygonAttributesRetained)polygonAttributes.mirror;
} else {
mirrorApp.polygonAttributes = null;
}
- if (lineAttributes != null) {
+ if (lineAttributes != null) {
mirrorApp.lineAttributes = (LineAttributesRetained)lineAttributes.mirror;
} else {
mirrorApp.lineAttributes = null;
}
- if (pointAttributes != null) {
+ if (pointAttributes != null) {
mirrorApp.pointAttributes = (PointAttributesRetained)pointAttributes.mirror;
} else {
mirrorApp.pointAttributes = null;
}
}
- /**
- * Update the "component" field of the mirror object with the
+ /**
+ * Update the "component" field of the mirror object with the
* given "value"
*/
synchronized void updateMirrorObject(int component, Object value) {
@@ -863,10 +863,10 @@ class AppearanceRetained extends NodeComponentRetained {
} else {
int index = ((Integer)args[0]).intValue();
if (index == -1) {
- mirrorApp.texUnitState =
+ mirrorApp.texUnitState =
(TextureUnitStateRetained [])args[1];
} else {
- mirrorApp.texUnitState[index] =
+ mirrorApp.texUnitState[index] =
(TextureUnitStateRetained)args[1];
}
}
@@ -904,9 +904,9 @@ class AppearanceRetained extends NodeComponentRetained {
*/
void doSetLive(boolean backgroundGroup, int refCount) {
// System.err.println("AppearceRetained.doSetLive()");
-
- if (material != null) {
-
+
+ if (material != null) {
+
material.setLive(backgroundGroup, refCount);
}
@@ -921,7 +921,7 @@ class AppearanceRetained extends NodeComponentRetained {
}
if (textureAttributes != null) {
-
+
textureAttributes.setLive(backgroundGroup, refCount);
}
@@ -932,7 +932,7 @@ class AppearanceRetained extends NodeComponentRetained {
}
}
-
+
if (coloringAttributes != null) {
coloringAttributes.setLive(backgroundGroup, refCount);
}
@@ -984,7 +984,7 @@ class AppearanceRetained extends NodeComponentRetained {
if (texUnitState != null) {
for (int i = 0; i < texUnitState.length; i++) {
- if (texUnitState[i] != null)
+ if (texUnitState[i] != null)
texUnitState[i].clearLive(refCount);
}
}
@@ -1022,26 +1022,26 @@ class AppearanceRetained extends NodeComponentRetained {
boolean isStatic() {
boolean flag;
- flag = (source.capabilityBitsEmpty() &&
+ flag = (source.capabilityBitsEmpty() &&
((texture == null) ||
texture.source.capabilityBitsEmpty()) &&
- ((texCoordGeneration == null) ||
- texCoordGeneration.source.capabilityBitsEmpty()) &&
- ((textureAttributes == null) ||
+ ((texCoordGeneration == null) ||
+ texCoordGeneration.source.capabilityBitsEmpty()) &&
+ ((textureAttributes == null) ||
textureAttributes.source.capabilityBitsEmpty()) &&
((coloringAttributes == null) ||
coloringAttributes.source.capabilityBitsEmpty()) &&
- ((transparencyAttributes == null) ||
+ ((transparencyAttributes == null) ||
transparencyAttributes.source.capabilityBitsEmpty()) &&
- ((renderingAttributes == null) ||
+ ((renderingAttributes == null) ||
renderingAttributes.source.capabilityBitsEmpty()) &&
- ((polygonAttributes == null) ||
+ ((polygonAttributes == null) ||
polygonAttributes.source.capabilityBitsEmpty()) &&
- ((lineAttributes == null) ||
+ ((lineAttributes == null) ||
lineAttributes.source.capabilityBitsEmpty()) &&
- ((pointAttributes == null) ||
+ ((pointAttributes == null) ||
pointAttributes.source.capabilityBitsEmpty()) &&
- ((material == null) ||
+ ((material == null) ||
material.source.capabilityBitsEmpty()));
if (!flag)
@@ -1081,7 +1081,7 @@ class AppearanceRetained extends NodeComponentRetained {
texUnitState[i].compile(compState);
}
}
-
+
if (coloringAttributes != null) {
coloringAttributes.compile(compState);
}
@@ -1113,13 +1113,13 @@ class AppearanceRetained extends NodeComponentRetained {
/**
* Returns the hashcode for this object.
- * hashcode should be constant for object but same for two objects
+ * hashcode should be constant for object but same for two objects
* if .equals() is true. For an appearance (where .equals() is going
* to use the values in the appearance), the only way to have a
* constant value is for all appearances to have the same hashcode, so
* we use the hashcode of the class obj.
*
- * Since hashCode is only used by AppearanceMap (at present) we may be
+ * Since hashCode is only used by AppearanceMap (at present) we may be
* able to improve efficency by calcing a hashCode from the values.
*/
public int hashCode() {
@@ -1141,30 +1141,30 @@ class AppearanceRetained extends NodeComponentRetained {
((texture == app.texture) ||
((texture != null) && texture.equals(app.texture))) &&
((renderingAttributes == app.renderingAttributes) ||
- ((renderingAttributes != null) &&
+ ((renderingAttributes != null) &&
renderingAttributes.equivalent(
app.renderingAttributes))) &&
- ((polygonAttributes == app.polygonAttributes) ||
- ((polygonAttributes != null) &&
+ ((polygonAttributes == app.polygonAttributes) ||
+ ((polygonAttributes != null) &&
polygonAttributes.equivalent(app.polygonAttributes))) &&
((texCoordGeneration == app.texCoordGeneration) ||
- ((texCoordGeneration != null) &&
- texCoordGeneration.equivalent(app.texCoordGeneration))) &&
+ ((texCoordGeneration != null) &&
+ texCoordGeneration.equivalent(app.texCoordGeneration))) &&
((textureAttributes == app.textureAttributes) ||
- ((textureAttributes != null) &&
- textureAttributes.equivalent(app.textureAttributes))) &&
+ ((textureAttributes != null) &&
+ textureAttributes.equivalent(app.textureAttributes))) &&
((coloringAttributes == app.coloringAttributes) ||
- ((coloringAttributes != null) &&
- coloringAttributes.equivalent(app.coloringAttributes))) &&
+ ((coloringAttributes != null) &&
+ coloringAttributes.equivalent(app.coloringAttributes))) &&
((transparencyAttributes == app.transparencyAttributes) ||
- ((transparencyAttributes != null) &&
+ ((transparencyAttributes != null) &&
transparencyAttributes.equivalent(
- app.transparencyAttributes))) &&
+ app.transparencyAttributes))) &&
((lineAttributes == app.lineAttributes) ||
- ((lineAttributes != null) &&
- lineAttributes.equivalent(app.lineAttributes))) &&
+ ((lineAttributes != null) &&
+ lineAttributes.equivalent(app.lineAttributes))) &&
((pointAttributes == app.pointAttributes) ||
- ((pointAttributes != null) &&
+ ((pointAttributes != null) &&
pointAttributes.equivalent(app.pointAttributes)))));
if (!flag)
@@ -1178,7 +1178,7 @@ class AppearanceRetained extends NodeComponentRetained {
return (false);
for (int i = 0; i < texUnitState.length; i++) {
- if (texUnitState[i] == app.texUnitState[i])
+ if (texUnitState[i] == app.texUnitState[i])
continue;
if (texUnitState[i] == null || app.texUnitState[i] == null ||
@@ -1194,14 +1194,14 @@ class AppearanceRetained extends NodeComponentRetained {
synchronized void addAMirrorUser(Shape3DRetained shape) {
super.addAMirrorUser(shape);
- if (material != null)
+ if (material != null)
material.addAMirrorUser(shape);
- if (texture != null)
+ if (texture != null)
texture.addAMirrorUser(shape);
- if (texCoordGeneration != null)
+ if (texCoordGeneration != null)
texCoordGeneration.addAMirrorUser(shape);
- if (textureAttributes != null)
+ if (textureAttributes != null)
textureAttributes.addAMirrorUser(shape);
if (texUnitState != null) {
@@ -1211,29 +1211,29 @@ class AppearanceRetained extends NodeComponentRetained {
}
}
- if (coloringAttributes != null)
+ if (coloringAttributes != null)
coloringAttributes.addAMirrorUser(shape);
- if (transparencyAttributes != null)
+ if (transparencyAttributes != null)
transparencyAttributes.addAMirrorUser(shape);
- if (renderingAttributes != null)
+ if (renderingAttributes != null)
renderingAttributes.addAMirrorUser(shape);
- if (polygonAttributes != null)
+ if (polygonAttributes != null)
polygonAttributes.addAMirrorUser(shape);
- if (lineAttributes != null)
+ if (lineAttributes != null)
lineAttributes.addAMirrorUser(shape);
- if (pointAttributes != null)
+ if (pointAttributes != null)
pointAttributes.addAMirrorUser(shape);
}
synchronized void removeAMirrorUser(Shape3DRetained shape) {
super.removeAMirrorUser(shape);
- if (material != null)
+ if (material != null)
material.removeAMirrorUser(shape);
- if (texture != null)
+ if (texture != null)
texture.removeAMirrorUser(shape);
- if (texCoordGeneration != null)
+ if (texCoordGeneration != null)
texCoordGeneration.removeAMirrorUser(shape);
- if (textureAttributes != null)
+ if (textureAttributes != null)
textureAttributes.removeAMirrorUser(shape);
if (texUnitState != null) {
@@ -1243,24 +1243,24 @@ class AppearanceRetained extends NodeComponentRetained {
}
}
- if (coloringAttributes != null)
+ if (coloringAttributes != null)
coloringAttributes.removeAMirrorUser(shape);
- if (transparencyAttributes != null)
+ if (transparencyAttributes != null)
transparencyAttributes.removeAMirrorUser(shape);
- if (renderingAttributes != null)
+ if (renderingAttributes != null)
renderingAttributes.removeAMirrorUser(shape);
- if (polygonAttributes != null)
+ if (polygonAttributes != null)
polygonAttributes.removeAMirrorUser(shape);
- if (lineAttributes != null)
+ if (lineAttributes != null)
lineAttributes.removeAMirrorUser(shape);
- if (pointAttributes != null)
+ if (pointAttributes != null)
pointAttributes.removeAMirrorUser(shape);
}
// 3rd argument used only when Rendering Attr comp changes
final void sendMessage(int attrMask, Object attr, boolean visible) {
ArrayList univList = new ArrayList();
- ArrayList gaList = Shape3DRetained.getGeomAtomsList(mirror.users, univList);
+ ArrayList gaList = Shape3DRetained.getGeomAtomsList(mirror.users, univList);
// Send to rendering attribute structure, regardless of
// whether there are users or not (alternate appearance case ..)
J3dMessage createMessage = new J3dMessage();
@@ -1274,13 +1274,13 @@ class AppearanceRetained extends NodeComponentRetained {
VirtualUniverse.mc.processMessage(createMessage);
-
+
// System.err.println("univList.size is " + univList.size());
for(int i=0; i The selection of this device driver is done through methods in the
* PhysicalEnvironment object - see PhysicalEnvironment class.
* The application would query how many audio devices are available. For
* each device, the user can get the AudioDevice object that describes it
* and query its characteristics. Once a decision is made about which of
- * the available audio devices to use for a PhysicalEnvironment, the
+ * the available audio devices to use for a PhysicalEnvironment, the
* particular device is set into this PhysicalEnvironment's fields. Each
* PhysicalEnvironment object may use only a single audio device.
*
*
- * Each audio device driver must be initialized.
- * The chosen device driver should be initialized before any Java3D
- * Sound methods are executed because the implementation of the Sound
+ * Each audio device driver must be initialized.
+ * The chosen device driver should be initialized before any Java3D
+ * Sound methods are executed because the implementation of the Sound
* methods, in general, are potentially device driver dependent.
*
- * These methods set and retrieve the distance in meters from the center
- * ear (the midpoint between the left and right ears) and one of the
+ * These methods set and retrieve the distance in meters from the center
+ * ear (the midpoint between the left and right ears) and one of the
* speakers in the listener's environment. For monaural speaker playback,
* a typical distance from the listener to the speaker in a workstation
* cabinet is 0.76 meters. For stereo speakers placed at the sides of the
@@ -111,12 +111,12 @@ package javax.media.j3d;
*
*
* While the sound image created for final output to the playback system
* is either only mono or stereo (for this version of Java3D) most device
- * driver implementations will mix the left and right image signals
+ * driver implementations will mix the left and right image signals
* generated for each rendered sound source before outputting the final
* playback image. Each sound source will use N input channels of this
* internal mixer. Each implemented Java3D audio device driver will have
* its own limitations and driver-specific characteristics. These include
- * channel availability and usage (during rendering). Methods for
+ * channel availability and usage (during rendering). Methods for
* querying these device-driver specific characteristics are provided.
* Muted sound take channels up on the systems mixer (because they're
* rendered as samples playing with gain zero.
*
- *
* Rolloff scale factor is used to model atmospheric changes from normal
* speed of sound. The base value, 0.344 meters/millisecond is used
- * to approximate the speed of sound through air at room temperature,
+ * to approximate the speed of sound through air at room temperature,
* is multipled by this scale factor whenever the speed of sound is
* applied during spatialization calculations.
* Valid values are >= 0.0. Values > 1.0 increase the speed of sound,
@@ -63,17 +63,17 @@ import javax.vecmath.Point2f;
*
* Auralization is the environmental modeling of sound iteratively
* reflecting off the surfaces of the bounded region the listener is in.
- * Auralization components include
+ * Auralization components include
* early, distinct, low-order reflections and later, dense,
* higher-order reflections referred to as reverberation.
- * These reflections are attenuated relative to the direct, unreflected
+ * These reflections are attenuated relative to the direct, unreflected
* sound. The difference in gain between direct and reflected sound
- * gives the listener a sense of the surface material and
+ * gives the listener a sense of the surface material and
* the relative distance of the sound.
- * The delay between the start of the direct sound and start of
- * reverberation (as detected by the listener),
+ * The delay between the start of the direct sound and start of
+ * reverberation (as detected by the listener),
* as well as the length of time reverberation is audible as it
- * exponentially decays, give the listener a sense of the size of the
+ * exponentially decays, give the listener a sense of the size of the
* listening space.
*
Diffusion
* Echo dispersement of reverberation.
Reverb Bounds
- * Approximates the volume of the listening space.
* If specified, it defines the reverberation delay.
Reverb Order
Optionally limits the amount of times during
- * reverb calculation that a sound is recursively reflected off the
+ *
- */
+ */
public AuralAttributes() {
// Just use default values
// set default read capabilities
@@ -553,7 +553,7 @@ public class AuralAttributes extends NodeComponent {
* @param distanceFilter frequency cutoff
* @param frequencyScaleFactor applied to change of pitch
* @param velocityScaleFactor applied to velocity of sound in relation to listener
- */
+ */
public AuralAttributes(float gain,
float rolloff,
float reflectionCoefficient,
@@ -590,7 +590,7 @@ public class AuralAttributes extends NodeComponent {
* @param frequencyCutoff distance filter frequency cutoff
* @param frequencyScaleFactor applied to velocity/wave-length
* @param velocityScaleFactor applied to velocity of sound in relation to listener
- */
+ */
public AuralAttributes(float gain,
float rolloff,
float reflectionCoefficient,
@@ -679,79 +679,79 @@ public class AuralAttributes extends NodeComponent {
/**
* Creates the retained mode AuralAttributesRetained object that this
* component object will point to.
- */
+ */
void createRetained() {
this.retained = new AuralAttributesRetained();
this.retained.setSource(this);
}
/** ****************************************
- *
+ *
* Attribute Gain
*
* ****************************************/
/**
* Set Attribute Gain (amplitude) scale factor.
* @param gain scale factor applied to amplitude of direct and reflected sound
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public void setAttributeGain(float gain) {
if (isLiveOrCompiled())
- if (!this.getCapability(ALLOW_ATTRIBUTE_GAIN_WRITE))
- throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes0"));
+ if (!this.getCapability(ALLOW_ATTRIBUTE_GAIN_WRITE))
+ throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes0"));
((AuralAttributesRetained)this.retained).setAttributeGain(gain);
}
/**
* Retrieve Attribute Gain (amplitude).
* @return gain amplitude scale factor
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public float getAttributeGain() {
if (isLiveOrCompiled())
- if (!this.getCapability(ALLOW_ATTRIBUTE_GAIN_READ))
- throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes1"));
+ if (!this.getCapability(ALLOW_ATTRIBUTE_GAIN_READ))
+ throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes1"));
return ((AuralAttributesRetained)this.retained).getAttributeGain();
}
/**
* Set Attribute Gain Rolloff.
* @param rolloff atmospheric gain scale factor (changing speed of sound)
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public void setRolloff(float rolloff) {
if (isLiveOrCompiled())
- if (!this.getCapability(ALLOW_ROLLOFF_WRITE))
- throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes2"));
+ if (!this.getCapability(ALLOW_ROLLOFF_WRITE))
+ throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes2"));
((AuralAttributesRetained)this.retained).setRolloff(rolloff);
}
/**
* Retrieve Attribute Gain Rolloff.
* @return rolloff atmospheric gain scale factor (changing speed of sound)
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public float getRolloff() {
if (isLiveOrCompiled())
- if (!this.getCapability(ALLOW_ROLLOFF_READ))
- throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes3"));
+ if (!this.getCapability(ALLOW_ROLLOFF_READ))
+ throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes3"));
return ((AuralAttributesRetained)this.retained).getRolloff();
}
/**
- * Set Reflective Coefficient.
+ * Set Reflective Coefficient.
* Scales the amplitude of the early reflections of reverberated sounds
* @param coefficient reflection/absorption factor applied to reflections
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public void setReflectionCoefficient(float coefficient) {
if (isLiveOrCompiled())
- if (!this.getCapability(ALLOW_REFLECTION_COEFFICIENT_WRITE))
+ if (!this.getCapability(ALLOW_REFLECTION_COEFFICIENT_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes4"));
((AuralAttributesRetained)this.retained).setReflectionCoefficient(coefficient);
}
@@ -759,19 +759,19 @@ public class AuralAttributes extends NodeComponent {
/**
* Retrieve Reflective Coefficient.
* @return reflection coeff reflection/absorption factor
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public float getReflectionCoefficient() {
if (isLiveOrCompiled())
- if (!this.getCapability(ALLOW_REFLECTION_COEFFICIENT_READ))
- throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes21"));
+ if (!this.getCapability(ALLOW_REFLECTION_COEFFICIENT_READ))
+ throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes21"));
return ((AuralAttributesRetained)this.retained).getReflectionCoefficient();
}
/*********************
*
- * Early Reflection Delay
+ * Early Reflection Delay
*
********************/
/**
@@ -780,21 +780,21 @@ public class AuralAttributes extends NodeComponent {
* direct, unreflected sound and the start of first order early reflections.
* In this method, this time is explicitly given in milliseconds.
* @param reflectionDelay delay time before start of reverberation
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
* @since Java 3D 1.3
*/
public void setReflectionDelay(float reflectionDelay) {
if (isLiveOrCompiled())
- if (!this.getCapability(ALLOW_REFLECTION_DELAY_WRITE))
+ if (!this.getCapability(ALLOW_REFLECTION_DELAY_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes22"));
((AuralAttributesRetained)this.retained).setReflectionDelay(reflectionDelay);
}
/**
* Retrieve Reflection Delay Time.
- * @return reflection delay time
- * @exception CapabilityNotSetException if appropriate capability is
+ * @return reflection delay time
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
* @since Java 3D 1.3
*/
@@ -811,17 +811,17 @@ public class AuralAttributes extends NodeComponent {
*
********************/
/**
- * Set Reverb Coefficient.
+ * Set Reverb Coefficient.
* Scale the amplitude of the late reflections including the decaying tail
* of reverberated sound.
* @param coefficient reflective/absorptive factor applied to late reflections
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
* @since Java 3D 1.3
*/
public void setReverbCoefficient(float coefficient) {
if (isLiveOrCompiled())
- if (!this.getCapability(ALLOW_REVERB_COEFFICIENT_WRITE))
+ if (!this.getCapability(ALLOW_REVERB_COEFFICIENT_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes24"));
((AuralAttributesRetained)this.retained).setReverbCoefficient(coefficient);
}
@@ -829,7 +829,7 @@ public class AuralAttributes extends NodeComponent {
/**
* Retrieve Reverb Coefficient.
* @return late reflection coeff. reflection/absorption factor
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
* @since Java 3D 1.3
*/
@@ -842,7 +842,7 @@ public class AuralAttributes extends NodeComponent {
/*********************
*
- * Reverberation Delay
+ * Reverberation Delay
*
********************/
/**
@@ -851,25 +851,25 @@ public class AuralAttributes extends NodeComponent {
* direct, unreflected sound and the start of reverberation. In this
* method, this time is explicitly given in milliseconds.
* @param reverbDelay delay time before start of reverberation
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public void setReverbDelay(float reverbDelay) {
if (isLiveOrCompiled())
- if (!this.getCapability(ALLOW_REVERB_DELAY_WRITE))
+ if (!this.getCapability(ALLOW_REVERB_DELAY_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes5"));
((AuralAttributesRetained)this.retained).setReverbDelay(reverbDelay);
}
/**
* Retrieve Reverberation Delay Time.
- * @return reverb delay time
- * @exception CapabilityNotSetException if appropriate capability is
+ * @return reverb delay time
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public float getReverbDelay() {
if (isLiveOrCompiled())
- if (!this.getCapability(ALLOW_REVERB_DELAY_READ))
+ if (!this.getCapability(ALLOW_REVERB_DELAY_READ))
throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes7"));
return ((AuralAttributesRetained)this.retained).getReverbDelay();
}
@@ -880,11 +880,11 @@ public class AuralAttributes extends NodeComponent {
*
********************/
/**
- * Set Decay Time
+ * Set Decay Time
* Length of time from the start of late reflections reverberation volume
* takes to decay to effective zero (-60 dB of initial signal amplitude).
* @param decayTime of late reflections (reverb) in milliseconds
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
* @since Java 3D 1.3
*/
@@ -898,7 +898,7 @@ public class AuralAttributes extends NodeComponent {
/**
* Retrieve Decay Time.
* @return reverb decay time
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
* @since Java 3D 1.3
*/
@@ -915,13 +915,13 @@ public class AuralAttributes extends NodeComponent {
*
********************/
/**
- * Set Decay Filter
+ * Set Decay Filter
* In this form, reverberation decay filtering is defined as a low-pass
* filter, starting at the given reference frequency. This allows for
* higher frequencies to be attenuated at a different (typically faster)
* rate than lower frequencies.
* @param frequencyCutoff of reverberation decay low-pass filter
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
* @since Java 3D 1.3
*/
@@ -935,7 +935,7 @@ public class AuralAttributes extends NodeComponent {
/**
* Retrieve Decay Filter.
* @return reverb decay filter cutoff frequency
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
* @since Java 3D 1.3
*/
@@ -952,12 +952,12 @@ public class AuralAttributes extends NodeComponent {
*
********************/
/**
- * Set Diffusion.
+ * Set Diffusion.
* Sets the echo dispersement of reverberation to an amount between
* the minimum (0.0) to the maximum (1.0) available. Changing this
* increases/decreases the 'smoothness' of reverb decay.
* @param ratio reverberation echo dispersement factor
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
* @since Java 3D 1.3
*/
@@ -971,7 +971,7 @@ public class AuralAttributes extends NodeComponent {
/**
* Retrieve Diffusion.
* @return reverb diffusion ratio
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
* @since Java 3D 1.3
*/
@@ -988,12 +988,12 @@ public class AuralAttributes extends NodeComponent {
*
********************/
/**
- * Set Density.
+ * Set Density.
* Sets the density of reverberation to an amount between
* the minimum (0.0) to the maximum (1.0) available. Changing this
* effects the spectral coloration (timbre) of late reflections.
* @param ratio reverberation modal density factor
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
* @since Java 3D 1.3
*/
@@ -1007,7 +1007,7 @@ public class AuralAttributes extends NodeComponent {
/**
* Retrieve Density.
* @return reverb density
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
* @since Java 3D 1.3
*/
@@ -1019,12 +1019,12 @@ public class AuralAttributes extends NodeComponent {
}
/**
- * @deprecated As of Java 3D version 1.2, replaced by
+ * @deprecated As of Java 3D version 1.2, replaced by
* Reverb Order
* Optionally limits the amount of times during
+ * reverb calculation that a sound is recursively reflected off the
* bounding region.
* The reverberation decay time explicitly defines the length of time in
- * milliseconds it takes for the amplitude of late reflections to
+ * milliseconds it takes for the amplitude of late reflections to
* exponentally decrease to effective zero.
* In the case where reverb delay is set non-positive
* the renderer will perform the shortest reverberation decay
@@ -185,7 +185,7 @@ import javax.vecmath.Point2f;
*
*
* The reverberation decay filter defines how frequencies above a given
* value are attenuated by the listening space. This allows for modelling
- * materials on surfaces that absorb high frequencies at a faster rate
+ * materials on surfaces that absorb high frequencies at a faster rate
* than low frequencies.
*
*
- * The reverberation density explicitly defines modal reverb density
+ * The reverberation density explicitly defines modal reverb density
* The value for this modal density is proportional to the number of
- * resonances heard in late reverberation perceived as spectral
+ * resonances heard in late reverberation perceived as spectral
* coloration. The greater the density, the smoother, less grainy the
* later reverberation decay.
*
@@ -255,8 +255,8 @@ import javax.vecmath.Point2f;
* Values must be > zero for sounds to be heard. If the value is zero,
* sounds affected by this AuralAttribute object are paused.
*
* velocity scale factor: 0.0
* setReverbBounds(Bounds)
*/
public void setReverbDelay(Bounds reverbVolume) {
if (isLiveOrCompiled())
- if (!this.getCapability(ALLOW_REVERB_DELAY_WRITE))
+ if (!this.getCapability(ALLOW_REVERB_DELAY_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes5"));
((AuralAttributesRetained)this.retained).setReverbBounds(reverbVolume);
}
@@ -1033,12 +1033,12 @@ public class AuralAttributes extends NodeComponent {
* Set Reverberation Bounds volume.
* In this form, the reverberation bounds volume parameter is used to
* calculate the reverberation Delay and Decay times. Specification
- * of a non-null bounding volume causes the explicit values given for
- * Reverb Delay and Decay to be overridden by the implicit values
+ * of a non-null bounding volume causes the explicit values given for
+ * Reverb Delay and Decay to be overridden by the implicit values
* calculated from these bounds.
* ALLOW_REVERB_DELAY_WRITE flag used setting capability of this method.
* @param reverbVolume the bounding region
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
* @since Java 3D 1.2
*/
@@ -1054,7 +1054,7 @@ public class AuralAttributes extends NodeComponent {
* @return reverb bounds volume that defines the Reverberation space and
* indirectly the delay/decay
* ALLOW_REVERB_DELAY_READ flag used setting capability of this method.
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
* @since Java 3D 1.2
*/
@@ -1076,12 +1076,12 @@ public class AuralAttributes extends NodeComponent {
* to the reverberation being rendered.
* A non-positive value specifies an unbounded number of reflections.
* @param reverbOrder limit to the number of times reflections added to reverb signal
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public void setReverbOrder(int reverbOrder) {
if (isLiveOrCompiled())
- if (!this.getCapability(ALLOW_REVERB_ORDER_WRITE))
+ if (!this.getCapability(ALLOW_REVERB_ORDER_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes8"));
((AuralAttributesRetained)this.retained).setReverbOrder(reverbOrder);
}
@@ -1089,27 +1089,27 @@ public class AuralAttributes extends NodeComponent {
/**
* Retrieve Reverberation Order
* @return reverb order
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public int getReverbOrder() {
- if (!this.getCapability(ALLOW_REVERB_ORDER_READ))
+ if (!this.getCapability(ALLOW_REVERB_ORDER_READ))
if (isLiveOrCompiled())
throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes9"));
return ((AuralAttributesRetained)this.retained).getReverbOrder();
}
/**
- * Set Distance Filter using a single array containing distances and
+ * Set Distance Filter using a single array containing distances and
* frequency cutoff as pairs of values as a single array of Point2f.
* @param attenuation array of pairs of distance and frequency cutoff
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public void setDistanceFilter(Point2f[] attenuation) {
if (isLiveOrCompiled())
- if (!this.getCapability(ALLOW_DISTANCE_FILTER_WRITE))
- throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes10"));
+ if (!this.getCapability(ALLOW_DISTANCE_FILTER_WRITE))
+ throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes10"));
((AuralAttributesRetained)this.retained).setDistanceFilter(attenuation);
}
@@ -1117,20 +1117,20 @@ public class AuralAttributes extends NodeComponent {
* Set Distance Filter using separate arrays for distances and frequency
* cutoff. The distance and frequencyCutoff arrays should be of the same
* length. If the frequencyCutoff array length is greater than the distance
- * array length, the frequencyCutoff array elements beyond the length of
+ * array length, the frequencyCutoff array elements beyond the length of
* the distance array are ignored. If the frequencyCutoff array is shorter
* than the distance array, the last frequencyCutoff array value is repeated
* to fill an array of length equal to distance array.
* @param distance array of float distance with corresponding cutoff values
* @param frequencyCutoff array of frequency cutoff values in Hertz
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
- public void setDistanceFilter(float[] distance,
+ public void setDistanceFilter(float[] distance,
float[] frequencyCutoff) {
if (isLiveOrCompiled())
- if (!this.getCapability(ALLOW_DISTANCE_FILTER_WRITE))
- throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes10"));
+ if (!this.getCapability(ALLOW_DISTANCE_FILTER_WRITE))
+ throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes10"));
((AuralAttributesRetained)this.retained).setDistanceFilter(
distance, frequencyCutoff );
}
@@ -1138,7 +1138,7 @@ public class AuralAttributes extends NodeComponent {
/**
* Retrieve Distance Filter array length.
* @return attenuation array length
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public int getDistanceFilterLength() {
@@ -1146,17 +1146,17 @@ public class AuralAttributes extends NodeComponent {
if (!this.getCapability(ALLOW_DISTANCE_FILTER_READ))
throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes12"));
return (((AuralAttributesRetained)this.retained).getDistanceFilterLength());
- }
+ }
/**
* Retrieve Distance Filter as a single array containing distances
* and frequency cutoff. The distance filter is copied into
* the specified array.
- * The array must be large enough to hold all of the points.
+ * The array must be large enough to hold all of the points.
* The individual array elements must be allocated by the caller.
* @param attenuation array of pairs of distance and frequency cutoff values
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public void getDistanceFilter(Point2f[] attenuation) {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_DISTANCE_FILTER_READ))
@@ -1170,34 +1170,34 @@ public class AuralAttributes extends NodeComponent {
* and frequency cutoff values.
* @param distance array
* @param frequencyCutoff cutoff array
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
- public void getDistanceFilter(float[] distance,
+ public void getDistanceFilter(float[] distance,
float[] frequencyCutoff) {
if (isLiveOrCompiled())
- if (!this.getCapability(ALLOW_DISTANCE_FILTER_READ))
- throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes12"));
+ if (!this.getCapability(ALLOW_DISTANCE_FILTER_READ))
+ throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes12"));
((AuralAttributesRetained)this.retained).getDistanceFilter(
distance, frequencyCutoff);
}
/**
- * This parameter specifies a scale factor applied to the frequency
+ * This parameter specifies a scale factor applied to the frequency
* of sound during rendering playback. If the Doppler effect is
- * disabled, this scale factor can be used to increase or
+ * disabled, this scale factor can be used to increase or
* decrease the original pitch of the sound. During rendering,
- * this scale factor expands or contracts the usual frequency shift
- * applied to the sound source due to Doppler calculations.
+ * this scale factor expands or contracts the usual frequency shift
+ * applied to the sound source due to Doppler calculations.
* Valid values are >= 0.0.
* A value of zero causes playing sounds to pause.
* @param frequencyScaleFactor factor applied to change of frequency
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public void setFrequencyScaleFactor(float frequencyScaleFactor) {
if (isLiveOrCompiled())
- if (!this.getCapability(ALLOW_FREQUENCY_SCALE_FACTOR_WRITE))
+ if (!this.getCapability(ALLOW_FREQUENCY_SCALE_FACTOR_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes15"));
((AuralAttributesRetained)this.retained).setFrequencyScaleFactor(
frequencyScaleFactor);
@@ -1206,12 +1206,12 @@ public class AuralAttributes extends NodeComponent {
/**
* Retrieve Frequency Scale Factor.
* @return scaleFactor factor applied to change of frequency
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public float getFrequencyScaleFactor() {
if (isLiveOrCompiled())
- if (!this.getCapability(ALLOW_FREQUENCY_SCALE_FACTOR_READ))
+ if (!this.getCapability(ALLOW_FREQUENCY_SCALE_FACTOR_READ))
throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes17"));
return ((AuralAttributesRetained)this.retained).getFrequencyScaleFactor();
}
@@ -1223,21 +1223,21 @@ public class AuralAttributes extends NodeComponent {
*********************************/
/**
* Set Velocity scale factor applied during Doppler Effect calculation.
- * This parameter specifies a scale factor applied to the velocity of
- * the sound relative to the listener's position and movement in relation
+ * This parameter specifies a scale factor applied to the velocity of
+ * the sound relative to the listener's position and movement in relation
* to the sound's position and movement. This scale factor is multipled
- * by the calculated velocity portion of the Doppler effect equation used
+ * by the calculated velocity portion of the Doppler effect equation used
* during sound rendering.
* A value of zero disables Doppler calculations.
- * @param velocityScaleFactor applied to velocity of sound in relation
+ * @param velocityScaleFactor applied to velocity of sound in relation
* to listener
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public void setVelocityScaleFactor(float velocityScaleFactor) {
if (isLiveOrCompiled())
- if (!this.getCapability(ALLOW_VELOCITY_SCALE_FACTOR_WRITE))
- throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes19"));
+ if (!this.getCapability(ALLOW_VELOCITY_SCALE_FACTOR_WRITE))
+ throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes19"));
((AuralAttributesRetained)this.retained).setVelocityScaleFactor(
velocityScaleFactor);
}
@@ -1245,13 +1245,13 @@ public class AuralAttributes extends NodeComponent {
/**
* Retrieve Velocity Scale Factor used to calculate Doppler Effect.
* @return scale factor applied to Doppler velocity of sound
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public float getVelocityScaleFactor() {
if (isLiveOrCompiled())
- if (!this.getCapability(ALLOW_VELOCITY_SCALE_FACTOR_READ))
- throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes20"));
+ if (!this.getCapability(ALLOW_VELOCITY_SCALE_FACTOR_READ))
+ throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes20"));
return ((AuralAttributesRetained)this.retained).getVelocityScaleFactor();
}
@@ -1272,7 +1272,7 @@ public class AuralAttributes extends NodeComponent {
* the current node. This method is called from the
* duplicateNode
method. This routine does
* the actual duplication of all "local data" (any data defined in
- * this object).
+ * this object).
*
* @param originalNodeComponent the original node to duplicate.
* @param forceDuplicate when set to true
, causes the
@@ -1284,11 +1284,11 @@ public class AuralAttributes extends NodeComponent {
* @see Node#cloneTree
* @see NodeComponent#setDuplicateOnCloneTree
*/
- void duplicateAttributes(NodeComponent originalNodeComponent,
- boolean forceDuplicate) {
+ void duplicateAttributes(NodeComponent originalNodeComponent,
+ boolean forceDuplicate) {
super.duplicateAttributes(originalNodeComponent,
forceDuplicate);
-
+
AuralAttributesRetained aural = (AuralAttributesRetained) originalNodeComponent.retained;
AuralAttributesRetained rt = (AuralAttributesRetained) retained;
diff --git a/src/classes/share/javax/media/j3d/AuralAttributesRetained.java b/src/classes/share/javax/media/j3d/AuralAttributesRetained.java
index 2ef094b..ca35483 100644
--- a/src/classes/share/javax/media/j3d/AuralAttributesRetained.java
+++ b/src/classes/share/javax/media/j3d/AuralAttributesRetained.java
@@ -44,7 +44,7 @@ class AuralAttributesRetained extends NodeComponentRetained {
* Gain Scale Factor applied to source with this attribute
*/
float attributeGain = 1.0f; // Valid values are >= 0.0.
-
+
/**
* Atmospheric Rolloff - speed of sound - coeff
* Normal gain attenuation based on distance of sound from
@@ -59,17 +59,17 @@ class AuralAttributesRetained extends NodeComponentRetained {
*
* Within Java 3D's model for auralization, the components to
* reverberation for a particular space are:
- * Reflection and Reverb Coefficients -
- * attenuation of sound (uniform for all frequencies) due to
- * absorption of reflected sound off materials within the
+ * Reflection and Reverb Coefficients -
+ * attenuation of sound (uniform for all frequencies) due to
+ * absorption of reflected sound off materials within the
* listening space.
- * Reflection and Reverb Delay -
+ * Reflection and Reverb Delay -
* approximating time from the start of the direct sound that
* initial early and late reflection waves take to reach listener.
- * Reverb Decay -
+ * Reverb Decay -
* approximating time from the start of the direct sound that
* reverberation is audible.
- */
+ */
/**
* Coefficients for reverberation
@@ -97,17 +97,17 @@ class AuralAttributesRetained extends NodeComponentRetained {
/**
* Decay parameters
- * Length and timbre of reverb decay tail
+ * Length and timbre of reverb decay tail
*/
float decayTime = 1000.0f; // in milliseconds
float decayFilter = 5000.0f; // low-pass cutoff frequency
-
+
/**
* Reverb Diffusion and Density ratios (0=min, 1=max)
*/
float diffusion = 1.0f;
float density = 1.0f;
-
+
/**
* Reverberation order
* This limits the number of Reverberation iterations executed while
@@ -128,7 +128,7 @@ class AuralAttributesRetained extends NodeComponentRetained {
* from the listener.
* For now the only supported filterType will be LOW_PASS frequency cutoff.
* At some time full FIR filtering will be supported.
- */
+ */
static final int NO_FILTERING = -1;
static final int LOW_PASS = 1;
@@ -143,21 +143,21 @@ class AuralAttributesRetained extends NodeComponentRetained {
* If there has been no change in the distance between head and sound
* source over this delta time:
* f' = f
- *
+ *
* If there has been a change in the distance between head and sound:
* f' = f * Af * v
- *
+ *
* When head and sound are moving towards each other then
* | (S * Ar) + (deltaV(h,t) * Av) |
* v = | -------------------------------- |
* | (S * Ar) - (deltaV(s,t) * Av) |
- *
+ *
* When head and sound are moving away from each other then
* | (S * Ar) - (deltaV(h,t) * Av) |
* v = | -------------------------------- |
* | (S * Ar) + (deltaV(s,t) * Av) |
- *
- *
+ *
+ *
* Af = AuralAttribute frequency scalefactor
* Ar = AuralAttribute rolloff scalefactor
* Av = AuralAttribute velocity scalefactor
@@ -169,8 +169,8 @@ class AuralAttributesRetained extends NodeComponentRetained {
* S = Speed of sound
* s = Sound source position
* t = time
- *
- * If adjusted velocity of head or adjusted velocity of sound is
+ *
+ * If adjusted velocity of head or adjusted velocity of sound is
* greater than adjusted speed of sound, f' is undefined.
*/
/**
@@ -182,8 +182,8 @@ class AuralAttributesRetained extends NodeComponentRetained {
float frequencyScaleFactor = 1.0f;
/**
* Velocity Scale Factor
- * Float value applied to the Change of distance between Sound Source
- * and Listener over some delta time. Non-zero if listener moving
+ * Float value applied to the Change of distance between Sound Source
+ * and Listener over some delta time. Non-zero if listener moving
* even if sound is not. Value of zero implies no Doppler applied.
*/
float velocityScaleFactor = 0.0f;
@@ -200,12 +200,12 @@ class AuralAttributesRetained extends NodeComponentRetained {
/**
** Debug print mechanism for Sound nodes
- **/
+ **/
static final // 'static final' so compiler doesn't include debugPrint calls
boolean debugFlag = false;
static final // 'static final' so internal error message are not compiled
- boolean internalErrors = false;
+ boolean internalErrors = false;
void debugPrint(String message) {
if (debugFlag) // leave test in in case debugFlag made non-static final
@@ -221,7 +221,7 @@ class AuralAttributesRetained extends NodeComponentRetained {
/**
* Set Attribute Gain (amplitude)
- * @param gain scale factor applied to amplitude
+ * @param gain scale factor applied to amplitude
*/
void setAttributeGain(float gain) {
this.attributeGain = gain;
@@ -255,7 +255,7 @@ class AuralAttributesRetained extends NodeComponentRetained {
/**
* Set Reflective Coefficient
- * @param reflectionCoefficient reflection/absorption factor applied to
+ * @param reflectionCoefficient reflection/absorption factor applied to
* early reflections.
*/
void setReflectionCoefficient(float reflectionCoefficient) {
@@ -265,7 +265,7 @@ class AuralAttributesRetained extends NodeComponentRetained {
}
/**
* Retrieve Reflective Coefficient
- * @return reflection coeff reflection/absorption factor applied to
+ * @return reflection coeff reflection/absorption factor applied to
* early reflections.
*/
float getReflectionCoefficient() {
@@ -284,7 +284,7 @@ class AuralAttributesRetained extends NodeComponentRetained {
}
/**
* Retrieve Reflection Delay Time
- * @return reflection delay time
+ * @return reflection delay time
*/
float getReflectionDelay() {
return this.reflectionDelay;
@@ -292,7 +292,7 @@ class AuralAttributesRetained extends NodeComponentRetained {
/**
* Set Reverb Coefficient
- * @param reverbCoefficient reflection/absorption factor applied to
+ * @param reverbCoefficient reflection/absorption factor applied to
* late reflections.
*/
void setReverbCoefficient(float reverbCoefficient) {
@@ -336,7 +336,7 @@ class AuralAttributesRetained extends NodeComponentRetained {
}
/**
* Retrieve Revereration Decay Time
- * @return reverb delay time
+ * @return reverb delay time
*/
float getDecayTime() {
return this.decayTime;
@@ -354,7 +354,7 @@ class AuralAttributesRetained extends NodeComponentRetained {
/**
* Retrieve Revereration Decay Filter
- * @return reverb delay Filter
+ * @return reverb delay Filter
*/
float getDecayFilter() {
return this.decayFilter;
@@ -406,11 +406,11 @@ class AuralAttributesRetained extends NodeComponentRetained {
this.aaDirty = true;
notifyUsers();
}
- /**
+ /**
* Retrieve Revereration Delay Bounds volume
* @return reverb bounds volume that defines the Reverberation space and
* indirectly the delay
- */
+ */
Bounds getReverbBounds() {
return this.reverbBounds;
}
@@ -461,11 +461,11 @@ class AuralAttributesRetained extends NodeComponentRetained {
notifyUsers();
}
/**
- * Set Distance Filter (based on distances and frequency cutoff) using
+ * Set Distance Filter (based on distances and frequency cutoff) using
* separate arrays
* @param distance array containing distance values
* @param filter array containing low-pass frequency cutoff values
- */
+ */
synchronized void setDistanceFilter(float[] distance, float[] filter) {
if (distance == null || filter == null) {
this.filterType = NO_FILTERING;
@@ -515,13 +515,13 @@ class AuralAttributesRetained extends NodeComponentRetained {
/**
* Retrieve Distance Filter array length
* @return attenuation array length
- */
- int getDistanceFilterLength() {
+ */
+ int getDistanceFilterLength() {
if (distance == null)
return 0;
else
- return this.distance.length;
- }
+ return this.distance.length;
+ }
/**
@@ -530,7 +530,7 @@ class AuralAttributesRetained extends NodeComponentRetained {
*/
void getDistanceFilter(Point2f[] attenuation) {
// Write into existing param array already allocated
- if (attenuation == null)
+ if (attenuation == null)
return;
if (this.distance == null || this.frequencyCutoff == null)
return;
@@ -560,7 +560,7 @@ class AuralAttributesRetained extends NodeComponentRetained {
*/
void getDistanceFilter(float[] distance, float[] filter) {
// Write into existing param arrays already allocated
- if (distance == null || filter == null)
+ if (distance == null || filter == null)
return;
if (this.distance == null || this.frequencyCutoff == null)
return;
@@ -578,7 +578,7 @@ class AuralAttributesRetained extends NodeComponentRetained {
int filterLength = this.frequencyCutoff.length;
if (filter.length < filterLength)
// parameter array not large enough to hold all this.filter data
- filterLength = filter.length;
+ filterLength = filter.length;
if (filterType == NO_FILTERING) {
for (int i=0; i< filterLength; i++)
filter[i] = Sound.NO_FILTER;
@@ -669,5 +669,5 @@ class AuralAttributesRetained extends NodeComponentRetained {
void update(AuralAttributesRetained aa) {
this.reset(aa);
}
-
+
}
diff --git a/src/classes/share/javax/media/j3d/BHInsertStructure.java b/src/classes/share/javax/media/j3d/BHInsertStructure.java
index 0fdcddb..b1d7f2c 100644
--- a/src/classes/share/javax/media/j3d/BHInsertStructure.java
+++ b/src/classes/share/javax/media/j3d/BHInsertStructure.java
@@ -34,10 +34,10 @@ package javax.media.j3d;
import java.util.*;
class BHInsertStructure {
-
+
static boolean debug = false;
static boolean debug2 = false;
-
+
Random randomNumber;
ArrayList[] bhListArr = null;
ArrayList[] oldBhListArr = null;
@@ -46,25 +46,25 @@ class BHInsertStructure {
int bhListArrCnt = 0;
int bhListArrMaxCnt = 0;
int blockSize = 0;
-
+
BHInsertStructure(int length) {
randomNumber = new Random(0);
-
+
if(length > 50) {
length = 50;
}
-
+
blockSize = 50;
bhListArr = new ArrayList[length];
bhListArrRef = new BHNode[length];
bhListArrCnt = 0;
- bhListArrMaxCnt = length;
-
+ bhListArrMaxCnt = length;
+
}
-
+
void clear() {
-
- for(int i=0; i< bhListArrCnt; i++) {
+
+ for(int i=0; i< bhListArrCnt; i++) {
bhListArr[i].clear();
bhListArrRef[i] = null;
}
@@ -73,7 +73,7 @@ class BHInsertStructure {
void lookupAndInsert(BHNode parent, BHNode child) {
boolean found = false;
-
+
for ( int i=0; icloneTree
to duplicate the current node.
@@ -650,7 +650,7 @@ public class Background extends Leaf {
* false
, the value of each node's
* duplicateOnCloneTree
variable determines whether
* NodeComponent data is duplicated or copied.
- * Background geometry will not clone in this operation.
+ * Background geometry will not clone in this operation.
* It is the user's responsibility
* to call cloneTree
on that branchGroup.
*
@@ -665,7 +665,7 @@ public class Background extends Leaf {
return b;
}
-
+
/**
* Copies all node information from originalNode
into
* the current node. This method is called from the
@@ -691,7 +691,7 @@ public class Background extends Leaf {
* false
, the value of each node's
* duplicateOnCloneTree
variable determines whether
* NodeComponent data is duplicated or copied.
- * @exception ClassCastException if originalNode is not an instance of
+ * @exception ClassCastException if originalNode is not an instance of
* Background
*
* @see Node#cloneTree
@@ -709,7 +709,7 @@ public class Background extends Leaf {
* originalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
@@ -740,14 +740,14 @@ public class Background extends Leaf {
rt.initGeometry((BranchGroup) (attr.getGeometry() == null ? null : attr.getGeometry().cloneTree(true)));
rt.initImage((ImageComponent2D) getNodeComponent(
attr.getImage(),
- forceDuplicate,
+ forceDuplicate,
originalNode.nodeHashtable));
// this will be updated in updateNodeReferences
rt.initApplicationBoundingLeaf(attr.getApplicationBoundingLeaf());
}
-
+
/**
* Callback used to allow a node to check if any scene graph objects
* referenced
diff --git a/src/classes/share/javax/media/j3d/BackgroundRetained.java b/src/classes/share/javax/media/j3d/BackgroundRetained.java
index 76b5ba6..fee0094 100644
--- a/src/classes/share/javax/media/j3d/BackgroundRetained.java
+++ b/src/classes/share/javax/media/j3d/BackgroundRetained.java
@@ -57,21 +57,21 @@ class BackgroundRetained extends LeafRetained {
Color3f color = new Color3f(0.0f, 0.0f, 0.0f);
ImageComponent2DRetained image = null;
Texture2DRetained texture = null;
-
+
// the image scale mode if image is used.
- int imageScaleMode = Background.SCALE_NONE;
-
+ int imageScaleMode = Background.SCALE_NONE;
+
/**
* The Boundary object defining the lights's application region.
- */
+ */
Bounds applicationRegion = null;
- /**
+ /**
* The bounding leaf reference
*/
BoundingLeafRetained boundingLeaf = null;
- /**
+ /**
* Background geometry branch group
*/
BranchGroup geometryBranch = null;
@@ -121,7 +121,7 @@ class BackgroundRetained extends LeafRetained {
// Is true, if the background is viewScoped
boolean isViewScoped = false;
-
+
BackgroundRetained () {
this.nodeType = NodeRetained.BACKGROUND;
localBounds = new BoundingBox();
@@ -130,7 +130,7 @@ class BackgroundRetained extends LeafRetained {
}
/**
- * Initializes the background color to the specified color.
+ * Initializes the background color to the specified color.
* This color is used
* if the image is null.
* @param color the new background color
@@ -153,7 +153,7 @@ class BackgroundRetained extends LeafRetained {
}
/**
- * Initializes the background color to the specified color.
+ * Initializes the background color to the specified color.
* This color is used
* if the image is null.
* @param r the red component of the background color
@@ -195,7 +195,7 @@ class BackgroundRetained extends LeafRetained {
final void initImageScaleMode(int imageScaleMode){
this.imageScaleMode = imageScaleMode;
}
-
+
/**
* Sets the image scale mode for this Background node.
* @param imageScaleMode the image scale mode
@@ -206,16 +206,16 @@ class BackgroundRetained extends LeafRetained {
sendMessage(IMAGE_SCALE_CHANGED, new Integer(imageScaleMode));
}
}
-
+
/**
* gets the image scale mode for this Background node.
*/
final int getImageScaleMode(){
return imageScaleMode;
}
-
+
/**
- * Initializes the background image to the specified image.
+ * Initializes the background image to the specified image.
* @param image new ImageCompoent2D object used as the background image
*/
final void initImage(ImageComponent2D img) {
@@ -260,7 +260,7 @@ class BackgroundRetained extends LeafRetained {
}
/**
- * Sets the background image to the specified image.
+ * Sets the background image to the specified image.
* @param image new ImageCompoent3D object used as the background image
*/
final void setImage(ImageComponent2D img) {
@@ -268,16 +268,16 @@ class BackgroundRetained extends LeafRetained {
if (texture != null) {
texture.clearLive(refCount);
}
- }
+ }
initImage(img);
if (source.isLive()) {
if (texture != null) {
texture.setLive(inBackgroundGroup, refCount);
}
-
+
sendMessage(IMAGE_CHANGED,
(texture != null ? texture.mirror : null));
-
+
}
}
@@ -286,23 +286,23 @@ class BackgroundRetained extends LeafRetained {
* @return the current background image
*/
final ImageComponent2D getImage() {
- return (image == null ? null :
+ return (image == null ? null :
(ImageComponent2D)image.source);
}
/**
- * Initializes the background geometry branch group to the specified branch.
+ * Initializes the background geometry branch group to the specified branch.
* @param branch new branch group object used for background geometry
- */
+ */
final void initGeometry(BranchGroup branch) {
geometryBranch = branch;
}
/**
- * Sets the background geometry branch group to the specified branch.
+ * Sets the background geometry branch group to the specified branch.
* @param branch new branch group object used for background geometry
- */
+ */
final void setGeometry(BranchGroup branch) {
int numMessages = 0;
int i;
@@ -320,7 +320,7 @@ class BackgroundRetained extends LeafRetained {
i = 0;
if (geometryBranch != null) {
clearGeometryBranch((BranchGroupRetained)geometryBranch.retained);
- m[i].threads = (J3dThread.UPDATE_RENDER |
+ m[i].threads = (J3dThread.UPDATE_RENDER |
J3dThread.UPDATE_RENDERING_ENVIRONMENT);
m[i].type = J3dMessage.ORDERED_GROUP_REMOVED;
m[i].universe = universe;
@@ -339,7 +339,7 @@ class BackgroundRetained extends LeafRetained {
}
if (branch != null) {
setGeometryBranch((BranchGroupRetained)branch.retained);
- m[i].threads = (J3dThread.UPDATE_RENDER |
+ m[i].threads = (J3dThread.UPDATE_RENDER |
J3dThread.UPDATE_RENDERING_ENVIRONMENT);
m[i].type = J3dMessage.ORDERED_GROUP_INSERTED;
m[i].universe = universe;
@@ -373,7 +373,7 @@ class BackgroundRetained extends LeafRetained {
/**
* Initializes the Background's application region.
* @param region a region that contains the Backgound's new application bounds
- */
+ */
final void initApplicationBounds(Bounds region) {
if (region != null) {
applicationRegion = (Bounds) region.clone();
@@ -385,19 +385,19 @@ class BackgroundRetained extends LeafRetained {
/**
* Set the Background's application region.
* @param region a region that contains the Backgound's new application bounds
- */
+ */
final void setApplicationBounds(Bounds region) {
initApplicationBounds(region);
// Don't send the message if there is a valid boundingleaf
if (boundingLeaf == null) {
J3dMessage createMessage = new J3dMessage();
- createMessage.threads = targetThreads |
+ createMessage.threads = targetThreads |
J3dThread.UPDATE_RENDERING_ENVIRONMENT;
createMessage.type = J3dMessage.BACKGROUND_CHANGED;
createMessage.universe = universe;
createMessage.args[0] = this;
createMessage.args[1]= new Integer(BOUNDS_CHANGED);
- if (region != null)
+ if (region != null)
createMessage.args[2] = region.clone();
else
createMessage.args[2] = null;
@@ -405,18 +405,18 @@ class BackgroundRetained extends LeafRetained {
}
}
- /**
+ /**
* Get the Backgound's application region.
* @return this Backgound's application region information
- */
+ */
final Bounds getApplicationBounds() {
return (applicationRegion != null ? (Bounds) applicationRegion.clone() : null);
}
/**
- * Initializes the Background's application region
+ * Initializes the Background's application region
* to the specified Leaf node.
- */
+ */
void initApplicationBoundingLeaf(BoundingLeaf region) {
if (region != null) {
boundingLeaf = (BoundingLeafRetained)region.retained;
@@ -427,11 +427,11 @@ class BackgroundRetained extends LeafRetained {
/**
* Set the Background's application region to the specified Leaf node.
- */
+ */
void setApplicationBoundingLeaf(BoundingLeaf region) {
if (boundingLeaf != null)
boundingLeaf.mirrorBoundingLeaf.removeUser(this);
-
+
if (region != null) {
boundingLeaf = (BoundingLeafRetained)region.retained;
boundingLeaf.mirrorBoundingLeaf.addUser(this);
@@ -439,7 +439,7 @@ class BackgroundRetained extends LeafRetained {
boundingLeaf = null;
}
J3dMessage createMessage = new J3dMessage();
- createMessage.threads = targetThreads |
+ createMessage.threads = targetThreads |
J3dThread.UPDATE_RENDERING_ENVIRONMENT;
createMessage.type = J3dMessage.BACKGROUND_CHANGED;
createMessage.universe = universe;
@@ -452,7 +452,7 @@ class BackgroundRetained extends LeafRetained {
createMessage.args[2] = null;
if (applicationRegion != null)
createMessage.args[3] = applicationRegion.clone();
- else
+ else
createMessage.args[3] = null;
}
VirtualUniverse.mc.processMessage(createMessage);
@@ -461,7 +461,7 @@ class BackgroundRetained extends LeafRetained {
/**
* Get the Background's application region
- */
+ */
BoundingLeaf getApplicationBoundingLeaf() {
return (boundingLeaf != null ?
(BoundingLeaf)boundingLeaf.source : null);
@@ -473,7 +473,7 @@ class BackgroundRetained extends LeafRetained {
void setInImmCtx(boolean inCtx) {
inImmCtx = inCtx;
}
-
+
/**
* This gets the immedate mode context flag
*/
@@ -547,17 +547,17 @@ class BackgroundRetained extends LeafRetained {
if (geometryBranch != null) {
- BranchGroupRetained branch =
+ BranchGroupRetained branch =
(BranchGroupRetained)geometryBranch.retained;
if (branch.inBackgroundGroup == true)
throw new IllegalSharingException(
J3dI18N.getString("BackgroundRetained0"));
- if (branch.parent != null)
+ if (branch.parent != null)
throw new IllegalSharingException(
J3dI18N.getString("BackgroundRetained3"));
- if (branch.locale != null)
+ if (branch.locale != null)
throw new IllegalSharingException(
J3dI18N.getString("BackgroundRetained4"));
@@ -575,7 +575,7 @@ class BackgroundRetained extends LeafRetained {
// Free up memory.
setLiveState.reset(null);
}
-
+
if ((s.viewScopedNodeList != null) && (s.viewLists != null)) {
s.viewScopedNodeList.add(this);
s.scopedNodesViewList.add(s.viewLists.get(0));
@@ -592,7 +592,7 @@ class BackgroundRetained extends LeafRetained {
// Initialize some mirror values
if (boundingLeaf != null) {
- transformedRegion =
+ transformedRegion =
(Bounds)boundingLeaf.mirrorBoundingLeaf.transformedRegion;
}
else { // Evaluate applicationRegion if not null
@@ -605,7 +605,7 @@ class BackgroundRetained extends LeafRetained {
else {
transformedRegion = null;
}
-
+
}
cachedLocale = s.locale;
@@ -624,7 +624,7 @@ class BackgroundRetained extends LeafRetained {
super.markAsLive();
}
-
+
/**
* This clearLive routine first calls the superclass's method, then
* it removes itself to the list of lights
@@ -674,7 +674,7 @@ class BackgroundRetained extends LeafRetained {
int component = ((Integer)objs[1]).intValue();
Transform3D trans;
// If initialization
-
+
// Bounds message only sent when boundingleaf is null
if ((component & BOUNDS_CHANGED) != 0) {
if (objs[2] != null) {
@@ -700,15 +700,15 @@ class BackgroundRetained extends LeafRetained {
else {
transformedRegion = null;
}
-
+
}
}
}
- /** Note: This routine will only be called
+ /** Note: This routine will only be called
* to update the object's
- * transformed region
+ * transformed region
*/
void updateBoundingLeaf() {
if (boundingLeaf != null &&
@@ -791,5 +791,5 @@ class BackgroundRetained extends LeafRetained {
}
void getMirrorObjects(ArrayList leafList, HashKey key) {
leafList.add(this); // No Mirror in this case
- }
+ }
}
diff --git a/src/classes/share/javax/media/j3d/BackgroundSound.java b/src/classes/share/javax/media/j3d/BackgroundSound.java
index 48a0f9b..f9a743e 100644
--- a/src/classes/share/javax/media/j3d/BackgroundSound.java
+++ b/src/classes/share/javax/media/j3d/BackgroundSound.java
@@ -30,7 +30,7 @@
*/
package javax.media.j3d;
-
+
/**
* A BackgroundSound node defines an unattenuated, nonspatialized sound
* source that has no position or direction. It has the same attributes as a
@@ -41,9 +41,9 @@ package javax.media.j3d;
*/
public class BackgroundSound extends Sound {
/**
- * Constructs a new BackgroundSound node using the default parameters
+ * Constructs a new BackgroundSound node using the default parameters
* for Sound nodes.
- */
+ */
public BackgroundSound() {
/**
* Uses default values defined in SoundRetained.java
@@ -51,12 +51,12 @@ public class BackgroundSound extends Sound {
}
/**
- * Constructs a BackgroundSound node object using only the provided
+ * Constructs a BackgroundSound node object using only the provided
* parameter values for sound data and sample gain. The remaining fields
* are set to the default values for a Sound node.
* @param soundData sound data associated with this sound source node
* @param initialGain amplitude scale factor applied to sound source
- */
+ */
public BackgroundSound(MediaContainer soundData, float initialGain ) {
super(soundData, initialGain);
}
@@ -72,7 +72,7 @@ public class BackgroundSound extends Sound {
* @param enable sound switched on/off
* @param region scheduling bounds
* @param priority playback ranking value
- */
+ */
public BackgroundSound(MediaContainer soundData,
float initialGain,
int loopCount,
@@ -81,12 +81,12 @@ public class BackgroundSound extends Sound {
boolean enable,
Bounds region,
float priority) {
-
+
super(soundData, initialGain, loopCount, release, continuous,
enable, region, priority );
}
-
+
/**
* Creates the retained mode BackgroundSoundRetained object that this
* BackgroundSound component object will point to.
@@ -95,7 +95,7 @@ public class BackgroundSound extends Sound {
this.retained = new BackgroundSoundRetained();
this.retained.setSource(this);
}
-
+
/**
* Creates a new instance of the node. This routine is called
@@ -142,7 +142,7 @@ public class BackgroundSound extends Sound {
* false
, the value of each node's
* duplicateOnCloneTree
variable determines whether
* NodeComponent data is duplicated or copied.
- * @exception ClassCastException if originalNode is not an instance of
+ * @exception ClassCastException if originalNode is not an instance of
* Sound
*
* @see Node#cloneTree
diff --git a/src/classes/share/javax/media/j3d/BackgroundSoundRetained.java b/src/classes/share/javax/media/j3d/BackgroundSoundRetained.java
index 14265a5..46b2fab 100644
--- a/src/classes/share/javax/media/j3d/BackgroundSoundRetained.java
+++ b/src/classes/share/javax/media/j3d/BackgroundSoundRetained.java
@@ -30,7 +30,7 @@
*/
package javax.media.j3d;
-
+
/**
* BackgroundSound is a class for sounds that are not spatially rendered.
* These sounds are simply added to the stereo sound mix without modification.
diff --git a/src/classes/share/javax/media/j3d/Behavior.java b/src/classes/share/javax/media/j3d/Behavior.java
index 7ae9de9..82c5a01 100644
--- a/src/classes/share/javax/media/j3d/Behavior.java
+++ b/src/classes/share/javax/media/j3d/Behavior.java
@@ -253,15 +253,15 @@ public abstract class Behavior extends Leaf {
* This is used when the scheduling bounding leaf is set to null.
* @param region the bounds that contains the Behavior's new scheduling
* region
- */
+ */
public void setSchedulingBounds(Bounds region) {
((BehaviorRetained)this.retained).setSchedulingBounds(region);
}
- /**
+ /**
* Retrieves the Behavior node's scheduling bounds.
* @return this Behavior's scheduling bounds information
- */
+ */
public Bounds getSchedulingBounds() {
return ((BehaviorRetained)this.retained).getSchedulingBounds();
}
@@ -272,15 +272,15 @@ public abstract class Behavior extends Leaf {
* bounds object.
* @param region the bounding leaf node used to specify the Behavior
* node's new scheduling region
- */
+ */
public void setSchedulingBoundingLeaf(BoundingLeaf region) {
((BehaviorRetained)this.retained).setSchedulingBoundingLeaf(region);
}
- /**
+ /**
* Retrieves the Behavior node's scheduling bounding leaf.
* @return this Behavior's scheduling bounding leaf information
- */
+ */
public BoundingLeaf getSchedulingBoundingLeaf() {
return ((BehaviorRetained)this.retained).getSchedulingBoundingLeaf();
}
@@ -310,7 +310,7 @@ public abstract class Behavior extends Leaf {
throw new IllegalStateException(J3dI18N.getString("Behavior0"));
}
}
- behavret.wakeupOn(criteria);
+ behavret.wakeupOn(criteria);
}
/**
@@ -330,9 +330,9 @@ public abstract class Behavior extends Leaf {
}
/**
- * Posts the specified postId to the Behavior Scheduler. All behaviors
- * that have registered WakeupOnBehaviorPost with this postId, or a postId
- * of 0, and with this behavior, or a null behavior, will have that wakeup
+ * Posts the specified postId to the Behavior Scheduler. All behaviors
+ * that have registered WakeupOnBehaviorPost with this postId, or a postId
+ * of 0, and with this behavior, or a null behavior, will have that wakeup
* condition met.
* originalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
@@ -470,7 +470,7 @@ public abstract class Behavior extends Leaf {
*/
void duplicateAttributes(Node originalNode, boolean forceDuplicate) {
super.duplicateAttributes(originalNode, forceDuplicate);
-
+
BehaviorRetained attr = (BehaviorRetained) originalNode.retained;
BehaviorRetained rt = (BehaviorRetained) retained;
@@ -520,7 +520,7 @@ public abstract class Behavior extends Leaf {
if (bl != null) {
Object o = referenceTable.getNewObjectReference(bl);
rt.setSchedulingBoundingLeaf((BoundingLeaf) o);
-
+
}
}
diff --git a/src/classes/share/javax/media/j3d/BehaviorRetained.java b/src/classes/share/javax/media/j3d/BehaviorRetained.java
index 778c357..b39b3af 100644
--- a/src/classes/share/javax/media/j3d/BehaviorRetained.java
+++ b/src/classes/share/javax/media/j3d/BehaviorRetained.java
@@ -47,13 +47,13 @@ class BehaviorRetained extends LeafRetained {
static final int WAKEUP_TIME_INDEX = 4;
static final int NUM_WAKEUPS = 5;
-
+
static final int WAKEUP_ACTIVATE = 0x0001;
static final int WAKEUP_DEACTIVATE = 0x0002;
static final int WAKEUP_VP_ENTRY = 0x0004;
static final int WAKEUP_VP_EXIT = 0x0008;
static final int WAKEUP_TIME = 0x0010;
-
+
/**
* The number of scheduling intervals supported by this
* implementation. This is fixed for a particular implementation
@@ -64,7 +64,7 @@ class BehaviorRetained extends LeafRetained {
// different types of IndexedUnorderedSet that use in BehaviorStructure
static final int BEHAIVORS_IN_BS_LIST = 0;
static final int SCHEDULE_IN_BS_LIST = 1;
-
+
// total number of different IndexedUnorderedSet types
static final int TOTAL_INDEXED_UNORDER_SET_TYPES = 2;
@@ -72,20 +72,20 @@ class BehaviorRetained extends LeafRetained {
* The Boundary object defining the behavior's scheduling region.
*/
Bounds schedulingRegion = null;
-
- /**
+
+ /**
* The bounding leaf reference
*/
BoundingLeafRetained boundingLeaf = null;
-
+
/**
* The current wakeup condition.
*/
WakeupCondition wakeupCondition = null;
/**
- * This is the new WakeupCondition to be set in
- * initialize wakeupOn()
+ * This is the new WakeupCondition to be set in
+ * initialize wakeupOn()
*/
WakeupCondition newWakeupCondition = null;
@@ -94,7 +94,7 @@ class BehaviorRetained extends LeafRetained {
* false until it comes into range of a view platform.
*/
ViewPlatformRetained vp = null;
-
+
/**
* The current activation status for this behavior; this value
* is false until it comes into range of a view platform.
@@ -105,7 +105,7 @@ class BehaviorRetained extends LeafRetained {
* Flag indicating whether the behavior is enabled.
*/
boolean enable = true;
-
+
/**
* Current scheduling interval.
*/
@@ -117,7 +117,7 @@ class BehaviorRetained extends LeafRetained {
* not, then the wakeupCondition will be set to null.
*/
boolean conditionSet = false;
-
+
/**
* This is a flag that indicates whether we are in an initialize or
* processStimulus callback. If wakeupOn is called for this behavior
@@ -128,7 +128,7 @@ class BehaviorRetained extends LeafRetained {
/**
* This is a flag that indicates whether we are in initialize
* callback. If wakeupOn is called for this behavior when
- * this flag is true, then its
+ * this flag is true, then its
* buildTree() will delay until insert nodes message
* is get. This is because some localToVworld[] that wakeup
* depends may not initialize when this behavior setLive().
@@ -139,15 +139,15 @@ class BehaviorRetained extends LeafRetained {
* The transformed schedulingRegion
*/
Bounds transformedRegion = null;
-
+
// A bitmask that indicates that the scheduling region has changed.
int isDirty = 0xffff;
-
+
/**
* A bitmask that represents all conditions that this behavior is waiting on.
*/
int wakeupMask = 0;
-
+
/**
* An array of ints that count how many of each wakup is present
*/
@@ -164,7 +164,7 @@ class BehaviorRetained extends LeafRetained {
targets[0] = this;
IndexedUnorderSet.init(this, TOTAL_INDEXED_UNORDER_SET_TYPES);
}
-
+
/**
* Get the Behavior's scheduling region.
* @return this Behavior's scheduling region information
@@ -181,7 +181,7 @@ class BehaviorRetained extends LeafRetained {
}
return b;
}
-
+
/**
* Set the Behavior's scheduling region.
* @param region a region that contains the Behavior's new scheduling
@@ -205,7 +205,7 @@ class BehaviorRetained extends LeafRetained {
/**
* Set the Sound's scheduling region to the specified Leaf node.
- */
+ */
synchronized void setSchedulingBoundingLeaf(BoundingLeaf region) {
if (source != null && source.isLive()) {
@@ -283,7 +283,7 @@ class BehaviorRetained extends LeafRetained {
/**
* Get the Behavior's scheduling region
- */
+ */
BoundingLeaf getSchedulingBoundingLeaf() {
return (boundingLeaf != null ?
(BoundingLeaf)boundingLeaf.source : null);
@@ -325,7 +325,7 @@ class BehaviorRetained extends LeafRetained {
}
super.markAsLive();
}
-
+
/**
* This clearLive routine first calls the superclass's method, then
* it deactivates all canvases that are associated with the attached
@@ -409,7 +409,7 @@ class BehaviorRetained extends LeafRetained {
// The above wakeupOn() just remember the reference
// We only need to handle (and ignore the rest) the
// last wakeupOn() condition set in the behavior.
- // This handle the case when multiple wakeupOn()
+ // This handle the case when multiple wakeupOn()
// are invoked in the same processStimulus()
void handleLastWakeupOn(WakeupCondition prevWakeupCond,
BehaviorStructure bs) {
@@ -430,29 +430,29 @@ class BehaviorRetained extends LeafRetained {
}
}
-
- /**
+
+ /**
* Returns this behavior's wakeup criteria.
* @return criteria The wakeup criteria of this object
*/
WakeupCondition getWakeupCondition() {
return wakeupCondition;
}
-
+
/**
* Post the specified Id. Behaviors use this method to cause sequential
* scheduling of other behavior object.
* @param postId The Id being posted
*/
-
+
void postId(int postId){
if (source != null && source.isLive()) {
universe.behaviorStructure.handleBehaviorPost((Behavior) source, postId);
}
}
-
+
protected View getView() {
- return (universe != null ?
+ return (universe != null ?
universe.getCurrentView() : null);
}
@@ -489,7 +489,7 @@ class BehaviorRetained extends LeafRetained {
// use boundingLeaf
transformedRegion =
boundingLeaf.mirrorBoundingLeaf.transformedRegion;
-
+
}
}
diff --git a/src/classes/share/javax/media/j3d/BehaviorScheduler.java b/src/classes/share/javax/media/j3d/BehaviorScheduler.java
index 838e851..91db555 100644
--- a/src/classes/share/javax/media/j3d/BehaviorScheduler.java
+++ b/src/classes/share/javax/media/j3d/BehaviorScheduler.java
@@ -89,7 +89,7 @@ class BehaviorScheduler extends J3dThread {
type = J3dThread.BEHAVIOR_SCHEDULER;
}
- void stopBehaviorScheduler(long[] intervalTime) {
+ void stopBehaviorScheduler(long[] intervalTime) {
stopCount = 2;
VirtualUniverse.mc.sendRunMessage(univ, J3dThread.BEHAVIOR_SCHEDULER);
@@ -121,9 +121,9 @@ class BehaviorScheduler extends J3dThread {
/**
* The main loop for the Behavior Scheduler.
* Main method for firing off vector of satisfied conditions that
- * are contained in the condMet vector. Method is synchronized
+ * are contained in the condMet vector. Method is synchronized
* because it is modifying the current wakeup vectors in the
- * clean (emptying out satisfied conditions) and processStimulus
+ * clean (emptying out satisfied conditions) and processStimulus
* (adding conditions again if wakeupOn called) calls.
*/
void doWork(long referenceTime) {
@@ -161,7 +161,7 @@ class BehaviorScheduler extends J3dThread {
synchronized (behavret) {
Behavior behav = (Behavior) behavret.source;
- if (!behav.isLive() ||
+ if (!behav.isLive() ||
!behavret.conditionSet ||
(behavret.wakeupCondition == null)) {
continue;
@@ -178,7 +178,7 @@ class BehaviorScheduler extends J3dThread {
}
// BehaviorRetained now cache the old
- // wakeupCondition in order to
+ // wakeupCondition in order to
// reuse it without the heavyweight cleanTree()
// behavret.wakeupCondition.cleanTree();
@@ -221,7 +221,7 @@ class BehaviorScheduler extends J3dThread {
behavret.handleLastWakeupOn(wakeupCond,
behaviorStructure);
}
- }
+ }
}
list.clear();
}
@@ -229,7 +229,7 @@ class BehaviorScheduler extends J3dThread {
behaviorStructure.handleAWTEvent();
behaviorStructure.handleBehaviorPost();
lastStopTime = J3dClock.currentTimeMillis();
-
+
if (MasterControl.isStatsLoggable(Level.FINE)) {
VirtualUniverse.mc.recordTime(MasterControl.TimeType.BEHAVIOR, (lastStopTime-lastStartTime)*1000000);
}
@@ -239,7 +239,7 @@ class BehaviorScheduler extends J3dThread {
behaviorStructure = null;
getThreadData(null, null).thread = null;
univ = null;
- for (int i=BehaviorRetained.NUM_SCHEDULING_INTERVALS-1;
+ for (int i=BehaviorRetained.NUM_SCHEDULING_INTERVALS-1;
i >= 0; i--) {
processList[i].clear();
}
diff --git a/src/classes/share/javax/media/j3d/BehaviorStructure.java b/src/classes/share/javax/media/j3d/BehaviorStructure.java
index a0582cb..77a58bc 100644
--- a/src/classes/share/javax/media/j3d/BehaviorStructure.java
+++ b/src/classes/share/javax/media/j3d/BehaviorStructure.java
@@ -43,7 +43,7 @@ import java.util.Arrays;
*/
class BehaviorStructure extends J3dStructure {
-
+
/**
* The list of behaviors
*/
@@ -52,10 +52,10 @@ class BehaviorStructure extends J3dStructure {
/**
* The list of view platforms
*/
- IndexedUnorderSet viewPlatforms;
+ IndexedUnorderSet viewPlatforms;
/**
- * An array of schedulable behaviors, use in
+ * An array of schedulable behaviors, use in
* removeViewPlatform() to go through only active behaviors
*/
IndexedUnorderSet scheduleList;
@@ -74,17 +74,17 @@ class BehaviorStructure extends J3dStructure {
Point3d vpTransCenter = new Point3d();
/**
- * A list of bounds WakeupOnViewPlatformEntry objects that
+ * A list of bounds WakeupOnViewPlatformEntry objects that
* have seen ViewPlatformEntry
*/
WakeupIndexedList boundsEntryList;
/**
- * A list of bounds WakeupOnViewPlatformExit objects that have
+ * A list of bounds WakeupOnViewPlatformExit objects that have
* seen ViewPlatformEntry
*/
WakeupIndexedList boundsExitList;
-
+
/**
* A list of WakeupOnSensorEntry objects that have seen a sensor
*/
@@ -96,7 +96,7 @@ class BehaviorStructure extends J3dStructure {
WakeupIndexedList currentSensorExitList;
/**
- * The lists of the WakeupCriterion objects that the
+ * The lists of the WakeupCriterion objects that the
* behavior scheduler keeps.
*/
WakeupIndexedList wakeupOnAWTEvent;
@@ -129,11 +129,11 @@ class BehaviorStructure extends J3dStructure {
// Use generic integer array to avoid new Integer() for individual element
int postIDBuffer[] = new int[10]; // size of default UnorderList
- int clonePostIDBuffer[] = new int[postIDBuffer.length];
+ int clonePostIDBuffer[] = new int[postIDBuffer.length];
UnorderList behaviorPostBuffer = new UnorderList(Behavior.class);
- // temp values for transformed hotspot used in
+ // temp values for transformed hotspot used in
// wakeupOnSensorEntry/ExitupdateSensorsHotspot
Transform3D sensorTransform = new Transform3D();
Vector3d sensorLoc = new Vector3d();
@@ -145,8 +145,8 @@ class BehaviorStructure extends J3dStructure {
// list of Behavior waiting to be add to behavior list and buildTree()
UnorderList pendingBehaviors = new UnorderList(BehaviorRetained.class);
-
- // true if branch detach
+
+ // true if branch detach
boolean branchDetach = false;
// This is used to notify WakeupOnAWTEvent re-enable Canvas3D events
@@ -159,7 +159,7 @@ class BehaviorStructure extends J3dStructure {
BehaviorStructure(VirtualUniverse u) {
super(u, J3dThread.UPDATE_BEHAVIOR);
- for (int i=BehaviorRetained.NUM_SCHEDULING_INTERVALS-1;
+ for (int i=BehaviorRetained.NUM_SCHEDULING_INTERVALS-1;
i >= 0; i--) {
processList[i] = new UnorderList(BehaviorRetained.class);
}
@@ -174,9 +174,9 @@ class BehaviorStructure extends J3dStructure {
boundsExitList = new WakeupIndexedList(WakeupOnViewPlatformExit.class,
WakeupOnViewPlatformExit.BOUNDSEXIT_IN_BS_LIST, u);
currentSensorEntryList = new WakeupIndexedList(WakeupOnSensorEntry.class,
- WakeupOnSensorEntry.SENSORENTRY_IN_BS_LIST, u);
+ WakeupOnSensorEntry.SENSORENTRY_IN_BS_LIST, u);
currentSensorExitList = new WakeupIndexedList(WakeupOnSensorExit.class,
- WakeupOnSensorExit.SENSOREXIT_IN_BS_LIST, u);
+ WakeupOnSensorExit.SENSOREXIT_IN_BS_LIST, u);
wakeupOnAWTEvent = new WakeupIndexedList(WakeupOnAWTEvent.class,
WakeupOnAWTEvent.COND_IN_BS_LIST, u);
wakeupOnActivation = new WakeupIndexedList(WakeupOnActivation.class,
@@ -207,7 +207,7 @@ class BehaviorStructure extends J3dStructure {
if (nMsg > 0) {
for (int i=0; ioriginalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
@@ -620,13 +620,13 @@ private boolean projectToPlane(Vector3d projVec, Vector3d planeVec) {
super.duplicateAttributes(originalNode, forceDuplicate);
Billboard bb = (Billboard) originalNode;
-
+
setAlignmentMode(bb.getAlignmentMode());
Vector3f v = new Vector3f();
bb.getAlignmentAxis(v);
setAlignmentAxis(v);
-
+
Point3f p = new Point3f();
bb.getRotationPoint(p);
setRotationPoint(p);
@@ -634,7 +634,7 @@ private boolean projectToPlane(Vector3d projVec, Vector3d planeVec) {
// this will be updated by updateNodeReferences() later
setTarget(bb.getTarget());
}
-
+
/**
* Callback used to allow a node to check if any scene graph objects
@@ -664,7 +664,7 @@ private boolean projectToPlane(Vector3d projVec, Vector3d planeVec) {
*/
public void updateNodeReferences(NodeReferenceTable referenceTable) {
super.updateNodeReferences(referenceTable);
-
+
// check for new TransformGroup
TransformGroup g = getTarget();
if (g != null) {
diff --git a/src/classes/share/javax/media/j3d/BoundingLeaf.java b/src/classes/share/javax/media/j3d/BoundingLeaf.java
index 40c297f..70285e6 100644
--- a/src/classes/share/javax/media/j3d/BoundingLeaf.java
+++ b/src/classes/share/javax/media/j3d/BoundingLeaf.java
@@ -35,7 +35,7 @@ import javax.vecmath.*;
/**
* The BoundingLeaf node defines a bounding region object that can be
- * referenced by other nodes to define a region of influence
+ * referenced by other nodes to define a region of influence
* (Fog and Light nodes), an application region (Background, Clip,
* and Soundscape nodes), or a scheduling region (Sound and
* Behavior nodes). The bounding region is defined in the local
@@ -73,14 +73,14 @@ public class BoundingLeaf extends Leaf {
private static final int[] readCapabilities = {
ALLOW_REGION_READ
};
-
+
/**
* Constructs a BoundingLeaf node with a null (empty) bounding region.
*/
public BoundingLeaf() {
// set default read capabilities
setDefaultReadCapabilities(readCapabilities);
-
+
((BoundingLeafRetained)this.retained).createBoundingLeaf();
}
@@ -91,7 +91,7 @@ public class BoundingLeaf extends Leaf {
public BoundingLeaf(Bounds region) {
// set default read capabilities
setDefaultReadCapabilities(readCapabilities);
-
+
((BoundingLeafRetained)this.retained).createBoundingLeaf();
((BoundingLeafRetained)this.retained).initRegion(region);
}
@@ -123,18 +123,18 @@ public class BoundingLeaf extends Leaf {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_REGION_READ))
throw new CapabilityNotSetException(J3dI18N.getString("BoundingLeaf1"));
-
+
return ((BoundingLeafRetained)this.retained).getRegion();
}
-
- /**
- * Creates the BoundingLeafRetained object that this
- * BoundingLeaf object will point to.
- */
+
+ /**
+ * Creates the BoundingLeafRetained object that this
+ * BoundingLeaf object will point to.
+ */
void createRetained() {
- this.retained = new BoundingLeafRetained();
- this.retained.setSource(this);
- }
+ this.retained = new BoundingLeafRetained();
+ this.retained.setSource(this);
+ }
/**
* Used to create a new instance of the node. This routine is called
@@ -156,7 +156,7 @@ public class BoundingLeaf extends Leaf {
return bl;
}
-
+
/**
* Copies all BoundingLeaf information from
diff --git a/src/classes/share/javax/media/j3d/BoundingLeafRetained.java b/src/classes/share/javax/media/j3d/BoundingLeafRetained.java
index d29d994..6935743 100644
--- a/src/classes/share/javax/media/j3d/BoundingLeafRetained.java
+++ b/src/classes/share/javax/media/j3d/BoundingLeafRetained.java
@@ -48,8 +48,8 @@ class BoundingLeafRetained extends LeafRetained {
Bounds region = null;
- // For the mirror object, this region is the transformed region
- // (the region of the original bounding leaf object transformed
+ // For the mirror object, this region is the transformed region
+ // (the region of the original bounding leaf object transformed
// by the cache transform)
Bounds transformedRegion = null;
@@ -76,7 +76,7 @@ class BoundingLeafRetained extends LeafRetained {
this.nodeType = NodeRetained.BOUNDINGLEAF;
mirrorBoundingLeaf = new BoundingLeafRetained();
}
-
+
/**
* Initialize the bounding region
*/
@@ -173,7 +173,7 @@ class BoundingLeafRetained extends LeafRetained {
}
- /** Update the "component" field of the mirror object with the
+ /** Update the "component" field of the mirror object with the
* given "value"
*/
synchronized void updateImmediateMirrorObject(Object[] objs) {
@@ -181,7 +181,7 @@ class BoundingLeafRetained extends LeafRetained {
int component = ((Integer)objs[1]).intValue();
Bounds b = ((Bounds)objs[2]);
Transform3D t;
-
+
if ((component & REGION_CHANGED) != 0) {
mirrorBoundingLeaf.region = b;
if (b != null) {
@@ -192,7 +192,7 @@ class BoundingLeafRetained extends LeafRetained {
else {
mirrorBoundingLeaf.transformedRegion = null;
}
-
+
}
}
diff --git a/src/classes/share/javax/media/j3d/BoundingPolytope.java b/src/classes/share/javax/media/j3d/BoundingPolytope.java
index 64a42ff..b6a0e68 100644
--- a/src/classes/share/javax/media/j3d/BoundingPolytope.java
+++ b/src/classes/share/javax/media/j3d/BoundingPolytope.java
@@ -53,20 +53,20 @@ import com.sun.j3d.internal.HashCodeUtil;
*/
public class BoundingPolytope extends Bounds {
-
+
/**
* An array of bounding planes.
*/
- Vector4d[] planes;
+ Vector4d[] planes;
double[] mag; // magnitude of plane vector
double[] pDotN; // point on plane dotted with normal
Point3d[] verts; // vertices of polytope
int nVerts; // number of verts in polytope
Point3d centroid = new Point3d(); // centroid of polytope
-
+
Point3d boxVerts[];
boolean allocBoxVerts = false;
-
+
/**
* Constructs a BoundingPolytope using the specified planes.
* @param planes a set of planes defining the polytope.
@@ -84,16 +84,16 @@ public class BoundingPolytope extends Bounds {
this.planes = new Vector4d[planes.length];
mag = new double[planes.length];
pDotN = new double[planes.length];
-
+
for(i=0;iBranchGroup
that intersect with PickShape.
@@ -180,25 +180,25 @@ public class BranchGroup extends Group {
if(isLive()==false)
throw new IllegalStateException(J3dI18N.getString("BranchGroup3"));
- return ((BranchGroupRetained)this.retained).pickAll(pickShape);
-
+ return ((BranchGroupRetained)this.retained).pickAll(pickShape);
+
}
-
+
/**
- * Returns an array unsorted references to all the PickInfo objects that are
+ * Returns an array unsorted references to all the PickInfo objects that are
* pickable below this BranchGroup
that intersect with PickShape.
- * The accuracy of the pick is set by the pick mode. The mode include :
- * PickInfo.PICK_BOUNDS and PickInfo.PICK_GEOMETRY. The amount of information returned
- * is specified via a masked variable, flags, indicating which components are
- * present in each returned PickInfo object.
+ * The accuracy of the pick is set by the pick mode. The mode include :
+ * PickInfo.PICK_BOUNDS and PickInfo.PICK_GEOMETRY. The amount of information returned
+ * is specified via a masked variable, flags, indicating which components are
+ * present in each returned PickInfo object.
*
* @param mode picking mode, one of PickInfo.PICK_BOUNDS
or PickInfo.PICK_GEOMETRY
.
*
- * @param flags a mask indicating which components are present in each PickInfo object.
- * This is specified as one or more individual bits that are bitwise "OR"ed together to
+ * @param flags a mask indicating which components are present in each PickInfo object.
+ * This is specified as one or more individual bits that are bitwise "OR"ed together to
* describe the PickInfo data. The flags include :
*
- *
PickInfo.SCENEGRAPHPATH
- request for computed SceneGraphPath.
+ * PickInfo.SCENEGRAPHPATH
- request for computed SceneGraphPath.
* PickInfo.NODE
- request for computed intersected Node.
* PickInfo.LOCAL_TO_VWORLD
- request for computed local to virtual world transform.
* PickInfo.CLOSEST_INTERSECTION_POINT
- request for closest intersection point.
@@ -209,20 +209,20 @@ public class BranchGroup extends Group {
*
* @param pickShape the description of this picking volume or area.
*
- * @exception IllegalArgumentException if flags contains both CLOSEST_GEOM_INFO and
+ * @exception IllegalArgumentException if flags contains both CLOSEST_GEOM_INFO and
* ALL_GEOM_INFO.
*
* @exception IllegalArgumentException if pickShape is a PickPoint and pick mode
* is set to PICK_GEOMETRY.
*
- * @exception IllegalArgumentException if pick mode is neither PICK_BOUNDS
+ * @exception IllegalArgumentException if pick mode is neither PICK_BOUNDS
* nor PICK_GEOMETRY.
*
- * @exception IllegalArgumentException if pick mode is PICK_BOUNDS
+ * @exception IllegalArgumentException if pick mode is PICK_BOUNDS
* and flags includes any of CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE,
* CLOSEST_GEOM_INFO or ALL_GEOM_INFO.
*
- * @exception IllegalArgumentException if pickShape is PickBounds
+ * @exception IllegalArgumentException if pickShape is PickBounds
* and flags includes any of CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE,
* CLOSEST_GEOM_INFO or ALL_GEOM_INFO.
*
@@ -232,14 +232,14 @@ public class BranchGroup extends Group {
* PICK_GEOMETRY and the Geometry.ALLOW_INTERSECT capability bit
* is not set in any Geometry objects referred to by any shape
* node whose bounds intersects the PickShape.
- *
+ *
* @exception CapabilityNotSetException if flags contains any of
* CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE, CLOSEST_GEOM_INFO
* or ALL_GEOM_INFO, and the capability bits that control reading of
* coordinate data are not set in any GeometryArray object referred
* to by any shape node that intersects the PickShape.
* The capability bits that must be set to avoid this exception are as follows :
- *
+ *
*
PickInfo.PICK_BOUNDS
or PickInfo.PICK_GEOMETRY
.
*
- * @param flags a mask indicating which components are present in each PickInfo object.
- * This is specified as one or more individual bits that are bitwise "OR"ed together to
+ * @param flags a mask indicating which components are present in each PickInfo object.
+ * This is specified as one or more individual bits that are bitwise "OR"ed together to
* describe the PickInfo data. The flags include :
*
- *
PickInfo.SCENEGRAPHPATH
- request for computed SceneGraphPath.
+ * PickInfo.SCENEGRAPHPATH
- request for computed SceneGraphPath.
* PickInfo.NODE
- request for computed intersected Node.
* PickInfo.LOCAL_TO_VWORLD
- request for computed local to virtual world transform.
* PickInfo.CLOSEST_INTERSECTION_POINT
- request for closest intersection point.
@@ -314,20 +314,20 @@ public class BranchGroup extends Group {
*
* @param pickShape the description of this picking volume or area.
*
- * @exception IllegalArgumentException if flags contains both CLOSEST_GEOM_INFO and
+ * @exception IllegalArgumentException if flags contains both CLOSEST_GEOM_INFO and
* ALL_GEOM_INFO.
*
* @exception IllegalArgumentException if pickShape is a PickPoint and pick mode
* is set to PICK_GEOMETRY.
*
- * @exception IllegalArgumentException if pick mode is neither PICK_BOUNDS
+ * @exception IllegalArgumentException if pick mode is neither PICK_BOUNDS
* nor PICK_GEOMETRY.
*
- * @exception IllegalArgumentException if pick mode is PICK_BOUNDS
+ * @exception IllegalArgumentException if pick mode is PICK_BOUNDS
* and flags includes any of CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE,
* CLOSEST_GEOM_INFO or ALL_GEOM_INFO.
*
- * @exception IllegalArgumentException if pickShape is PickBounds
+ * @exception IllegalArgumentException if pickShape is PickBounds
* and flags includes any of CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE,
* CLOSEST_GEOM_INFO or ALL_GEOM_INFO.
*
@@ -337,14 +337,14 @@ public class BranchGroup extends Group {
* PICK_GEOMETRY and the Geometry.ALLOW_INTERSECT capability bit
* is not set in any Geometry objects referred to by any shape
* node whose bounds intersects the PickShape.
- *
+ *
* @exception CapabilityNotSetException if flags contains any of
* CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE, CLOSEST_GEOM_INFO
* or ALL_GEOM_INFO, and the capability bits that control reading of
* coordinate data are not set in any GeometryArray object referred
* to by any shape node that intersects the PickShape.
* The capability bits that must be set to avoid this exception are as follows :
- *
+ *
*
pickShape
.
*
* Note: If pickShape is of type PickBounds, the return is any pickable node
@@ -376,32 +376,32 @@ public class BranchGroup extends Group {
* @see Locale#pickClosest
* @see PickShape
* @exception IllegalStateException if BranchGroup is not live.
- *
+ *
*/
public SceneGraphPath pickClosest( PickShape pickShape ) {
if(isLive()==false)
throw new IllegalStateException(J3dI18N.getString("BranchGroup3"));
- return ((BranchGroupRetained)this.retained).pickClosest(pickShape);
+ return ((BranchGroupRetained)this.retained).pickClosest(pickShape);
}
/**
* Returns a PickInfo which references the pickable item
* which is closest to the origin of pickShape
.
- * The accuracy of the pick is set by the pick mode. The mode include :
- * PickInfo.PICK_BOUNDS and PickInfo.PICK_GEOMETRY. The amount of information returned
- * is specified via a masked variable, flags, indicating which components are
- * present in each returned PickInfo object.
+ * The accuracy of the pick is set by the pick mode. The mode include :
+ * PickInfo.PICK_BOUNDS and PickInfo.PICK_GEOMETRY. The amount of information returned
+ * is specified via a masked variable, flags, indicating which components are
+ * present in each returned PickInfo object.
*
* @param mode picking mode, one of PickInfo.PICK_BOUNDS
or PickInfo.PICK_GEOMETRY
.
*
- * @param flags a mask indicating which components are present in each PickInfo object.
- * This is specified as one or more individual bits that are bitwise "OR"ed together to
+ * @param flags a mask indicating which components are present in each PickInfo object.
+ * This is specified as one or more individual bits that are bitwise "OR"ed together to
* describe the PickInfo data. The flags include :
*
- *
PickInfo.SCENEGRAPHPATH
- request for computed SceneGraphPath.
+ * PickInfo.SCENEGRAPHPATH
- request for computed SceneGraphPath.
* PickInfo.NODE
- request for computed intersected Node.
* PickInfo.LOCAL_TO_VWORLD
- request for computed local to virtual world transform.
* PickInfo.CLOSEST_INTERSECTION_POINT
- request for closest intersection point.
@@ -412,20 +412,20 @@ public class BranchGroup extends Group {
*
* @param pickShape the description of this picking volume or area.
*
- * @exception IllegalArgumentException if flags contains both CLOSEST_GEOM_INFO and
+ * @exception IllegalArgumentException if flags contains both CLOSEST_GEOM_INFO and
* ALL_GEOM_INFO.
*
* @exception IllegalArgumentException if pickShape is a PickPoint and pick mode
* is set to PICK_GEOMETRY.
*
- * @exception IllegalArgumentException if pick mode is neither PICK_BOUNDS
+ * @exception IllegalArgumentException if pick mode is neither PICK_BOUNDS
* nor PICK_GEOMETRY.
*
- * @exception IllegalArgumentException if pick mode is PICK_BOUNDS
+ * @exception IllegalArgumentException if pick mode is PICK_BOUNDS
* and flags includes any of CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE,
* CLOSEST_GEOM_INFO or ALL_GEOM_INFO.
*
- * @exception IllegalArgumentException if pickShape is PickBounds
+ * @exception IllegalArgumentException if pickShape is PickBounds
* and flags includes any of CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE,
* CLOSEST_GEOM_INFO or ALL_GEOM_INFO.
*
@@ -435,14 +435,14 @@ public class BranchGroup extends Group {
* PICK_GEOMETRY and the Geometry.ALLOW_INTERSECT capability bit
* is not set in any Geometry objects referred to by any shape
* node whose bounds intersects the PickShape.
- *
+ *
* @exception CapabilityNotSetException if flags contains any of
* CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE, CLOSEST_GEOM_INFO
* or ALL_GEOM_INFO, and the capability bits that control reading of
* coordinate data are not set in any GeometryArray object referred
* to by any shape node that intersects the PickShape.
* The capability bits that must be set to avoid this exception are as follows :
- *
+ *
*
pickShape
.
- * The accuracy of the pick is set by the pick mode. The mode include :
- * PickInfo.PICK_BOUNDS and PickInfo.PICK_GEOMETRY. The amount of information returned
- * is specified via a masked variable, flags, indicating which components are
- * present in each returned PickInfo object.
+ * The accuracy of the pick is set by the pick mode. The mode include :
+ * PickInfo.PICK_BOUNDS and PickInfo.PICK_GEOMETRY. The amount of information returned
+ * is specified via a masked variable, flags, indicating which components are
+ * present in each returned PickInfo object.
*
* @param mode picking mode, one of PickInfo.PICK_BOUNDS
or PickInfo.PICK_GEOMETRY
.
*
- * @param flags a mask indicating which components are present in each PickInfo object.
- * This is specified as one or more individual bits that are bitwise "OR"ed together to
+ * @param flags a mask indicating which components are present in each PickInfo object.
+ * This is specified as one or more individual bits that are bitwise "OR"ed together to
* describe the PickInfo data. The flags include :
*
- *
PickInfo.SCENEGRAPHPATH
- request for computed SceneGraphPath.
+ * PickInfo.SCENEGRAPHPATH
- request for computed SceneGraphPath.
* PickInfo.NODE
- request for computed intersected Node.
* PickInfo.LOCAL_TO_VWORLD
- request for computed local to virtual world transform.
* PickInfo.CLOSEST_INTERSECTION_POINT
- request for closest intersection point.
@@ -508,20 +508,20 @@ public class BranchGroup extends Group {
*
* @param pickShape the description of this picking volume or area.
*
- * @exception IllegalArgumentException if flags contains both CLOSEST_GEOM_INFO and
+ * @exception IllegalArgumentException if flags contains both CLOSEST_GEOM_INFO and
* ALL_GEOM_INFO.
*
* @exception IllegalArgumentException if pickShape is a PickPoint and pick mode
* is set to PICK_GEOMETRY.
*
- * @exception IllegalArgumentException if pick mode is neither PICK_BOUNDS
+ * @exception IllegalArgumentException if pick mode is neither PICK_BOUNDS
* nor PICK_GEOMETRY.
*
- * @exception IllegalArgumentException if pick mode is PICK_BOUNDS
+ * @exception IllegalArgumentException if pick mode is PICK_BOUNDS
* and flags includes any of CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE,
* CLOSEST_GEOM_INFO or ALL_GEOM_INFO.
*
- * @exception IllegalArgumentException if pickShape is PickBounds
+ * @exception IllegalArgumentException if pickShape is PickBounds
* and flags includes any of CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE,
* CLOSEST_GEOM_INFO or ALL_GEOM_INFO.
*
@@ -531,14 +531,14 @@ public class BranchGroup extends Group {
* PICK_GEOMETRY and the Geometry.ALLOW_INTERSECT capability bit
* is not set in any Geometry objects referred to by any shape
* node whose bounds intersects the PickShape.
- *
+ *
* @exception CapabilityNotSetException if flags contains any of
* CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE, CLOSEST_GEOM_INFO
* or ALL_GEOM_INFO, and the capability bits that control reading of
* coordinate data are not set in any GeometryArray object referred
* to by any shape node that intersects the PickShape.
* The capability bits that must be set to avoid this exception are as follows :
- *
+ *
*
- *
+ *
* In addition to specifying the fog density, ExponentialFog lets you
* specify the fog color, which is represented by R, G, and B
* color values, where a color of (0,0,0) represents black.
@@ -205,7 +205,7 @@ public class ExponentialFog extends Fog {
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
diff --git a/src/classes/share/javax/media/j3d/ClipRetained.java b/src/classes/share/javax/media/j3d/ClipRetained.java
index bdf99fc..8a60136 100644
--- a/src/classes/share/javax/media/j3d/ClipRetained.java
+++ b/src/classes/share/javax/media/j3d/ClipRetained.java
@@ -51,7 +51,7 @@ class ClipRetained extends LeafRetained {
/**
* Clip's back distance
*/
- double backDistance = 100.0;
+ double backDistance = 100.0;
/**
* back distance scaled to vworld
@@ -60,10 +60,10 @@ class ClipRetained extends LeafRetained {
/**
* The Boundary object defining the application region.
- */
+ */
Bounds applicationRegion = null;
- /**
+ /**
* The bounding leaf reference
*/
BoundingLeafRetained boundingLeaf = null;
@@ -98,7 +98,7 @@ class ClipRetained extends LeafRetained {
}
/**
- * initializes the clip's back distance to the specified value.
+ * initializes the clip's back distance to the specified value.
* @param backDistance the new back clipping distance
*/
final void initBackDistance(double backDistance) {
@@ -107,7 +107,7 @@ class ClipRetained extends LeafRetained {
/**
- * Sets the clip's back distance to the specified value.
+ * Sets the clip's back distance to the specified value.
* @param backDistance the new back clipping distance
*/
final void setBackDistance(double backDistance) {
@@ -127,7 +127,7 @@ class ClipRetained extends LeafRetained {
/**
* Initializes the Clip's application region.
* @param region a region that contains the Backgound's new application bounds
- */
+ */
final void initApplicationBounds(Bounds region) {
if (region != null) {
applicationRegion = (Bounds) region.clone();
@@ -139,29 +139,29 @@ class ClipRetained extends LeafRetained {
/**
* Set the Clip's application region.
* @param region a region that contains the Clip's new application bounds
- */
+ */
final void setApplicationBounds(Bounds region) {
initApplicationBounds(region);
// Don't send the message if there is a valid boundingleaf
if (boundingLeaf == null) {
- sendMessage(BOUNDS_CHANGED,
+ sendMessage(BOUNDS_CHANGED,
(region != null ? region.clone(): null), null);
}
}
- /**
+ /**
* Get the Backgound's application region.
* @return this Clip's application bounds information
- */
+ */
final Bounds getApplicationBounds() {
return (applicationRegion != null ?
(Bounds) applicationRegion.clone() : null);
}
/**
- * Initializes the Clip's application region
+ * Initializes the Clip's application region
* to the specified Leaf node.
- */
+ */
void initApplicationBoundingLeaf(BoundingLeaf region) {
if (region != null) {
boundingLeaf = (BoundingLeafRetained)region.retained;
@@ -172,18 +172,18 @@ class ClipRetained extends LeafRetained {
/**
* Set the Clip's application region to the specified Leaf node.
- */
+ */
void setApplicationBoundingLeaf(BoundingLeaf region) {
if (boundingLeaf != null)
boundingLeaf.mirrorBoundingLeaf.removeUser(this);
-
+
if (region != null) {
boundingLeaf = (BoundingLeafRetained)region.retained;
boundingLeaf.mirrorBoundingLeaf.addUser(this);
} else {
boundingLeaf = null;
}
- sendMessage(BOUNDINGLEAF_CHANGED,
+ sendMessage(BOUNDINGLEAF_CHANGED,
(boundingLeaf != null ?
boundingLeaf.mirrorBoundingLeaf : null),
(applicationRegion != null ? applicationRegion.clone() : null));
@@ -191,7 +191,7 @@ class ClipRetained extends LeafRetained {
/**
* Get the Clip's application region
- */
+ */
BoundingLeaf getApplicationBoundingLeaf() {
return (boundingLeaf != null ?
(BoundingLeaf)boundingLeaf.source : null);
@@ -203,7 +203,7 @@ class ClipRetained extends LeafRetained {
void setInImmCtx(boolean inCtx) {
inImmCtx = inCtx;
}
-
+
/**
* This gets the immedate mode context flag
*/
@@ -258,7 +258,7 @@ class ClipRetained extends LeafRetained {
super.markAsLive();
}
-
+
/**
* This clearLive routine first calls the superclass's method, then
* it removes itself to the list of lights
@@ -299,9 +299,9 @@ class ClipRetained extends LeafRetained {
else {
transformedRegion = null;
}
-
+
}
- backDistanceInVworld = backDistance *
+ backDistanceInVworld = backDistance *
lastLocalToVworld.getDistanceScale();
}
@@ -337,7 +337,7 @@ class ClipRetained extends LeafRetained {
else {
transformedRegion = null;
}
-
+
}
}
@@ -349,7 +349,7 @@ class ClipRetained extends LeafRetained {
/** Note: This routine will only be called on
* the mirror object - will update the object's
- * cached region and transformed region
+ * cached region and transformed region
*/
void updateBoundingLeaf() {
diff --git a/src/classes/share/javax/media/j3d/ColorInterpolator.java b/src/classes/share/javax/media/j3d/ColorInterpolator.java
index 388a610..c527e38 100644
--- a/src/classes/share/javax/media/j3d/ColorInterpolator.java
+++ b/src/classes/share/javax/media/j3d/ColorInterpolator.java
@@ -58,13 +58,13 @@ public class ColorInterpolator extends Interpolator {
Color3f endColor = new Color3f();
Color3f newColor = new Color3f();
- // We can't use a boolean flag since it is possible
+ // We can't use a boolean flag since it is possible
// that after alpha change, this procedure only run
// once at alpha.finish(). So the best way is to
// detect alpha value change.
private float prevAlphaValue = Float.NaN;
private int prevColorTarget = -1;
- private WakeupCriterion passiveWakeupCriterion =
+ private WakeupCriterion passiveWakeupCriterion =
(WakeupCriterion) new WakeupOnElapsedFrames(0, true);
// non-public, no parameter constructor used by cloneNode
@@ -144,7 +144,7 @@ public class ColorInterpolator extends Interpolator {
}
/**
- * This method sets the target material component object for
+ * This method sets the target material component object for
* this interpolator.
* @param target the material component object whose
* color is affected by this color interpolator
@@ -163,7 +163,7 @@ public class ColorInterpolator extends Interpolator {
return target;
}
- // The ColorInterpolator's initialize routine uses the default
+ // The ColorInterpolator's initialize routine uses the default
// initialization routine.
/**
@@ -241,14 +241,14 @@ public class ColorInterpolator extends Interpolator {
ci.duplicateNode(this, forceDuplicate);
return ci;
}
-
+
/**
* Copies all ColorInterpolator information from
* originalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
@@ -266,7 +266,7 @@ public class ColorInterpolator extends Interpolator {
*/
void duplicateAttributes(Node originalNode, boolean forceDuplicate) {
super.duplicateAttributes(originalNode, forceDuplicate);
-
+
ColorInterpolator ci = (ColorInterpolator) originalNode;
ci.getStartColor(startColor);
diff --git a/src/classes/share/javax/media/j3d/ColoringAttributes.java b/src/classes/share/javax/media/j3d/ColoringAttributes.java
index 833df11..d1ddcbf 100644
--- a/src/classes/share/javax/media/j3d/ColoringAttributes.java
+++ b/src/classes/share/javax/media/j3d/ColoringAttributes.java
@@ -42,7 +42,7 @@ import javax.vecmath.Color3f;
* setColor
methods set the current intrinsic red, green, and
* blue color values of this ColoringAttributes component object.
- * This color is only used for unlit geometry. If lighting is enabled,
+ * This color is only used for unlit geometry. If lighting is enabled,
* the material colors are used in the lighting equation to produce
* the final color. When vertex colors are present in unlit
* geometry, those vertex colors are used in place of this
@@ -56,15 +56,15 @@ import javax.vecmath.Color3f;
* setShadeModel
method sets the shade model for this
- * ColoringAttributes component object. The shade model may be one of
+ * The setShadeModel
method sets the shade model for this
+ * ColoringAttributes component object. The shade model may be one of
* the following:
*
- */
+ */
public class ConeSound extends PointSound {
// Constants
@@ -200,7 +200,7 @@ public class ConeSound extends PointSound {
*/
public ConeSound(MediaContainer soundData,
float initialGain,
- Point3f position,
+ Point3f position,
Vector3f direction) {
super(soundData, initialGain, position );
@@ -215,7 +215,7 @@ public class ConeSound extends PointSound {
* Constructs a ConeSound node object using only the provided parameter
* values for sound, overall initial gain, position, and direction. The
* remaining fields are set to the default values above. This form uses
- * individual float parameters for the elements of the position and
+ * individual float parameters for the elements of the position and
* direction vectors.
* @param soundData sound source data
* @param initialGain amplitude scale factor applied to sound
@@ -228,7 +228,7 @@ public class ConeSound extends PointSound {
*/
public ConeSound(MediaContainer soundData,
float initialGain,
- float posX, float posY, float posZ,
+ float posX, float posY, float posZ,
float dirX, float dirY, float dirZ) {
super(soundData, initialGain, posX, posY, posZ );
@@ -241,13 +241,13 @@ public class ConeSound extends PointSound {
/**
* Constructs a ConeSound node object using all the provided PointSound
- * parameter values. This form uses points or vectors as input for its
+ * parameter values. This form uses points or vectors as input for its
* position, direction, and front/back distance attenuation arrays.
*duplicateNode
method. This routine does
* the actual duplication of all "local data" (any data defined in
- * this object).
+ * this object).
*
* @param originalNodeComponent the original node to duplicate.
* @param forceDuplicate when set to true
, causes the
@@ -325,15 +325,15 @@ public class ColoringAttributes extends NodeComponent {
* @see Node#cloneTree
* @see NodeComponent#setDuplicateOnCloneTree
*/
- void duplicateAttributes(NodeComponent originalNodeComponent,
- boolean forceDuplicate) {
+ void duplicateAttributes(NodeComponent originalNodeComponent,
+ boolean forceDuplicate) {
super.duplicateAttributes(originalNodeComponent,
- forceDuplicate);
+ forceDuplicate);
- ColoringAttributesRetained attr =
+ ColoringAttributesRetained attr =
(ColoringAttributesRetained) originalNodeComponent.retained;
-
+
ColoringAttributesRetained rt = (ColoringAttributesRetained) retained;
Color3f c = new Color3f();
attr.getColor(c);
diff --git a/src/classes/share/javax/media/j3d/ColoringAttributesRetained.java b/src/classes/share/javax/media/j3d/ColoringAttributesRetained.java
index 1e3581c..2e3fc9b 100644
--- a/src/classes/share/javax/media/j3d/ColoringAttributesRetained.java
+++ b/src/classes/share/javax/media/j3d/ColoringAttributesRetained.java
@@ -50,7 +50,7 @@ class ColoringAttributesRetained extends NodeComponentRetained {
// Shade model (flat, smooth)
int shadeModel = ColoringAttributes.SHADE_GOURAUD;
-
+
/**
* Sets the intrinsic color of this ColoringAttributes
* component object.
@@ -140,7 +140,7 @@ class ColoringAttributesRetained extends NodeComponentRetained {
/**
- * Creates and initializes a mirror object, point the mirror object
+ * Creates and initializes a mirror object, point the mirror object
* to the retained object if the object is not editable
*/
synchronized void createMirrorObject() {
@@ -150,7 +150,7 @@ class ColoringAttributesRetained extends NodeComponentRetained {
if (isStatic()) {
mirror = this;
} else {
- ColoringAttributesRetained mirrorCa
+ ColoringAttributesRetained mirrorCa
= new ColoringAttributesRetained();
mirrorCa.source = source;
mirrorCa.set(this);
@@ -178,11 +178,11 @@ class ColoringAttributesRetained extends NodeComponentRetained {
((ColoringAttributesRetained)mirror).set(this);
}
- /** Update the "component" field of the mirror object with the
+ /** Update the "component" field of the mirror object with the
* given "value"
*/
synchronized void updateMirrorObject(int component, Object value) {
-
+
ColoringAttributesRetained mirrorCa =
(ColoringAttributesRetained) mirror;
@@ -196,7 +196,7 @@ class ColoringAttributesRetained extends NodeComponentRetained {
boolean equivalent(ColoringAttributesRetained cr) {
return ((cr != null) &&
- color.equals(cr.color) &&
+ color.equals(cr.color) &&
(shadeModel == cr.shadeModel));
}
@@ -217,11 +217,11 @@ class ColoringAttributesRetained extends NodeComponentRetained {
super.set(cr);
color.set(cr.color);
shadeModel = cr.shadeModel;
- }
+ }
final void sendMessage(int attrMask, Object attr) {
ArrayList univList = new ArrayList();
- ArrayList gaList = Shape3DRetained.getGeomAtomsList(mirror.users, univList);
+ ArrayList gaList = Shape3DRetained.getGeomAtomsList(mirror.users, univList);
// Send to rendering attribute structure, regardless of
// whether there are users or not (alternate appearance case ..)
J3dMessage createMessage = new J3dMessage();
@@ -234,23 +234,23 @@ class ColoringAttributesRetained extends NodeComponentRetained {
createMessage.args[3] = new Integer(changedFrequent);
VirtualUniverse.mc.processMessage(createMessage);
-
+
// System.err.println("univList.size is " + univList.size());
for(int i=0; ifalse
, the value of each node's
* duplicateOnCloneTree
variable determines whether
* NodeComponent data is duplicated or copied.
- * @exception ClassCastException if originalNode is not an instance of
+ * @exception ClassCastException if originalNode is not an instance of
* ConeSound
*
* @see Node#cloneTree
@@ -913,7 +913,7 @@ public class ConeSound extends PointSound {
* originalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
@@ -935,18 +935,18 @@ public class ConeSound extends PointSound {
ConeSoundRetained orgRetained = (ConeSoundRetained)originalNode.retained;
ConeSoundRetained thisRetained = (ConeSoundRetained)this.retained;
- // front distance gain & attenuation is set in super
+ // front distance gain & attenuation is set in super
// set back distance gain only
int len = orgRetained.getDistanceGainLength();
float distance[] = new float[len];
float gain[] = new float[len];
orgRetained.getDistanceGain(null, null,distance, gain);
thisRetained.setBackDistanceGain(distance, gain);
-
+
Vector3f v = new Vector3f();
orgRetained.getDirection(v);
thisRetained.setDirection(v);
-
+
len = orgRetained.getAngularAttenuationLength();
distance = gain = null;
float angle[] = new float[len];
diff --git a/src/classes/share/javax/media/j3d/ConeSoundRetained.java b/src/classes/share/javax/media/j3d/ConeSoundRetained.java
index 445a68f..a3f4b38 100644
--- a/src/classes/share/javax/media/j3d/ConeSoundRetained.java
+++ b/src/classes/share/javax/media/j3d/ConeSoundRetained.java
@@ -40,12 +40,12 @@ import javax.vecmath.Point3f;
/**
* A ConeSoundRetained node defines a point sound source located at some
- * location
+ * location
* in space whose amplitude is constrained not only by maximum and minimum
* amplitude
* spheres but by two concentric cone volumes directed down an vector radiating
* from the sound's location.
- */
+ */
class ConeSoundRetained extends PointSoundRetained {
/**
@@ -90,14 +90,14 @@ class ConeSoundRetained extends PointSoundRetained {
// *********************
/**
- * Sets this sound's distance gain elliptical attenuation -
+ * Sets this sound's distance gain elliptical attenuation -
* where gain scale factor is applied to sound based on distance listener
* is from sound source.
* @param frontAttenuation defined by pairs of (distance,gain-scale-factor)
* @param backAttenuation defined by pairs of (distance,gain-scale-factor)
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
void setDistanceGain(Point2f[] frontAttenuation,
Point2f[] backAttenuation ) {
@@ -113,7 +113,7 @@ class ConeSoundRetained extends PointSoundRetained {
* @param backGain array of non-negative scale factors
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
void setDistanceGain(float[] frontDistance, float[] frontGain,
float[] backDistance, float[] backGain) {
this.setDistanceGain(frontDistance, frontGain);
@@ -121,13 +121,13 @@ class ConeSoundRetained extends PointSoundRetained {
}
/**
- * Sets this sound's back distance gain attenuation - where gain scale
+ * Sets this sound's back distance gain attenuation - where gain scale
* factor is applied to sound based on distance listener along the negative
* sound direction axis from sound source.
* @param attenuation defined by pairs of (distance,gain-scale-factor)
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
void setBackDistanceGain(Point2f[] attenuation)
{
// if attenuation array null set both attenuation components to null
@@ -162,7 +162,7 @@ class ConeSoundRetained extends PointSoundRetained {
* @param gain array of non-negative scale factors
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
void setBackDistanceGain(float[] distance, float[] gain)
{
int distanceLength = 0;
@@ -184,10 +184,10 @@ class ConeSoundRetained extends PointSoundRetained {
this.backAttenuationGain = new float[distanceLength];
// Copy the distance array into nodes field
System.arraycopy(distance, 0, this.backAttenuationDistance,
- 0, distanceLength);
+ 0, distanceLength);
// Copy the gain array an array of same length as the distance array
if (distanceLength <= gainLength) {
- System.arraycopy(gain, 0, this.backAttenuationGain,
+ System.arraycopy(gain, 0, this.backAttenuationGain,
0, distanceLength);
}
else {
@@ -200,12 +200,12 @@ class ConeSoundRetained extends PointSoundRetained {
}
}
}
-
- Point2f [] attenuation = new Point2f[distanceLength];
- for (int i=0; itrue
, causes the
@@ -120,8 +120,8 @@ public class DepthComponentFloat extends DepthComponent {
* @see Node#cloneTree
* @see NodeComponent#setDuplicateOnCloneTree
*/
- void duplicateAttributes(NodeComponent originalNodeComponent,
- boolean forceDuplicate) {
+ void duplicateAttributes(NodeComponent originalNodeComponent,
+ boolean forceDuplicate) {
super.duplicateAttributes(originalNodeComponent,
forceDuplicate);
// width, height is copied in cloneNode before
diff --git a/src/classes/share/javax/media/j3d/DepthComponentFloatRetained.java b/src/classes/share/javax/media/j3d/DepthComponentFloatRetained.java
index 1d83d3f..6c2e79e 100644
--- a/src/classes/share/javax/media/j3d/DepthComponentFloatRetained.java
+++ b/src/classes/share/javax/media/j3d/DepthComponentFloatRetained.java
@@ -42,7 +42,7 @@ class DepthComponentFloatRetained extends DepthComponentRetained {
float depthData[];
/**
- * Constructs a new floating-point depth (z-buffer) component object with
+ * Constructs a new floating-point depth (z-buffer) component object with
* the specified width and height.
* @param width the width of the array of depth values
* @param height the height of the array of depth values
@@ -81,7 +81,7 @@ class DepthComponentFloatRetained extends DepthComponentRetained {
*/
final void retrieveDepth(float[] buf, int wRead, int hRead) {
int srcOffset, dstOffset, i;
-
+
// Yup -> Ydown
for (srcOffset = (hRead - 1) * wRead, dstOffset = 0,
i = 0; i < hRead; i++,
diff --git a/src/classes/share/javax/media/j3d/DepthComponentInt.java b/src/classes/share/javax/media/j3d/DepthComponentInt.java
index b1a8613..bf975cc 100644
--- a/src/classes/share/javax/media/j3d/DepthComponentInt.java
+++ b/src/classes/share/javax/media/j3d/DepthComponentInt.java
@@ -67,7 +67,7 @@ public class DepthComponentInt extends DepthComponent {
/**
* Copies the depth data from this object to the specified array.
- * The array must be large enough to hold all of the ints.
+ * The array must be large enough to hold all of the ints.
* @param depthData array of ints that will receive a copy of
* the depth data
* @exception CapabilityNotSetException if appropriate capability is
@@ -91,7 +91,7 @@ public class DepthComponentInt extends DepthComponent {
/**
- * @deprecated replaced with cloneNodeComponent(boolean forceDuplicate)
+ * @deprecated replaced with cloneNodeComponent(boolean forceDuplicate)
*/
public NodeComponent cloneNodeComponent() {
DepthComponentIntRetained rt = (DepthComponentIntRetained) retained;
@@ -101,13 +101,13 @@ public class DepthComponentInt extends DepthComponent {
return d;
}
-
+
/**
* Copies all node information from originalNodeComponent
into
* the current node. This method is called from the
* duplicateNode
method. This routine does
* the actual duplication of all "local data" (any data defined in
- * this object).
+ * this object).
*
* @param originalNodeComponent the original node to duplicate.
* @param forceDuplicate when set to true
, causes the
@@ -120,9 +120,9 @@ public class DepthComponentInt extends DepthComponent {
* @see NodeComponent#setDuplicateOnCloneTree
*/
void duplicateAttributes(NodeComponent originalNodeComponent,
- boolean forceDuplicate) {
+ boolean forceDuplicate) {
super.duplicateAttributes(originalNodeComponent, forceDuplicate);
-
+
// width, height is copied in cloneNode before
int len = getWidth()*getHeight();
int d[] = new int[len];
diff --git a/src/classes/share/javax/media/j3d/DepthComponentIntRetained.java b/src/classes/share/javax/media/j3d/DepthComponentIntRetained.java
index d0b0586..0fcb254 100644
--- a/src/classes/share/javax/media/j3d/DepthComponentIntRetained.java
+++ b/src/classes/share/javax/media/j3d/DepthComponentIntRetained.java
@@ -71,7 +71,7 @@ class DepthComponentIntRetained extends DepthComponentRetained {
*/
void getDepthData(int[] depthData) {
int i;
-
+
for (i = 0; i < this.depthData.length; i++)
depthData[i] = this.depthData[i];
}
@@ -81,13 +81,13 @@ class DepthComponentIntRetained extends DepthComponentRetained {
*/
final void retrieveDepth(int[] buf, int wRead, int hRead) {
int srcOffset, dstOffset, i;
-
+
// Yup -> Ydown
for (srcOffset = (hRead - 1) * wRead, dstOffset = 0,
i = 0; i < hRead; i++,
srcOffset -= wRead, dstOffset += width) {
-
+
System.arraycopy(buf, srcOffset, depthData, dstOffset, wRead);
}
- }
+ }
}
diff --git a/src/classes/share/javax/media/j3d/DepthComponentNative.java b/src/classes/share/javax/media/j3d/DepthComponentNative.java
index 34cbb9f..4d5b05e 100644
--- a/src/classes/share/javax/media/j3d/DepthComponentNative.java
+++ b/src/classes/share/javax/media/j3d/DepthComponentNative.java
@@ -90,13 +90,13 @@ public class DepthComponentNative extends DepthComponent {
return d;
}
-
+
/**
* Copies all node information from originalNodeComponent
into
* the current node. This method is called from the
* duplicateNode
method. This routine does
* the actual duplication of all "local data" (any data defined in
- * this object).
+ * this object).
*
* @param originalNodeComponent the original node to duplicate.
* @param forceDuplicate when set to true
, causes the
@@ -110,9 +110,9 @@ public class DepthComponentNative extends DepthComponent {
* @see NodeComponent#setDuplicateOnCloneTree
*/
void duplicateAttributes(NodeComponent originalNodeComponent,
- boolean forceDuplicate) {
+ boolean forceDuplicate) {
super.duplicateAttributes(originalNodeComponent, forceDuplicate);
-
+
int originalData[] = ((DepthComponentNativeRetained)
originalNodeComponent.retained).depthData;
diff --git a/src/classes/share/javax/media/j3d/DepthComponentNativeRetained.java b/src/classes/share/javax/media/j3d/DepthComponentNativeRetained.java
index 3f7460a..aab53cf 100644
--- a/src/classes/share/javax/media/j3d/DepthComponentNativeRetained.java
+++ b/src/classes/share/javax/media/j3d/DepthComponentNativeRetained.java
@@ -49,9 +49,9 @@ class DepthComponentNativeRetained extends DepthComponentRetained {
*/
void initialize(int width, int height) {
type = DEPTH_COMPONENT_TYPE_NATIVE;
- depthData = new int[width * height];
- this.width = width;
- this.height = height;
+ depthData = new int[width * height];
+ this.width = width;
+ this.height = height;
}
/**
@@ -70,13 +70,13 @@ class DepthComponentNativeRetained extends DepthComponentRetained {
*/
final void retrieveDepth(int[] buf, int wRead, int hRead) {
int srcOffset, dstOffset, i;
-
+
// Yup -> Ydown
for (srcOffset = (hRead - 1) * wRead, dstOffset = 0,
i = 0; i < hRead; i++,
srcOffset -= wRead, dstOffset += width) {
-
+
System.arraycopy(buf, srcOffset, depthData, dstOffset, wRead);
}
- }
+ }
}
diff --git a/src/classes/share/javax/media/j3d/DirectionalLight.java b/src/classes/share/javax/media/j3d/DirectionalLight.java
index 382c08e..99def5d 100644
--- a/src/classes/share/javax/media/j3d/DirectionalLight.java
+++ b/src/classes/share/javax/media/j3d/DirectionalLight.java
@@ -38,7 +38,7 @@ import javax.vecmath.Vector3f;
* A DirectionalLight node defines an oriented light with an origin at
* infinity. It has the same attributes as a Light node, with the
* addition of a directional vector to specify the direction in which the
- * light shines. A directional light has parallel light rays that travel
+ * light shines. A directional light has parallel light rays that travel
* in one direction along the specified vector. Directional light contributes
* to diffuse and specular reflections, which in turn depend on the
* orientation of an object's surface but not its position. A directional
@@ -64,7 +64,7 @@ public class DirectionalLight extends Light {
private static final int[] readCapabilities = {
ALLOW_DIRECTION_READ
};
-
+
/**
* Constructs a DirectionalLight node with default parameters.
* The default values are as follows:
@@ -116,7 +116,7 @@ public class DirectionalLight extends Light {
this.retained = new DirectionalLightRetained();
this.retained.setSource(this);
}
-
+
/**
* Set light direction.
* @param direction the new direction
@@ -129,7 +129,7 @@ public class DirectionalLight extends Light {
throw new CapabilityNotSetException(
J3dI18N.getString("DirectionalLight0"));
- if (isLive())
+ if (isLive())
((DirectionalLightRetained)this.retained).setDirection(direction);
else
((DirectionalLightRetained)this.retained).initDirection(direction);
@@ -196,7 +196,7 @@ public class DirectionalLight extends Light {
* originalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
@@ -214,7 +214,7 @@ public class DirectionalLight extends Light {
*/
void duplicateAttributes(Node originalNode, boolean forceDuplicate) {
super.duplicateAttributes(originalNode, forceDuplicate);
-
+
Vector3f v = new Vector3f();
((DirectionalLightRetained) originalNode.retained).getDirection(v);
((DirectionalLightRetained) retained).initDirection(v);
diff --git a/src/classes/share/javax/media/j3d/DirectionalLightRetained.java b/src/classes/share/javax/media/j3d/DirectionalLightRetained.java
index 798d3c3..98bf8a4 100644
--- a/src/classes/share/javax/media/j3d/DirectionalLightRetained.java
+++ b/src/classes/share/javax/media/j3d/DirectionalLightRetained.java
@@ -142,8 +142,8 @@ class DirectionalLightRetained extends LightRetained
VirtualUniverse.mc.processMessage(createMessage);
}
-
- /**
+
+ /**
* This update function, and its native counterpart,
* updates a directional light. This includes its
* color and its transformed direction.
@@ -155,16 +155,16 @@ class DirectionalLightRetained extends LightRetained
int component = ((Integer)objs[1]).intValue();
Transform3D trans;
int numLgts = ((Integer)objs[2]).intValue();
-
- LightRetained[] mLgts = (LightRetained[]) objs[3];
+
+ LightRetained[] mLgts = (LightRetained[]) objs[3];
DirectionalLightRetained ml;
if ((component & DIRECTION_CHANGED) != 0) {
-
+
for (i = 0; i < numLgts; i++) {
if (mLgts[i].nodeType == NodeRetained.DIRECTIONALLIGHT) {
ml = (DirectionalLightRetained) mLgts[i];
ml.direction = (Vector3f)objs[4];
- ml.getLastLocalToVworld().transform(ml.direction,
+ ml.getLastLocalToVworld().transform(ml.direction,
ml.xformDirection);
ml.xformDirection.normalize();
}
@@ -176,7 +176,7 @@ class DirectionalLightRetained extends LightRetained
if (mLgts[i].nodeType == NodeRetained.DIRECTIONALLIGHT) {
ml = (DirectionalLightRetained) mLgts[i];
ml.direction = (Vector3f)((Object[])objs[4])[7];
- ml.getLastLocalToVworld().transform(ml.direction,
+ ml.getLastLocalToVworld().transform(ml.direction,
ml.xformDirection);
ml.xformDirection.normalize();
}
@@ -186,8 +186,8 @@ class DirectionalLightRetained extends LightRetained
super.updateMirrorObject(objs);
}
-
- void update(Context ctx, int lightSlot, double scale) {
+
+ void update(Context ctx, int lightSlot, double scale) {
Pipeline.getPipeline().updateDirectionalLight(ctx,
lightSlot, color.x, color.y, color.z,
xformDirection.x, xformDirection.y,
@@ -201,9 +201,9 @@ class DirectionalLightRetained extends LightRetained
dr.direction = new Vector3f(direction);
dr.xformDirection = new Vector3f(0.0f, 0.0f, -1.0f);
return dr;
- }
+ }
+
-
// Called on the mirror object
void updateTransformChange() {
super.updateTransformChange();
diff --git a/src/classes/share/javax/media/j3d/DisplayListRenderMethod.java b/src/classes/share/javax/media/j3d/DisplayListRenderMethod.java
index da7ac50..521ca23 100644
--- a/src/classes/share/javax/media/j3d/DisplayListRenderMethod.java
+++ b/src/classes/share/javax/media/j3d/DisplayListRenderMethod.java
@@ -54,35 +54,35 @@ class DisplayListRenderMethod implements RenderMethod {
public boolean render(RenderMolecule rm, Canvas3D cv,
RenderAtomListInfo ra,
int dirtyBits) {
-
- if (rm.doInfinite ||
+
+ if (rm.doInfinite ||
!VirtualUniverse.mc.viewFrustumCulling ||
rm.vwcBounds.intersect(cv.viewFrustum)) {
cv.updateState(dirtyBits);
cv.callDisplayList(cv.ctx, rm.displayListId,
rm.isNonUniformScale);
return true;
- }
+ }
return false;
}
- public boolean renderSeparateDlists(RenderMolecule rm,
+ public boolean renderSeparateDlists(RenderMolecule rm,
Canvas3D cv,
RenderAtomListInfo r, int dirtyBits) {
-
+
if (rm.doInfinite) {
cv.updateState(dirtyBits);
while (r != null) {
- cv.callDisplayList(cv.ctx,
+ cv.callDisplayList(cv.ctx,
((GeometryArrayRetained)r.geometry()).dlistId,
rm.isNonUniformScale);
r = r.next;
}
-
+
return true;
}
-
- boolean isVisible = false; // True if any of the RAs is visible.
+
+ boolean isVisible = false; // True if any of the RAs is visible.
while (r != null) {
if (cv.ra == r.renderAtom) {
if (cv.raIsVisible) {
@@ -97,7 +97,7 @@ class DisplayListRenderMethod implements RenderMethod {
if (r.renderAtom.localeVwcBounds.intersect(cv.viewFrustum)) {
cv.updateState(dirtyBits);
cv.raIsVisible = true;
- cv.callDisplayList(cv.ctx,
+ cv.callDisplayList(cv.ctx,
((GeometryArrayRetained)r.geometry()).dlistId,
rm.isNonUniformScale);
isVisible = true;
@@ -109,13 +109,13 @@ class DisplayListRenderMethod implements RenderMethod {
}
r = r.next;
}
-
+
return isVisible;
}
-
- public boolean renderSeparateDlistPerRinfo(RenderMolecule rm,
+
+ public boolean renderSeparateDlistPerRinfo(RenderMolecule rm,
Canvas3D cv,
RenderAtomListInfo r,
int dirtyBits) {
@@ -129,7 +129,7 @@ class DisplayListRenderMethod implements RenderMethod {
}
return true;
}
- boolean isVisible = false; // True if any of the RAs is visible.
+ boolean isVisible = false; // True if any of the RAs is visible.
while (r != null) {
if (cv.ra == r.renderAtom) {
if (cv.raIsVisible) {
@@ -155,11 +155,11 @@ class DisplayListRenderMethod implements RenderMethod {
r = r.next;
}
return isVisible;
-
+
}
-
+
void buildDisplayList(RenderMolecule rm, Canvas3D cv) {
RenderAtomListInfo ra;
@@ -182,10 +182,10 @@ class DisplayListRenderMethod implements RenderMethod {
staticTransform = null;
staticNormalTransform = null;
} else {
- staticTransform =
+ staticTransform =
ra.renderAtom.geometryAtom.source.staticTransform.transform;
if ((geo.vertexFormat & GeometryArray.NORMALS) != 0) {
- staticNormalTransform =
+ staticNormalTransform =
ra.renderAtom.geometryAtom.source.staticTransform.getNormalTransform();
} else {
staticNormalTransform = null;
@@ -204,12 +204,12 @@ class DisplayListRenderMethod implements RenderMethod {
}
}
- void buildIndividualDisplayList(RenderAtomListInfo ra, Canvas3D cv,
+ void buildIndividualDisplayList(RenderAtomListInfo ra, Canvas3D cv,
Context ctx) {
GeometryArrayRetained geo;
geo = (GeometryArrayRetained)ra.geometry();
- if ((geo.texCoordSetMap != null) &&
+ if ((geo.texCoordSetMap != null) &&
(geo.texCoordSetMap.length > cv.maxTexCoordSets)) {
return;
}
@@ -224,7 +224,7 @@ class DisplayListRenderMethod implements RenderMethod {
geo.buildGA(cv, ra.renderAtom, false,
false,
1.0f,
- false,
+ false,
null, null);
cv.endDisplayList(ctx);
}
@@ -236,7 +236,7 @@ class DisplayListRenderMethod implements RenderMethod {
Transform3D staticTransform;
Transform3D staticNormalTransform;
int id;
-
+
geo = (GeometryArrayRetained)ra.geometry();
if ((rm.primaryRenderAtomList != null) &&
(rm.texCoordSetMapLen <= cv.maxTexCoordSets)) {
@@ -248,10 +248,10 @@ class DisplayListRenderMethod implements RenderMethod {
staticTransform = null;
staticNormalTransform = null;
} else {
- staticTransform =
+ staticTransform =
ra.renderAtom.geometryAtom.source.staticTransform.transform;
if ((geo.vertexFormat & GeometryArray.NORMALS) != 0) {
- staticNormalTransform =
+ staticNormalTransform =
ra.renderAtom.geometryAtom.source.staticTransform.getNormalTransform();
} else {
staticNormalTransform = null;
@@ -269,5 +269,5 @@ class DisplayListRenderMethod implements RenderMethod {
}
}
-
+
}
diff --git a/src/classes/share/javax/media/j3d/DistanceLOD.java b/src/classes/share/javax/media/j3d/DistanceLOD.java
index cd193b5..59ecb9e 100644
--- a/src/classes/share/javax/media/j3d/DistanceLOD.java
+++ b/src/classes/share/javax/media/j3d/DistanceLOD.java
@@ -70,7 +70,7 @@ public class DistanceLOD extends LOD {
/**
* Constructs and initializes a DistanceLOD node with default values.
- * Note that the default constructor creates a DistanceLOD object with
+ * Note that the default constructor creates a DistanceLOD object with
* a single distance value set to 0.0 and is, therefore, not useful.
*/
public DistanceLOD() {
@@ -169,7 +169,7 @@ public class DistanceLOD extends LOD {
*/
public void initialize() {
// Insert wakeup condition into queue
- wakeupOn(wakeupFrame);
+ wakeupOn(wakeupFrame);
}
/**
@@ -183,7 +183,7 @@ public class DistanceLOD extends LOD {
// compute distance in virtual world
View v = this.getView();
if( v == null ) {
- wakeupOn(wakeupFrame);
+ wakeupOn(wakeupFrame);
return;
}
@@ -195,41 +195,41 @@ public class DistanceLOD extends LOD {
// Handle stimulus
double viewDistance = 0.0;
int nSwitches,i,index=0;
-
- Transform3D localToWorldTrans = new Transform3D();
-
+
+ Transform3D localToWorldTrans = new Transform3D();
+
localToWorldTrans.set(((NodeRetained)this.retained).getCurrentLocalToVworld());
-
-
- // DistanceLOD's location in virutal world
- localToWorldTrans.transform( position, center);
-
-
+
+
+ // DistanceLOD's location in virutal world
+ localToWorldTrans.transform( position, center);
+
+
viewPosition.x = (float)((ViewPlatformRetained)vp.retained).schedSphere.center.x;
viewPosition.y = (float)((ViewPlatformRetained)vp.retained).schedSphere.center.y;
viewPosition.z = (float)((ViewPlatformRetained)vp.retained).schedSphere.center.z;
viewDistance = center.distance( viewPosition);
-
+
// convert distance into local coordinates
viewDistance = viewDistance/localToWorldTrans.getDistanceScale();
-
+
nSwitches = numSwitches();
-
+
index = distances.length; // viewDistance > distances[n-1]
-
+
if( viewDistance <= distances[0] ) {
index = 0;
} else {
for (i=1; i < distances.length; i++) {
- if ((viewDistance > distances[i-1]) &&
+ if ((viewDistance > distances[i-1]) &&
(viewDistance <= distances[i])) {
index = i;
break;
}
}
}
-
+
for(i=nSwitches-1; i>=0; i--) {
Switch sw = getSwitch(i);
// Optimize, this behavior is passive
@@ -240,8 +240,8 @@ public class DistanceLOD extends LOD {
}
}
// Insert wakeup condition into queue
- wakeupOn(wakeupFrame);
-
+ wakeupOn(wakeupFrame);
+
}
/**
@@ -270,7 +270,7 @@ public class DistanceLOD extends LOD {
* originalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
diff --git a/src/classes/share/javax/media/j3d/DrawingSurfaceObjectAWT.java b/src/classes/share/javax/media/j3d/DrawingSurfaceObjectAWT.java
index 9047b2d..4197da2 100644
--- a/src/classes/share/javax/media/j3d/DrawingSurfaceObjectAWT.java
+++ b/src/classes/share/javax/media/j3d/DrawingSurfaceObjectAWT.java
@@ -34,12 +34,12 @@ package javax.media.j3d;
import java.awt.Point;
/**
- * The DrawingSurfaceObject class is used to manage native drawing surface
+ * The DrawingSurfaceObject class is used to manage native drawing surface
*/
class DrawingSurfaceObjectAWT extends DrawingSurfaceObject {
- // drawing surface
+ // drawing surface
private long nativeDS = 0;
private long dsi = 0;
@@ -81,7 +81,7 @@ class DrawingSurfaceObjectAWT extends DrawingSurfaceObject {
if (nativeDS == 0) {
return false;
} else {
- if (lockAWT(nativeDS)) {
+ if (lockAWT(nativeDS)) {
gotDsiLock = true;
return true;
} else {
@@ -104,12 +104,12 @@ class DrawingSurfaceObjectAWT extends DrawingSurfaceObject {
gotDsiLock = false;
if (doLastUnlock) {
nativeDS = 0;
- dsi = 0;
+ dsi = 0;
doLastUnlock = false;
}
}
} else {
- unlockGlobal(nativeAWT);
+ unlockGlobal(nativeAWT);
gotDsiLock = false;
}
}
@@ -166,5 +166,5 @@ class DrawingSurfaceObjectAWT extends DrawingSurfaceObject {
long getDS() {
return nativeDS;
}
-
+
}
diff --git a/src/classes/share/javax/media/j3d/EnvironmentSet.java b/src/classes/share/javax/media/j3d/EnvironmentSet.java
index ff8ffa2..4e495b8 100644
--- a/src/classes/share/javax/media/j3d/EnvironmentSet.java
+++ b/src/classes/share/javax/media/j3d/EnvironmentSet.java
@@ -62,7 +62,7 @@ class EnvironmentSet extends Object implements ObjectUpdate{
/**
- * The arraylist of ambient lights in this env list
+ * The arraylist of ambient lights in this env list
*/
ArrayList ambLights = new ArrayList();
@@ -111,7 +111,7 @@ class EnvironmentSet extends Object implements ObjectUpdate{
EnvironmentSet next = null;
EnvironmentSet prev = null;
- /**
+ /**
* List of attrributeBins to be added next Frame
*/
ArrayList addAttributeBins = new ArrayList();
@@ -137,13 +137,13 @@ class EnvironmentSet extends Object implements ObjectUpdate{
*/
AttributeBin attributeBinList = null;
- EnvironmentSet(RenderAtom ra, LightRetained[] lightList, FogRetained fog,
+ EnvironmentSet(RenderAtom ra, LightRetained[] lightList, FogRetained fog,
ModelClipRetained modelClip, RenderBin rb) {
renderBin = rb;
reset(ra, lightList, fog, modelClip);
}
- private void reset(RenderAtom ra, LightRetained[] lightList, FogRetained fog,
+ private void reset(RenderAtom ra, LightRetained[] lightList, FogRetained fog,
ModelClipRetained modelClip) {
int i;
LightRetained light;
@@ -187,7 +187,7 @@ class EnvironmentSet extends Object implements ObjectUpdate{
enableMCMaskCache = 0;
if (modelClip != null) {
for (i = 0; i < 6; i++) {
- if (modelClip.enables[i])
+ if (modelClip.enables[i])
enableMCMaskCache |= 1 << i;
}
enableMCMask = enableMCMaskCache;
@@ -204,11 +204,11 @@ class EnvironmentSet extends Object implements ObjectUpdate{
lightList[i].environmentSets.add(this);
}
}
-
+
if (fog != null) {
fog.environmentSets.add(this);
}
-
+
if (modelClip != null) {
modelClip.environmentSets.add(this);
}
@@ -217,7 +217,7 @@ class EnvironmentSet extends Object implements ObjectUpdate{
/**
* This tests if the qiven lights and fog match this EnviornmentSet
*/
- boolean equals(RenderAtom ra, LightRetained[] lights, FogRetained fog,
+ boolean equals(RenderAtom ra, LightRetained[] lights, FogRetained fog,
ModelClipRetained modelClip) {
int i;
@@ -334,13 +334,13 @@ class EnvironmentSet extends Object implements ObjectUpdate{
if ((canvasDirty & Canvas3D.AMBIENTLIGHT_DIRTY) != 0) {
updateSceneAmbient();
- }
+ }
- if ((canvasDirty & Canvas3D.LIGHTENABLES_DIRTY) != 0) {
+ if ((canvasDirty & Canvas3D.LIGHTENABLES_DIRTY) != 0) {
enableMask = enableMaskCache;
}
- if ((canvasDirty & Canvas3D.MODELCLIP_DIRTY) != 0) {
+ if ((canvasDirty & Canvas3D.MODELCLIP_DIRTY) != 0) {
enableMCMask = enableMCMaskCache;
}
@@ -413,7 +413,7 @@ class EnvironmentSet extends Object implements ObjectUpdate{
}
}
- void updateSceneAmbient()
+ void updateSceneAmbient()
{
int i;
sceneAmbient.x = 0.0f;
@@ -481,35 +481,35 @@ class EnvironmentSet extends Object implements ObjectUpdate{
if (cv.modelClip != modelClip) {
updateModelClip = true;
}
- }
+ }
// Check for dirtybit.
- if ((cv.canvasDirty & (Canvas3D.LIGHTENABLES_DIRTY|
+ if ((cv.canvasDirty & (Canvas3D.LIGHTENABLES_DIRTY|
Canvas3D.AMBIENTLIGHT_DIRTY|
Canvas3D.FOG_DIRTY|
Canvas3D.MODELCLIP_DIRTY|
Canvas3D.VIEW_MATRIX_DIRTY)) != 0) {
-
+
if ((cv.canvasDirty & Canvas3D.LIGHTENABLES_DIRTY) != 0) {
updateLightEnables = true;
}
-
+
if ((cv.canvasDirty & Canvas3D.AMBIENTLIGHT_DIRTY) != 0) {
updateSceneAmbient = true;
}
-
+
if ((cv.canvasDirty & Canvas3D.FOG_DIRTY) != 0) {
updateFog = true;
}
-
+
if ((cv.canvasDirty & Canvas3D.MODELCLIP_DIRTY) != 0) {
updateModelClip = true;
}
- if ((cv.canvasDirty & Canvas3D.VIEW_MATRIX_DIRTY) != 0) {
+ if ((cv.canvasDirty & Canvas3D.VIEW_MATRIX_DIRTY) != 0) {
updateFog = true;
updateModelClip = true;
- }
+ }
}
// do states update here.
@@ -550,8 +550,8 @@ class EnvironmentSet extends Object implements ObjectUpdate{
Canvas3D.FOG_DIRTY |
Canvas3D.MODELCLIP_DIRTY |
Canvas3D.VIEW_MATRIX_DIRTY);
-
+
cv.environmentSet = this;
-
+
}
}
diff --git a/src/classes/share/javax/media/j3d/EventCatcher.java b/src/classes/share/javax/media/j3d/EventCatcher.java
index 6d5daea..86b26dd 100644
--- a/src/classes/share/javax/media/j3d/EventCatcher.java
+++ b/src/classes/share/javax/media/j3d/EventCatcher.java
@@ -106,8 +106,8 @@ class EventCatcher extends Object implements ComponentListener, FocusListener,
}
}
}
-
-
+
+
void enableMouseEvents() {
if (!mouseEvents) {
@@ -236,7 +236,7 @@ class EventCatcher extends Object implements ComponentListener, FocusListener,
canvas.sendEventToBehaviorScheduler(e);
if (VirtualUniverse.mc.isD3D() &&
- e.isAltDown() &&
+ e.isAltDown() &&
(e.getKeyCode() == KeyEvent.VK_ENTER)) {
canvas.notifyD3DPeer(Canvas3D.TOGGLEFULLSCREEN);
}
@@ -290,7 +290,7 @@ class EventCatcher extends Object implements ComponentListener, FocusListener,
}
public void mouseExited(MouseEvent e) {
- if (mouseEvents)
+ if (mouseEvents)
canvas.sendEventToBehaviorScheduler(e);
if (DEBUG) {
System.err.println(e);
@@ -314,7 +314,7 @@ class EventCatcher extends Object implements ComponentListener, FocusListener,
}
public void mouseDragged(MouseEvent e) {
- // Note : We don't have to test for mouseMotionEvent here because
+ // Note : We don't have to test for mouseMotionEvent here because
// this routine will never be called unless mouseMotionEvent is enabled.
canvas.sendEventToBehaviorScheduler(e);
if (DEBUG) {
@@ -323,16 +323,16 @@ class EventCatcher extends Object implements ComponentListener, FocusListener,
}
public void mouseMoved(MouseEvent e) {
- // Note : We don't have to test for mouseMotionEvent here because
+ // Note : We don't have to test for mouseMotionEvent here because
// this routine will never be called unless mouseMotionEvent is enabled.
canvas.sendEventToBehaviorScheduler(e);
if (DEBUG) {
System.err.println(e);
}
}
-
+
public void mouseWheelMoved(MouseWheelEvent e) {
- // Note : We don't have to test for mouseWheelEvent here because
+ // Note : We don't have to test for mouseWheelEvent here because
// this routine will never be called unless mouseWheelEvent is enabled.
canvas.sendEventToBehaviorScheduler(e);
if (DEBUG) {
@@ -402,16 +402,16 @@ class EventCatcher extends Object implements ComponentListener, FocusListener,
canvas.sendEventToBehaviorScheduler(e);
canvas.evaluateVisiblilty();
}
-
+
void reset() {
focusEvents = false;
keyEvents = false;
mouseEvents = false;
mouseMotionEvents = false;
mouseWheelEvents = false;
- mouseListenerAdded = false;
+ mouseListenerAdded = false;
stopped = false;
}
-
+
}
diff --git a/src/classes/share/javax/media/j3d/ExponentialFog.java b/src/classes/share/javax/media/j3d/ExponentialFog.java
index 27d0a60..f56d58b 100644
--- a/src/classes/share/javax/media/j3d/ExponentialFog.java
+++ b/src/classes/share/javax/media/j3d/ExponentialFog.java
@@ -45,7 +45,7 @@ import javax.vecmath.Color3f;
* where
* z is the distance from the viewpoint.
* density is the density of the fog.originalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
diff --git a/src/classes/share/javax/media/j3d/ExponentialFogRetained.java b/src/classes/share/javax/media/j3d/ExponentialFogRetained.java
index 77d179f..3588451 100644
--- a/src/classes/share/javax/media/j3d/ExponentialFogRetained.java
+++ b/src/classes/share/javax/media/j3d/ExponentialFogRetained.java
@@ -86,7 +86,7 @@ class ExponentialFogRetained extends FogRetained {
void setLive(SetLiveState s) {
super.setLive(s);
GroupRetained group;
-
+
// Initialize the mirror object, this needs to be done, when
// renderBin is not accessing any of the fields
J3dMessage createMessage = new J3dMessage();
@@ -116,14 +116,14 @@ class ExponentialFogRetained extends FogRetained {
obj[2] = (inBackgroundGroup? Boolean.TRUE:Boolean.FALSE);
obj[3] = geometryBackground;
obj[4] = new Float(density);
-
+
createMessage.args[4] = obj;
VirtualUniverse.mc.processMessage(createMessage);
}
-
-
- /**
+
+
+ /**
* This method and its native counterpart update the native context
* fog values.
*/
@@ -148,22 +148,22 @@ class ExponentialFogRetained extends FogRetained {
if ((component & INIT_MIRROR) != 0) {
((ExponentialFogRetained)mirrorFog).density = ((Float)((Object[])objs[4])[4]).floatValue();
-
+
}
// Issue 144: store the local to vworld scale used to transform the density
- ((ExponentialFogRetained)mirrorFog).setLocalToVworldScale(getLastLocalToVworld().getDistanceScale());
+ ((ExponentialFogRetained)mirrorFog).setLocalToVworldScale(getLastLocalToVworld().getDistanceScale());
super.updateMirrorObject(objs);
}
- // Clone the retained side only, internal use only
+ // Clone the retained side only, internal use only
protected Object clone() {
ExponentialFogRetained efr =
(ExponentialFogRetained)super.clone();
-
+
efr.initDensity(getDensity());
-
+
return efr;
}
diff --git a/src/classes/share/javax/media/j3d/Fog.java b/src/classes/share/javax/media/j3d/Fog.java
index 06f1a42..e4df45c 100644
--- a/src/classes/share/javax/media/j3d/Fog.java
+++ b/src/classes/share/javax/media/j3d/Fog.java
@@ -100,9 +100,9 @@ public abstract class Fog extends Leaf {
private static final int[] readCapabilities = {
ALLOW_INFLUENCING_BOUNDS_READ,
ALLOW_COLOR_READ,
- ALLOW_SCOPE_READ
+ ALLOW_SCOPE_READ
};
-
+
/**
* Constructs a Fog node with default parameters. The default
* values are as follows:
@@ -154,7 +154,7 @@ public abstract class Fog extends Leaf {
if(!this.getCapability(ALLOW_COLOR_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("Fog0"));
- if (isLive())
+ if (isLive())
((FogRetained)this.retained).setColor(color);
else
((FogRetained)this.retained).initColor(color);
@@ -173,7 +173,7 @@ public abstract class Fog extends Leaf {
if(!this.getCapability(ALLOW_COLOR_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("Fog0"));
- if (isLive())
+ if (isLive())
((FogRetained)this.retained).setColor(r, g, b);
else
((FogRetained)this.retained).initColor(r, g, b);
@@ -199,25 +199,25 @@ public abstract class Fog extends Leaf {
* @param region the bounds that contains the Fog's new influencing region.
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public void setInfluencingBounds(Bounds region) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_INFLUENCING_BOUNDS_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("Fog3"));
- if (isLive())
+ if (isLive())
((FogRetained)this.retained).setInfluencingBounds(region);
else
((FogRetained)this.retained).initInfluencingBounds(region);
}
- /**
+ /**
* Retrieves the Fog node's influencing bounds.
* @return this Fog's influencing bounds information
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public Bounds getInfluencingBounds() {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_INFLUENCING_BOUNDS_READ))
@@ -234,7 +234,7 @@ public abstract class Fog extends Leaf {
* node's new influencing region.
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public void setInfluencingBoundingLeaf(BoundingLeaf region) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_INFLUENCING_BOUNDS_WRITE))
@@ -246,12 +246,12 @@ public abstract class Fog extends Leaf {
((FogRetained)this.retained).initInfluencingBoundingLeaf(region);
}
- /**
+ /**
* Retrieves the Fog node's influencing bounding leaf.
* @return this Fog's influencing bounding leaf information
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public BoundingLeaf getInfluencingBoundingLeaf() {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_INFLUENCING_BOUNDS_READ))
@@ -279,7 +279,7 @@ public abstract class Fog extends Leaf {
if(!this.getCapability(ALLOW_SCOPE_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("Fog7"));
-
+
if (isLive())
((FogRetained)this.retained).setScope(scope, index);
else
@@ -350,7 +350,7 @@ public abstract class Fog extends Leaf {
else
((FogRetained)this.retained).initRemoveScope(index);
}
-
+
/**
* Returns an enumeration of this Fog node's list of scopes.
@@ -390,7 +390,7 @@ public abstract class Fog extends Leaf {
((FogRetained)this.retained).initAddScope(scope);
}
-
+
/**
* Returns the number of nodes in this Fog node's list of scopes.
* If this number is 0, then the list of scopes is empty and this
@@ -487,7 +487,7 @@ public abstract class Fog extends Leaf {
* originalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
@@ -519,7 +519,7 @@ public abstract class Fog extends Leaf {
// this reference will set correctly in updateNodeReferences() callback
rt.initAddScope((Group) elm.nextElement());
}
-
+
// this reference will set correctly in updateNodeReferences() callback
rt.initInfluencingBoundingLeaf(attr.getInfluencingBoundingLeaf());
}
@@ -553,7 +553,7 @@ public abstract class Fog extends Leaf {
FogRetained rt = (FogRetained) retained;
BoundingLeaf bl = rt.getInfluencingBoundingLeaf();
-
+
if (bl != null) {
Object o = referenceTable.getNewObjectReference(bl);
rt.initInfluencingBoundingLeaf((BoundingLeaf) o);
diff --git a/src/classes/share/javax/media/j3d/FogRetained.java b/src/classes/share/javax/media/j3d/FogRetained.java
index 01d5b54..a8b83e5 100644
--- a/src/classes/share/javax/media/j3d/FogRetained.java
+++ b/src/classes/share/javax/media/j3d/FogRetained.java
@@ -57,10 +57,10 @@ abstract class FogRetained extends LeafRetained{
/**
* The Boundary object defining the lights's region of influence.
- */
+ */
Bounds regionOfInfluence = null;
- /**
+ /**
* The bounding leaf reference
*/
BoundingLeafRetained boundingLeaf = null;
@@ -70,7 +70,7 @@ abstract class FogRetained extends LeafRetained{
*/
Vector scopes = new Vector();
- // An int that is set when this fog is changed
+ // An int that is set when this fog is changed
int isDirty = 0xffff;
// This is true when this fog is referenced in an immediate mode context
@@ -81,7 +81,7 @@ abstract class FogRetained extends LeafRetained{
*/
Bounds region = null;
- // A reference to the scene graph fog
+ // A reference to the scene graph fog
FogRetained sgFog = null;
// The mirror copy of this fog
@@ -95,7 +95,7 @@ abstract class FogRetained extends LeafRetained{
boolean isScoped = false;
// The object that contains the dynamic HashKey - a string type object
- // Used in scoping
+ // Used in scoping
HashKey tempKey = new HashKey(250);
/**
@@ -157,7 +157,7 @@ abstract class FogRetained extends LeafRetained{
/**
* Set the Fog's region of influence.
- */
+ */
void initInfluencingBounds(Bounds region) {
if (region != null) {
this.regionOfInfluence = (Bounds) region.clone();
@@ -171,16 +171,16 @@ abstract class FogRetained extends LeafRetained{
/**
* Set the Fog's region of influence and send message
- */
+ */
void setInfluencingBounds(Bounds region) {
initInfluencingBounds(region);
- sendMessage(BOUNDS_CHANGED,
+ sendMessage(BOUNDS_CHANGED,
(region != null ? region.clone() : null));
}
- /**
+ /**
* Get the Fog's region of Influence.
- */
+ */
Bounds getInfluencingBounds() {
Bounds b = null;
if (regionOfInfluence != null) {
@@ -195,7 +195,7 @@ abstract class FogRetained extends LeafRetained{
/**
* Set the Fog's region of influence to the specified Leaf node.
- */
+ */
void initInfluencingBoundingLeaf(BoundingLeaf region) {
if (region != null) {
boundingLeaf = (BoundingLeafRetained)region.retained;
@@ -206,7 +206,7 @@ abstract class FogRetained extends LeafRetained{
/**
* Set the Fog's region of influence to the specified Leaf node.
- */
+ */
void setInfluencingBoundingLeaf(BoundingLeaf region) {
if (boundingLeaf != null)
boundingLeaf.mirrorBoundingLeaf.removeUser(mirrorFog);
@@ -216,17 +216,17 @@ abstract class FogRetained extends LeafRetained{
} else {
boundingLeaf = null;
}
- sendMessage(BOUNDINGLEAF_CHANGED,
- (boundingLeaf != null ?
+ sendMessage(BOUNDINGLEAF_CHANGED,
+ (boundingLeaf != null ?
boundingLeaf.mirrorBoundingLeaf : null));
}
- /**
+ /**
* Get the Fog's region of influence.
- */
+ */
BoundingLeaf getInfluencingBoundingLeaf() {
- return (boundingLeaf != null ?
+ return (boundingLeaf != null ?
(BoundingLeaf)boundingLeaf.source : null);
}
@@ -252,7 +252,7 @@ abstract class FogRetained extends LeafRetained{
GroupRetained group;
Object[] scopeInfo = new Object[3];
-
+
group = (GroupRetained) scopes.get(index);
tempKey.reset();
group.removeAllNodesForScopedFog(mirrorFog, removeScopeList, tempKey);
@@ -270,7 +270,7 @@ abstract class FogRetained extends LeafRetained{
scopeInfo[2] = (scopes.size() > 0 ? Boolean.TRUE:Boolean.FALSE);
sendMessage(SCOPE_CHANGED, scopeInfo);
}
-
+
/**
* Inserts the specified scope at specified index.before the
* fog is live
@@ -302,7 +302,7 @@ abstract class FogRetained extends LeafRetained{
scopeInfo[2] = (scopes.size() > 0 ? Boolean.TRUE: Boolean.FALSE);
sendMessage(SCOPE_CHANGED, scopeInfo);
}
-
+
void initRemoveScope(int index) {
GroupRetained group = (GroupRetained)scopes.elementAt(index);
@@ -327,7 +327,7 @@ abstract class FogRetained extends LeafRetained{
sendMessage(SCOPE_CHANGED, scopeInfo);
}
-
+
/**
* Returns the scope specified by the index.
* @param index which scope to return
@@ -336,11 +336,11 @@ abstract class FogRetained extends LeafRetained{
Group getScope(int index) {
return (Group)(((GroupRetained)(scopes.elementAt(index))).source);
}
-
+
/**
* Returns an enumeration object of the scoperen.
* @return an enumeration object of the scoperen
- */
+ */
Enumeration getAllScopes() {
Enumeration elm = scopes.elements();
Vector v = new Vector(scopes.size());
@@ -379,7 +379,7 @@ abstract class FogRetained extends LeafRetained{
scopeInfo[2] = (scopes.size() > 0 ? Boolean.TRUE: Boolean.FALSE);
sendMessage(SCOPE_CHANGED, scopeInfo);
}
-
+
/**
* Returns a count of this nodes' scopes.
* @return the number of scopes descendant from this node
@@ -388,7 +388,7 @@ abstract class FogRetained extends LeafRetained{
return scopes.size();
}
- /**
+ /**
* Returns the index of the specified scope within this nodes' list of scopes
* @param scope whose index is desired
* @return index of specified scope
@@ -400,7 +400,7 @@ abstract class FogRetained extends LeafRetained{
return scopes.indexOf(null);
}
- /**
+ /**
* Removes the specified scope from this nodes' list of scopes
* @param scope to be removed. If the scope is not found,
* the method returns silently
@@ -415,11 +415,11 @@ abstract class FogRetained extends LeafRetained{
int i = indexOfScope(scope);
if(i >= 0)
initRemoveScope(i);
- }
+ }
- /**
+ /**
* Removes all the scopes from this node's list of scopes.
- * The node should revert to universal
+ * The node should revert to universal
* scope after this method returns
*/
void removeAllScopes() {
@@ -439,13 +439,13 @@ abstract class FogRetained extends LeafRetained{
scopeInfo[2] = Boolean.FALSE;
sendMessage(SCOPE_CHANGED, scopeInfo);
}
-
+
/**
* Removes all scopes from this node
*/
void initRemoveAllScopes() {
int n = scopes.size();
- for(int index = n-1; index >= 0; index--)
+ for(int index = n-1; index >= 0; index--)
initRemoveScope(index);
}
@@ -455,7 +455,7 @@ abstract class FogRetained extends LeafRetained{
void setInImmCtx(boolean inCtx) {
inImmCtx = inCtx;
}
-
+
/**
* This gets the immedate mode context flag
*/
@@ -500,7 +500,7 @@ abstract class FogRetained extends LeafRetained{
if (objs[2] != null) {
mirrorFog.region = (Bounds)mirrorFog.boundingLeaf.transformedRegion;
}
- else {
+ else {
if (mirrorFog.regionOfInfluence != null) {
mirrorFog.region = ((Bounds)mirrorFog.regionOfInfluence).copy(mirrorFog.region);
mirrorFog.region.transform(
@@ -510,7 +510,7 @@ abstract class FogRetained extends LeafRetained{
else {
mirrorFog.region = null;
}
-
+
}
}
else if ((component & SCOPE_CHANGED) != 0) {
@@ -518,7 +518,7 @@ abstract class FogRetained extends LeafRetained{
ArrayList addList = (ArrayList)scopeList[0];
ArrayList removeList = (ArrayList)scopeList[1];
boolean isScoped = ((Boolean)scopeList[2]).booleanValue();
-
+
if (addList != null) {
mirrorFog.isScoped = isScoped;
for (i = 0; i < addList.size(); i++) {
@@ -526,7 +526,7 @@ abstract class FogRetained extends LeafRetained{
obj.addFog(mirrorFog);
}
}
-
+
if (removeList != null) {
mirrorFog.isScoped = isScoped;
for (i = 0; i < removeList.size(); i++) {
@@ -557,7 +557,7 @@ abstract class FogRetained extends LeafRetained{
/**
* Note: This routine will only be called on
* the mirror object - will update the object's
- * cached region and transformed region
+ * cached region and transformed region
*/
void updateBoundingLeaf() {
if (boundingLeaf != null && boundingLeaf.switchState.currentSwitchOn) {
@@ -565,7 +565,7 @@ abstract class FogRetained extends LeafRetained{
} else {
if (regionOfInfluence != null) {
region = regionOfInfluence.copy(region);
- region.transform(regionOfInfluence,
+ region.transform(regionOfInfluence,
getCurrentLocalToVworld());
} else {
region = null;
@@ -594,7 +594,7 @@ abstract class FogRetained extends LeafRetained{
IllegalSharingException(J3dI18N.getString("FogRetained1"));
}
-
+
// Create the mirror object
// Initialization of the mirror object during the INSERT_NODE
// message (in updateMirrorObject)
@@ -613,7 +613,7 @@ abstract class FogRetained extends LeafRetained{
if (boundingLeaf != null) {
boundingLeaf.mirrorBoundingLeaf.addUser(mirrorFog);
}
-
+
if ((s.viewScopedNodeList != null) && (s.viewLists != null)) {
s.viewScopedNodeList.add(mirrorFog);
s.scopedNodesViewList.add(s.viewLists.get(0));
@@ -668,7 +668,7 @@ abstract class FogRetained extends LeafRetained{
mirrorFog.boundingLeaf = null;
mirrorFog.region = null;
}
-
+
if (bnds != null) {
mirrorFog.regionOfInfluence = bnds;
if (mirrorFog.region == null) {
@@ -687,18 +687,18 @@ abstract class FogRetained extends LeafRetained{
Shape3DRetained shape;
ArrayList shapeList = (ArrayList)args[2];
ArrayList removeScopeList = new ArrayList();
-
+
for (int i = 0; i < shapeList.size(); i++) {
shape = ((GeometryAtom)shapeList.get(i)).source;
shape.removeFog(mirrorFog);
- }
- mirrorFog.isScoped = false;
+ }
+ mirrorFog.isScoped = false;
}
-
+
/**
* This clearLive routine first calls the superclass's method, then
@@ -717,10 +717,10 @@ abstract class FogRetained extends LeafRetained{
s.notifyThreads |= J3dThread.UPDATE_RENDERING_ENVIRONMENT|
J3dThread.UPDATE_RENDER;
- // Remove this mirror light as users of the bounding leaf
+ // Remove this mirror light as users of the bounding leaf
if (mirrorFog.boundingLeaf != null)
mirrorFog.boundingLeaf.removeUser(mirrorFog);
-
+
if ((s.viewScopedNodeList != null) && (s.viewLists != null)) {
s.viewScopedNodeList.add(mirrorFog);
s.scopedNodesViewList.add(s.viewLists.get(0));
@@ -751,7 +751,7 @@ abstract class FogRetained extends LeafRetained{
}
}
- // Clone the retained side only, internal use only
+ // Clone the retained side only, internal use only
protected Object clone() {
FogRetained fr = (FogRetained)super.clone();
@@ -760,7 +760,7 @@ abstract class FogRetained extends LeafRetained{
if (b != null) {
fr.initInfluencingBounds(b);
}
-
+
fr.scopes = new Vector();
fr.isDirty = 0xffff;
fr.inImmCtx = false;
@@ -785,10 +785,10 @@ abstract class FogRetained extends LeafRetained{
region.transform(regionOfInfluence,
sgFog.getCurrentLocalToVworld());
}
-
+
}
}
-
+
final void sendMessage(int attrMask, Object attr) {
J3dMessage createMessage = new J3dMessage();
createMessage.threads = targetThreads;
@@ -798,7 +798,7 @@ abstract class FogRetained extends LeafRetained{
createMessage.args[1]= new Integer(attrMask);
createMessage.args[2] = attr;
VirtualUniverse.mc.processMessage(createMessage);
- }
+ }
void mergeTransform(TransformGroupRetained xform) {
super.mergeTransform(xform);
diff --git a/src/classes/share/javax/media/j3d/Font3D.java b/src/classes/share/javax/media/j3d/Font3D.java
index ce88f0b..d7372e1 100644
--- a/src/classes/share/javax/media/j3d/Font3D.java
+++ b/src/classes/share/javax/media/j3d/Font3D.java
@@ -181,7 +181,7 @@ public class Font3D extends NodeComponent {
GlyphVector gVec = font.createGlyphVector(frc, gCodes);
Rectangle2D.Float bounds2d = (Rectangle2D.Float)
(((GlyphMetrics)(gVec.getGlyphMetrics(0))).getBounds2D());
-
+
Point3d lower = new Point3d(bounds2d.x, bounds2d.y, 0.0);
Point3d upper;
if (fontExtrusion != null) {
@@ -223,7 +223,7 @@ public class Font3D extends NodeComponent {
// create a correctly sized TriangleArray
TriangleArray ga = new TriangleArray(glyph_gar.getVertexCount(),glyph_gar.getVertexFormat());
-
+
// temp storage for coords, normals
float tmp[] = new float[3];
@@ -267,7 +267,7 @@ public class Font3D extends NodeComponent {
FastVector contours = new FastVector(10);
float maxY = -Float.MAX_VALUE;
int maxYIndex = 0, beginIdx = 0, endIdx = 0, start = 0;
-
+
boolean setMaxY = false;
@@ -330,10 +330,10 @@ public class Font3D extends NodeComponent {
coords.add(vertex);
num++;
numPoints++;
- }
+ }
pIt.next();
}
-
+
// No data(e.g space, control characters)
// Two point can't form a valid contour
if (numPoints == 0){
@@ -351,13 +351,13 @@ public class Font3D extends NodeComponent {
// must be true unless it is a single line
// define as "MoveTo p1 LineTo p2 Close" which is
// not a valid font definition.
-
+
if (maxYIndex == beginIdx) {
- p1.set(vertices[endIdx]);
+ p1.set(vertices[endIdx]);
} else {
- p1.set(vertices[maxYIndex-1]);
+ p1.set(vertices[maxYIndex-1]);
}
- p2.set(vertices[maxYIndex]);
+ p2.set(vertices[maxYIndex]);
if (maxYIndex == endIdx) {
p3.set(vertices[beginIdx]);
} else {
@@ -374,7 +374,7 @@ public class Font3D extends NodeComponent {
flip_side_orient = (p2.x > p1.x);
}
} else {
- flip_side_orient = (p3.x > p2.x);
+ flip_side_orient = (p3.x > p2.x);
}
} else {
// p1.x != p2.x, otherwise all three
@@ -395,9 +395,9 @@ public class Font3D extends NodeComponent {
endIdx = startIdx + contourCounts[i];
islandsTree.insert(new IslandsNode(startIdx, endIdx), vertices);
startIdx = endIdx;
- }
+ }
- coords = null; // Free memory
+ coords = null; // Free memory
contours = null;
contourCounts = null;
@@ -408,7 +408,7 @@ public class Font3D extends NodeComponent {
int islandCounts[][] = new int[islandsList.arraySize()][];
Point3f outVerts[][] = new Point3f[islandCounts.length][];
int nchild, sum;
- IslandsNode node;
+ IslandsNode node;
for (i=0; i < islandCounts.length; i++) {
node = nodes[i];
@@ -420,7 +420,7 @@ public class Font3D extends NodeComponent {
for (j=0; j < nchild; j++) {
islandCounts[i][j+1] = node.getChild(j).numVertices();
sum += islandCounts[i][j+1];
- }
+ }
outVerts[i] = new Point3f[sum];
startIdx = 0;
for (k=node.startIdx; k < node.endIdx; k++) {
@@ -434,10 +434,10 @@ public class Font3D extends NodeComponent {
}
}
}
-
- islandsTree = null; // Free memory
+
+ islandsTree = null; // Free memory
islandsList = null;
vertices = null;
@@ -446,7 +446,7 @@ public class Font3D extends NodeComponent {
ArrayList triangData = new ArrayList();
Point3f q1 = new Point3f(), q2 = new Point3f(), q3 = new Point3f();
- Vector3f n1 = new Vector3f(), n2 = new Vector3f();
+ Vector3f n1 = new Vector3f(), n2 = new Vector3f();
numPoints = 0;
//Now loop thru each island, calling triangulator once per island.
//Combine triangle data for all islands together in one object.
@@ -477,11 +477,11 @@ public class Font3D extends NodeComponent {
}
}
- // XXXX: Should use IndexedTriangleArray to avoid
+ // XXXX: Should use IndexedTriangleArray to avoid
// duplication of vertices. To create triangles for
// side faces, every vertex is duplicated currently.
TriangleArray triAry = new TriangleArray(vertCnt,
- GeometryArray.COORDINATES |
+ GeometryArray.COORDINATES |
GeometryArray.NORMALS);
boolean flip_orient[] = new boolean[islandCounts.length];
@@ -495,7 +495,7 @@ public class Font3D extends NodeComponent {
vertOffset = ga.getVertexCount();
findOrient = false;
-
+
//Create the triangle array
for (i= 0; i < vertOffset; i+= 3, currCoordIndex += 3){
//Get 3 points. Since triangle is known to be flat, normal
@@ -504,14 +504,14 @@ public class Font3D extends NodeComponent {
ga.getNormal(i, n1);
ga.getCoordinate(i+1, p2);
ga.getCoordinate(i+2, p3);
-
+
if (!findOrient) {
//Check here if triangles are wound incorrectly and need
//to be flipped.
if (!getNormal(p1,p2, p3, n2)) {
continue;
}
-
+
if (n2.z >= EPS) {
flip_orient[j] = false;
} else if (n2.z <= -EPS) {
@@ -530,22 +530,22 @@ public class Font3D extends NodeComponent {
p3.x = q1.x; p3.y = q1.y; p3.z = q1.z;
n1.x = -n1.x; n1.y = -n1.y; n1.z = -n1.z;
}
-
-
+
+
if (fontExtrusion != null) {
n2.x = -n1.x;n2.y = -n1.y;n2.z = -n1.z;
-
+
triAry.setCoordinate(currCoordIndex, p1);
triAry.setNormal(currCoordIndex, n2);
triAry.setCoordinate(currCoordIndex+1, p3);
triAry.setNormal(currCoordIndex+1, n2);
triAry.setCoordinate(currCoordIndex+2, p2);
triAry.setNormal(currCoordIndex+2, n2);
-
+
q1.x = p1.x; q1.y = p1.y; q1.z = p1.z + fontExtrusion.length;
q2.x = p2.x; q2.y = p2.y; q2.z = p2.z + fontExtrusion.length;
q3.x = p3.x; q3.y = p3.y; q3.z = p3.z + fontExtrusion.length;
-
+
triAry.setCoordinate(currCoordIndex+vertOffset, q1);
triAry.setNormal(currCoordIndex+vertOffset, n1);
triAry.setCoordinate(currCoordIndex+1+vertOffset, q2);
@@ -562,11 +562,11 @@ public class Font3D extends NodeComponent {
}
}
- if (fontExtrusion != null) {
+ if (fontExtrusion != null) {
currCoordIndex += vertOffset;
}
}
-
+
//Now add side triangles in both cases.
// Since we duplicated triangles with different Z, make sure
@@ -590,7 +590,7 @@ public class Font3D extends NodeComponent {
Vector3f q1Normal = new Vector3f();
Vector3f q2Normal = new Vector3f();
Vector3f q3Normal = new Vector3f();
-
+
for (i=0;i < islandCounts.length;i++){
for (j=0, k=0, num =0;j < islandCounts[i].length;j++){
num += islandCounts[i][j];
@@ -600,13 +600,13 @@ public class Font3D extends NodeComponent {
q1.x = p1.x; q1.y = p1.y; q1.z = p1.z+fontExtrusion.length;
p2.z = 0.0f;
q2.z = p2.z+fontExtrusion.length;
- for (int m=0; m < num;m++) {
+ for (int m=0; m < num;m++) {
p2.x = outVerts[i][m].x;
p2.y = outVerts[i][m].y;
- q2.x = p2.x;
- q2.y = p2.y;
+ q2.x = p2.x;
+ q2.y = p2.y;
if (getNormal(p1, q1, p2, n1)) {
-
+
if (!flip_side_orient) {
n1.negate();
}
@@ -614,11 +614,11 @@ public class Font3D extends NodeComponent {
break;
}
}
-
+
for (;k < num;k++){
p2.x = outVerts[i][k].x;p2.y = outVerts[i][k].y;p2.z = 0.0f;
q2.x = p2.x; q2.y = p2.y; q2.z = p2.z+fontExtrusion.length;
-
+
if (!getNormal(p1, q1, p2, n1)) {
n1.set(goodNormal);
} else {
@@ -627,7 +627,7 @@ public class Font3D extends NodeComponent {
}
goodNormal.set(n1);
}
-
+
if (!getNormal(p2, q1, q2, n2)) {
n2.set(goodNormal);
} else {
@@ -638,7 +638,7 @@ public class Font3D extends NodeComponent {
}
// if there is a previous normal, see if we need to smooth
// this normal or make a crease
-
+
if (pn1 != null) {
cosine = n1.dot(pn2);
smooth = cosine > threshold;
@@ -647,7 +647,7 @@ public class Font3D extends NodeComponent {
p1Normal.y = (pn1.y + pn2.y + n1.y);
p1Normal.z = (pn1.z + pn2.z + n1.z);
normalize(p1Normal);
-
+
q1Normal.x = (pn2.x + n1.x + n2.x);
q1Normal.y = (pn2.y + n1.y + n2.y);
q1Normal.z = (pn2.z + n1.z + n2.z);
@@ -655,9 +655,9 @@ public class Font3D extends NodeComponent {
} // if smooth
else {
p1Normal.x = n1.x; p1Normal.y = n1.y; p1Normal.z = n1.z;
- q1Normal.x = n1.x+n2.x;
+ q1Normal.x = n1.x+n2.x;
q1Normal.y = n1.y+n2.y;
- q1Normal.z = n1.z+ n2.z;
+ q1Normal.z = n1.z+ n2.z;
normalize(q1Normal);
} // else
} // if pn1 != null
@@ -667,20 +667,20 @@ public class Font3D extends NodeComponent {
p1Normal.x = n1.x;
p1Normal.y = n1.y;
p1Normal.z = n1.z;
-
+
q1Normal.x = (n1.x + n2.x);
q1Normal.y = (n1.y + n2.y);
q1Normal.z = (n1.z + n2.z);
normalize(q1Normal);
} // else
-
+
// if there is a next, check if we should smooth normal
-
+
if (k+1 < num) {
- p3.x = outVerts[i][k+1].x; p3.y = outVerts[i][k+1].y;
+ p3.x = outVerts[i][k+1].x; p3.y = outVerts[i][k+1].y;
p3.z = 0.0f;
q3.x = p3.x; q3.y = p3.y; q3.z = p3.z + fontExtrusion.length;
-
+
if (!getNormal(p2, q2, p3, n3)) {
n3.set(goodNormal);
} else {
@@ -689,7 +689,7 @@ public class Font3D extends NodeComponent {
}
goodNormal.set(n3);
}
-
+
if (!getNormal(p3, q2, q3, n4)) {
n4.set(goodNormal);
} else {
@@ -698,16 +698,16 @@ public class Font3D extends NodeComponent {
}
goodNormal.set(n4);
}
-
+
cosine = n2.dot(n3);
smooth = cosine > threshold;
-
+
if (smooth) {
p2Normal.x = (n1.x + n2.x + n3.x);
p2Normal.y = (n1.y + n2.y + n3.y);
p2Normal.z = (n1.z + n2.z + n3.z);
normalize(p2Normal);
-
+
q2Normal.x = (n2.x + n3.x + n4.x);
q2Normal.y = (n2.y + n3.y + n4.y);
q2Normal.z = (n2.z + n3.z + n4.z);
@@ -724,32 +724,32 @@ public class Font3D extends NodeComponent {
p2Normal.y = (n1.y + n2.y);
p2Normal.z = (n1.z + n2.z);
normalize(p2Normal);
-
+
q2Normal.x = n2.x;
q2Normal.y = n2.y;
q2Normal.z = n2.z;
} // else
-
+
// add pts for the 2 tris
// p1, q1, p2 and p2, q1, q2
-
+
if (flip_side_orient) {
triAry.setCoordinate(currCoordIndex, p1);
triAry.setNormal(currCoordIndex, p1Normal);
currCoordIndex++;
-
+
triAry.setCoordinate(currCoordIndex, q1);
triAry.setNormal(currCoordIndex, q1Normal);
currCoordIndex++;
-
+
triAry.setCoordinate(currCoordIndex, p2);
triAry.setNormal(currCoordIndex, p2Normal);
currCoordIndex++;
-
+
triAry.setCoordinate(currCoordIndex, p2);
triAry.setNormal(currCoordIndex, p2Normal);
currCoordIndex++;
-
+
triAry.setCoordinate(currCoordIndex, q1);
triAry.setNormal(currCoordIndex, q1Normal);
currCoordIndex++;
@@ -757,19 +757,19 @@ public class Font3D extends NodeComponent {
triAry.setCoordinate(currCoordIndex, q1);
triAry.setNormal(currCoordIndex, q1Normal);
currCoordIndex++;
-
+
triAry.setCoordinate(currCoordIndex, p1);
triAry.setNormal(currCoordIndex, p1Normal);
currCoordIndex++;
-
+
triAry.setCoordinate(currCoordIndex, p2);
triAry.setNormal(currCoordIndex, p2Normal);
currCoordIndex++;
-
+
triAry.setCoordinate(currCoordIndex, q1);
triAry.setNormal(currCoordIndex, q1Normal);
currCoordIndex++;
-
+
triAry.setCoordinate(currCoordIndex, p2);
triAry.setNormal(currCoordIndex, p2Normal);
currCoordIndex++;
@@ -781,9 +781,9 @@ public class Font3D extends NodeComponent {
pn2.x = n2.x; pn2.y = n2.y; pn2.z = n2.z;
p1.x = p2.x; p1.y = p2.y; p1.z = p2.z;
q1.x = q2.x; q1.y = q2.y; q1.z = q2.z;
-
+
}// for k
-
+
// set the previous normals to null when we are done
pn1 = null;
pn2 = null;
@@ -792,12 +792,12 @@ public class Font3D extends NodeComponent {
} else { // if shape
int m, offset=0;
Point3f P2 = new Point3f(), Q2 = new Point3f(), P1=new Point3f();
- Vector3f nn = new Vector3f(), nn1= new Vector3f(),
+ Vector3f nn = new Vector3f(), nn1= new Vector3f(),
nn2= new Vector3f(), nn3= new Vector3f();
Vector3f nna = new Vector3f(), nnb=new Vector3f();
float length;
boolean validNormal = false;
-
+
// fontExtrusion.shape is specified, and is NOT straight line
for (i=0;i < islandCounts.length;i++){
for (j=0, k= 0, offset = num =0;j < islandCounts[i].length;j++){
@@ -811,7 +811,7 @@ public class Font3D extends NodeComponent {
for (m=num-2; m >= 0; m--) {
p3.x = outVerts[i][m].x;
p3.y = outVerts[i][m].y;
-
+
if (getNormal(p3, q1, p1, nn1)) {
if (!flip_side_orient) {
nn1.negate();
@@ -824,7 +824,7 @@ public class Font3D extends NodeComponent {
p2.x = outVerts[i][k].x;p2.y = outVerts[i][k].y;p2.z = 0.0f;
q2.x = p2.x; q2.y = p2.y; q2.z = p2.z+fontExtrusion.length;
getNormal(p1, q1, p2, nn2);
-
+
p3.x = outVerts[i][(k+1)==num ? offset:(k+1)].x;
p3.y = outVerts[i][(k+1)==num ? offset:(k+1)].y;
p3.z = 0.0f;
@@ -836,19 +836,19 @@ public class Font3D extends NodeComponent {
}
goodNormal.set(nn3);
}
-
+
// Calculate normals at the point by averaging normals
// of two faces on each side of the point.
nna.x = (nn1.x+nn2.x);
nna.y = (nn1.y+nn2.y);
nna.z = (nn1.z+nn2.z);
normalize(nna);
-
+
nnb.x = (nn3.x+nn2.x);
nnb.y = (nn3.y+nn2.y);
nnb.z = (nn3.z+nn2.z);
normalize(nnb);
-
+
P1.x = p1.x;P1.y = p1.y;P1.z = p1.z;
P2.x = p2.x;P2.y = p2.y; P2.z = p2.z;
Q2.x = q2.x;Q2.y = q2.y; Q2.z = q2.z;
@@ -858,7 +858,7 @@ public class Font3D extends NodeComponent {
q1.y = P1.y + nna.y * fontExtrusion.pnts[m].y;
q2.x = P2.x + nnb.x * fontExtrusion.pnts[m].y;
q2.y = P2.y + nnb.y * fontExtrusion.pnts[m].y;
-
+
if (!getNormal(p1, q1, p2, n1)) {
n1.set(goodNormal);
} else {
@@ -867,12 +867,12 @@ public class Font3D extends NodeComponent {
}
goodNormal.set(n1);
}
-
+
if (flip_side_orient) {
triAry.setCoordinate(currCoordIndex, p1);
triAry.setNormal(currCoordIndex, n1);
currCoordIndex++;
-
+
triAry.setCoordinate(currCoordIndex, q1);
triAry.setNormal(currCoordIndex, n1);
currCoordIndex++;
@@ -880,15 +880,15 @@ public class Font3D extends NodeComponent {
triAry.setCoordinate(currCoordIndex, q1);
triAry.setNormal(currCoordIndex, n1);
currCoordIndex++;
-
+
triAry.setCoordinate(currCoordIndex, p1);
triAry.setNormal(currCoordIndex, n1);
currCoordIndex++;
}
triAry.setCoordinate(currCoordIndex, p2);
triAry.setNormal(currCoordIndex, n1);
- currCoordIndex++;
-
+ currCoordIndex++;
+
if (!getNormal(p2, q1, q2, n1)) {
n1.set(goodNormal);
} else {
@@ -897,12 +897,12 @@ public class Font3D extends NodeComponent {
}
goodNormal.set(n1);
}
-
+
if (flip_side_orient) {
triAry.setCoordinate(currCoordIndex, p2);
triAry.setNormal(currCoordIndex, n1);
currCoordIndex++;
-
+
triAry.setCoordinate(currCoordIndex, q1);
triAry.setNormal(currCoordIndex, n1);
currCoordIndex++;
@@ -910,7 +910,7 @@ public class Font3D extends NodeComponent {
triAry.setCoordinate(currCoordIndex, q1);
triAry.setNormal(currCoordIndex, n1);
currCoordIndex++;
-
+
triAry.setCoordinate(currCoordIndex, p2);
triAry.setNormal(currCoordIndex, n1);
currCoordIndex++;
@@ -918,7 +918,7 @@ public class Font3D extends NodeComponent {
triAry.setCoordinate(currCoordIndex, q2);
triAry.setNormal(currCoordIndex, n1);
currCoordIndex++;
-
+
p1.x = q1.x;p1.y = q1.y;p1.z = q1.z;
p2.x = q2.x;p2.y = q2.y;p2.z = q2.z;
}// for m
@@ -933,8 +933,8 @@ public class Font3D extends NodeComponent {
}// if fontExtrusion
geo = (GeometryArrayRetained) triAry.retained;
geomHash.put(ch, geo);
- }
-
+ }
+
return geo;
}
@@ -942,15 +942,15 @@ public class Font3D extends NodeComponent {
static boolean getNormal(Point3f p1, Point3f p2, Point3f p3, Vector3f normal) {
Vector3f v1 = new Vector3f();
Vector3f v2 = new Vector3f();
-
+
// Must compute normal
v1.sub(p2, p1);
v2.sub(p2, p3);
normal.cross(v1, v2);
normal.negate();
-
+
float length = normal.length();
-
+
if (length > 0) {
length = 1 / length;
normal.x *= length;
@@ -961,7 +961,7 @@ public class Font3D extends NodeComponent {
return false;
}
-
+
// check if 2 contours are inside/outside/intersect one another
// INPUT:
// vertCnt1, vertCnt2 - number of vertices in 2 contours
@@ -969,56 +969,56 @@ public class Font3D extends NodeComponent {
// vertices - actual vertex data
// OUTPUT:
// status == 1 - intersecting contours
- // 2 - first contour inside the second
+ // 2 - first contour inside the second
// 3 - second contour inside the first
// 0 - disjoint contours(2 islands)
-
- static int check2Contours(int begin1, int end1, int begin2, int end2,
+
+ static int check2Contours(int begin1, int end1, int begin2, int end2,
Point3f[] vertices) {
int i, j;
boolean inside2, inside1;
-
- inside2 = pointInPolygon2D(vertices[begin1].x, vertices[begin1].y,
+
+ inside2 = pointInPolygon2D(vertices[begin1].x, vertices[begin1].y,
begin2, end2, vertices);
-
+
for (i=begin1+1; i < end1;i++) {
- if (pointInPolygon2D(vertices[i].x, vertices[i].y,
+ if (pointInPolygon2D(vertices[i].x, vertices[i].y,
begin2, end2, vertices) != inside2) {
return 1; //intersecting contours
}
}
-
- // Since we are using point in polygon test and not
+
+ // Since we are using point in polygon test and not
// line in polygon test. There are cases we miss the interesting
// if we are not checking the reverse for all points. This happen
// when two points form a line pass through a polygon but the two
// points are outside of it.
-
- inside1 = pointInPolygon2D(vertices[begin2].x, vertices[begin2].y,
+
+ inside1 = pointInPolygon2D(vertices[begin2].x, vertices[begin2].y,
begin1, end1, vertices);
-
+
for (i=begin2+1; i < end2;i++) {
- if (pointInPolygon2D(vertices[i].x, vertices[i].y,
- begin1, end1, vertices) != inside1) {
+ if (pointInPolygon2D(vertices[i].x, vertices[i].y,
+ begin1, end1, vertices) != inside1) {
return 1; //intersecting contours
}
}
-
+
if (!inside2) {
- if (!inside1) {
+ if (!inside1) {
return 0; // disjoint countours
- }
+ }
// inside2 = false and inside1 = true
return 3; // second contour inside first
}
-
+
// must be inside2 = true and inside1 = false
// Note that it is not possible inside2 = inside1 = true
// unless two contour overlap to each others.
//
return 2; // first contour inside second
}
-
+
// Test if 2D point (x,y) lies inside polygon represented by verts.
// z-value of polygon vertices is ignored. Sent only to avoid data-copy.
// Uses ray-shooting algorithm to compute intersections along +X axis.
@@ -1026,9 +1026,9 @@ public class Font3D extends NodeComponent {
// is best solution here due to large number of polygon vertices.
// Point is INSIDE if number of intersections is odd, OUTSIDE if number
// of intersections is even.
- static boolean pointInPolygon2D(float x, float y, int begIdx, int endIdx,
+ static boolean pointInPolygon2D(float x, float y, int begIdx, int endIdx,
Point3f[] verts){
-
+
int i, num_intersections = 0;
float xi;
@@ -1036,42 +1036,42 @@ public class Font3D extends NodeComponent {
if ((verts[i].y >= y && verts[i+1].y >= y) ||
(verts[i].y < y && verts[i+1].y < y))
continue;
-
+
xi = verts[i].x + (verts[i].x - verts[i+1].x)*(y - verts[i].y)/
(verts[i].y - verts[i+1].y);
-
+
if (x < xi) num_intersections++;
}
-
+
// Check for segment from last vertex to first vertex.
-
+
if (!((verts[i].y >= y && verts[begIdx].y >= y) ||
(verts[i].y < y && verts[begIdx].y < y))) {
xi = verts[i].x + (verts[i].x - verts[begIdx].x)*(y - verts[i].y)/
(verts[i].y - verts[begIdx].y);
-
+
if (x < xi) num_intersections++;
}
-
+
return ((num_intersections % 2) != 0);
}
-
-
+
+
static final boolean normalize(Vector3f v) {
float len = v.length();
-
+
if (len > 0) {
len = 1.0f/len;
v.x *= len;
v.y *= len;
v.z *= len;
return true;
- }
+ }
return false;
- }
+ }
- // A Tree of islands form based on contour, each parent's contour
+ // A Tree of islands form based on contour, each parent's contour
// enclosed all the child. We built this since Triangular fail to
// handle the case of multiple concentrated contours. i.e. if
// 4 contours A > B > C > D. Triangular will fail recongized
@@ -1115,11 +1115,11 @@ public class Font3D extends NodeComponent {
void insert(IslandsNode newNode, Point3f[] vertices) {
boolean createNewLevel = false;
-
+
if (islandsList != null) {
IslandsNode childNode;
int status;
-
+
for (int i=numChild()-1; i>=0; i--) {
childNode = getChild(i);
status = check2Contours(newNode.startIdx, newNode.endIdx,
@@ -1129,15 +1129,15 @@ public class Font3D extends NodeComponent {
case 2: // newNode inside childNode, go down recursively
childNode.insert(newNode, vertices);
return;
- case 3:// childNode inside newNode,
+ case 3:// childNode inside newNode,
// continue to search other childNode also
// inside this one and group them together.
newNode.addChild(childNode);
createNewLevel = true;
break;
default: // intersecting or disjoint
-
- }
+
+ }
}
}
@@ -1146,8 +1146,8 @@ public class Font3D extends NodeComponent {
for (int i=newNode.numChild()-1; i>=0; i--) {
removeChild(newNode.getChild(i));
}
- // Add the newNode to parent
- }
+ // Add the newNode to parent
+ }
addChild(newNode);
}
diff --git a/src/classes/share/javax/media/j3d/FontExtrusion.java b/src/classes/share/javax/media/j3d/FontExtrusion.java
index 7ba46dd..5569919 100644
--- a/src/classes/share/javax/media/j3d/FontExtrusion.java
+++ b/src/classes/share/javax/media/j3d/FontExtrusion.java
@@ -49,7 +49,7 @@ import java.util.ArrayList;
* modified via the extrusionShape parameter, a Shape object that
* describes the 3D contour of a Font3D object.
* flatness
parameter in
* the java.awt.Shape.getPathIterator
method.
*
- * @exception IllegalArgumentException if multiple contours in
+ * @exception IllegalArgumentException if multiple contours in
* extrusionShape, or contour is not monotonic or least x-value
* of a contour point is not 0.0f
*
@@ -147,7 +147,7 @@ public class FontExtrusion extends Object {
* A null shape specifies that a straight line from 0.0 to 0.2
* (straight bevel) is used.
*
- * @exception IllegalArgumentException if multiple contours in
+ * @exception IllegalArgumentException if multiple contours in
* extrusionShape, or contour is not monotonic or least x-value
* of a contour point is not 0.0f
*
@@ -160,7 +160,7 @@ public class FontExtrusion extends Object {
PathIterator pIt = shape.getPathIterator(null, tessellationTolerance);
ArrayList coords = new ArrayList();
- float tmpCoords[] = new float[6], prevX = 0.0f;
+ float tmpCoords[] = new float[6], prevX = 0.0f;
int flag, n = 0, inc = -1;
// Extrusion shape is restricted to be single contour, monotonous
@@ -172,12 +172,12 @@ public class FontExtrusion extends Object {
vertex.x = tmpCoords[0];
vertex.y = tmpCoords[1];
if (inc == -1){
- if (prevX < vertex.x) inc = 0;
+ if (prevX < vertex.x) inc = 0;
else if (prevX > vertex.x) inc = 1;
}
- //Flag 'inc' indicates if curve is monotonic increasing or
+ //Flag 'inc' indicates if curve is monotonic increasing or
// monotonic decreasing. It is set to -1 initially and remains
- // -1 if consecutive x values are same. Once 'inc' is set to
+ // -1 if consecutive x values are same. Once 'inc' is set to
// 1 or 0, exception is thrown is curve changes direction.
if (((inc == 0) && (prevX > vertex.x)) ||
((inc == 1) && (prevX < vertex.x)))
diff --git a/src/classes/share/javax/media/j3d/FreeListManager.java b/src/classes/share/javax/media/j3d/FreeListManager.java
index c12a0dd..d97a63f 100644
--- a/src/classes/share/javax/media/j3d/FreeListManager.java
+++ b/src/classes/share/javax/media/j3d/FreeListManager.java
@@ -39,22 +39,22 @@ class FreeListManager {
// constants that represent the freelists managed by the Manager
static final int DISPLAYLIST = 0;
static final int TEXTURE2D = 1;
- static final int TEXTURE3D = 2;
-
+ static final int TEXTURE3D = 2;
+
private static int maxFreeListNum = 2;
-
+
// what list we are going to shrink next
private static int currlist = 0;
static MemoryFreeList[] freelist = null;
-
+
static void createFreeLists() {
maxFreeListNum = 2;
freelist = new MemoryFreeList[maxFreeListNum+1];
freelist[DISPLAYLIST] = new IntegerFreeList();
freelist[TEXTURE2D] = new IntegerFreeList();
freelist[TEXTURE3D] = new IntegerFreeList();
-
+
}
// see if the current list can be shrunk
@@ -63,7 +63,7 @@ class FreeListManager {
if (freelist[currlist] != null) {
freelist[currlist].shrink();
}
-
+
currlist++;
if (currlist > maxFreeListNum) currlist = 0;
}
diff --git a/src/classes/share/javax/media/j3d/GLSLShaderProgram.java b/src/classes/share/javax/media/j3d/GLSLShaderProgram.java
index 1f7fb08..00f4487 100644
--- a/src/classes/share/javax/media/j3d/GLSLShaderProgram.java
+++ b/src/classes/share/javax/media/j3d/GLSLShaderProgram.java
@@ -134,21 +134,21 @@ public class GLSLShaderProgram extends ShaderProgram {
*/
public void setShaders(Shader[] shaders) {
checkForLiveOrCompiled();
-
+
if(shaders != null) {
// Check shaders for valid shading language and class type
for (int i = 0; i < shaders.length; i++) {
if (shaders[i].getShadingLanguage() != Shader.SHADING_LANGUAGE_GLSL) {
throw new IllegalArgumentException(J3dI18N.getString("GLSLShaderProgram2"));
}
-
+
// Try to cast shader to SourceCodeShader; it will throw
// ClassCastException if it isn't.
SourceCodeShader shad = (SourceCodeShader)shaders[i];
}
-
+
}
-
+
((GLSLShaderProgramRetained)this.retained).setShaders(shaders);
}
diff --git a/src/classes/share/javax/media/j3d/GLSLShaderProgramRetained.java b/src/classes/share/javax/media/j3d/GLSLShaderProgramRetained.java
index 369a3ea..e25def3 100644
--- a/src/classes/share/javax/media/j3d/GLSLShaderProgramRetained.java
+++ b/src/classes/share/javax/media/j3d/GLSLShaderProgramRetained.java
@@ -37,7 +37,7 @@ package javax.media.j3d;
*/
class GLSLShaderProgramRetained extends ShaderProgramRetained {
-
+
/**
* Constructs a GLSL shader program node component.
*/
@@ -298,7 +298,7 @@ class GLSLShaderProgramRetained extends ShaderProgramRetained {
numElements,
value);
}
-
+
/**
* Method to return a flag indicating whether this
* ShaderProgram is supported on the specified Canvas.
@@ -310,17 +310,17 @@ class GLSLShaderProgramRetained extends ShaderProgramRetained {
/**
* Method to create the native shader.
*/
- ShaderError createShader(Context ctx, ShaderRetained shader, ShaderId[] shaderIdArr) {
+ ShaderError createShader(Context ctx, ShaderRetained shader, ShaderId[] shaderIdArr) {
return Pipeline.getPipeline().createGLSLShader(ctx, shader.shaderType, shaderIdArr);
}
-
+
/**
* Method to destroy the native shader.
*/
ShaderError destroyShader(Context ctx, ShaderId shaderId) {
return Pipeline.getPipeline().destroyGLSLShader(ctx, shaderId);
}
-
+
/**
* Method to compile the native shader.
*/
@@ -332,7 +332,7 @@ class GLSLShaderProgramRetained extends ShaderProgramRetained {
* Method to create the native shader program.
*/
ShaderError createShaderProgram(Context ctx, ShaderProgramId[] shaderProgramIdArr) {
- return Pipeline.getPipeline().createGLSLShaderProgram(ctx, shaderProgramIdArr);
+ return Pipeline.getPipeline().createGLSLShaderProgram(ctx, shaderProgramIdArr);
}
/**
@@ -348,7 +348,7 @@ class GLSLShaderProgramRetained extends ShaderProgramRetained {
ShaderError linkShaderProgram(Context ctx, ShaderProgramId shaderProgramId, ShaderId[] shaderIds) {
return Pipeline.getPipeline().linkGLSLShaderProgram(ctx, shaderProgramId, shaderIds);
}
-
+
ShaderError bindVertexAttrName(Context ctx, ShaderProgramId shaderProgramId, String attrName, int attrIndex) {
return Pipeline.getPipeline().bindGLSLVertexAttrName(ctx, shaderProgramId, attrName, attrIndex);
}
@@ -361,7 +361,7 @@ class GLSLShaderProgramRetained extends ShaderProgramRetained {
String[] attrNames, AttrNameInfo[] attrNameInfoArr) {
int numAttrNames = attrNames.length;
-
+
ShaderAttrLoc[] locArr = new ShaderAttrLoc[numAttrNames];
int[] typeArr = new int[numAttrNames];
int[] sizeArr = new int[numAttrNames]; // currently unused
@@ -382,14 +382,14 @@ class GLSLShaderProgramRetained extends ShaderProgramRetained {
// ", size = " + sizeArr[i]);
}
}
-
+
/**
* Method to enable the native shader program.
*/
ShaderError enableShaderProgram(Context ctx, ShaderProgramId shaderProgramId) {
return Pipeline.getPipeline().useGLSLShaderProgram(ctx, shaderProgramId);
}
-
+
/**
* Method to disable the native shader program.
*/
diff --git a/src/classes/share/javax/media/j3d/GeneralizedStrip.java b/src/classes/share/javax/media/j3d/GeneralizedStrip.java
index 883737a..b870c54 100644
--- a/src/classes/share/javax/media/j3d/GeneralizedStrip.java
+++ b/src/classes/share/javax/media/j3d/GeneralizedStrip.java
@@ -151,7 +151,7 @@ class GeneralizedStrip {
/**
* A list of indices into the vertices of the original generalized
* strip. It specifies the order in which vertices in the original
- * strip should be followed to build GeometryArray objects.
+ * strip should be followed to build GeometryArray objects.
*/
IntList vertices ;
@@ -285,7 +285,7 @@ class GeneralizedStrip {
}
}
}
-
+
// Finish off the last strip or fan.
// If v > size then the strip is degenerate.
if (v == size)
@@ -304,7 +304,7 @@ class GeneralizedStrip {
if (v > size)
System.err.println(" ended with a degenerate triangle:" +
" number of vertices: " + (v-size)) ;
-
+
System.err.println("\n number of strips: " + stripCounts.count) ;
if (stripCounts.count > 0) {
System.err.println(" number of vertices: " + stripVerts.count) ;
@@ -323,7 +323,7 @@ class GeneralizedStrip {
// System.err.println(" indices: " + fanVerts.toString()) ;
}
System.err.println("\n total vertices: " +
- (stripVerts.count + fanVerts.count) +
+ (stripVerts.count + fanVerts.count) +
"\n original number of vertices: " + size +
"\n") ;
}
@@ -334,7 +334,7 @@ class GeneralizedStrip {
// have counter-clockwise (CCW) winding order when projected to
// the view surface. Polygons with clockwise (CW) vertex winding
// will be culled as back-facing by default.
- //
+ //
// Generalized triangle strips can flip the orientation of their
// triangles with the RESTART_CW and RESTART_CCW vertex flags.
// Strips flagged with an orientation opposite to what has been
@@ -384,7 +384,7 @@ class GeneralizedStrip {
}
}
}
-
+
private static void addFan(IntList fanVerts,
IntList fanCounts,
int start, int length,
@@ -463,12 +463,12 @@ class GeneralizedStrip {
StripArray sa = new StripArray(stripVerts, stripCounts) ;
if (debug) {
- System.err.println("GeneralizedStrip.toTriangleStrips" +
+ System.err.println("GeneralizedStrip.toTriangleStrips" +
"\n number of strips: " +
sa.stripCounts.count) ;
if (sa.stripCounts.count > 0) {
System.err.println(" number of vertices: " +
- sa.vertices.count +
+ sa.vertices.count +
"\n vertices/strip: " +
((float)sa.vertices.count /
(float)sa.stripCounts.count)) ;
@@ -490,7 +490,7 @@ class GeneralizedStrip {
// Construct a strip by criss-crossing across the interior.
stripCounts.add(length) ;
stripVerts.add(fans[v]) ;
-
+
int j = v + 1 ;
int k = v + (length - 1) ;
while (j <= k) {
@@ -701,7 +701,7 @@ class GeneralizedStrip {
System.err.print(" long strip counts: [") ;
for (int i = 0 ; i < longStripCount-1 ; i++)
System.err.print(newStripCounts[i++] + ", ") ;
-
+
System.err.println
(newStripCounts[longStripCount-1] + "]\n") ;
}
@@ -716,7 +716,7 @@ class GeneralizedStrip {
*
* RESTART_CW and RESTART_CCW are treated as equivalent, as are
* REPLACE_MIDDLE and REPLACE_OLDEST.
- *
+ *
* @param vertices an object implementing GeneralizedStripFlags
* @return a StripArray representing an array of line strips
*/
@@ -753,7 +753,7 @@ class GeneralizedStrip {
v += 2 ;
}
}
-
+
// Finish off the last strip.
// If v > size then the strip is degenerate.
if (v == size) {
@@ -788,7 +788,7 @@ class GeneralizedStrip {
/**
* Counts the number of lines defined by arrays of line strips.
- *
+ *
* @param stripCounts array of strip counts, as used by the
* GeometryStripArray object
* @return number of lines in the strips
@@ -831,7 +831,7 @@ class GeneralizedStrip {
/**
* Breaks up triangle strips into separate triangles.
- *
+ *
* @param stripCounts array of strip counts, as used by the
* GeometryStripArray object
* @return array of ints which index into the original vertex array; each
@@ -852,7 +852,7 @@ class GeneralizedStrip {
/**
* Breaks up triangle fans into separate triangles.
- *
+ *
* @param stripCounts array of strip counts, as used by the
* GeometryStripArray object
* @return array of ints which index into the original vertex array; each
@@ -873,7 +873,7 @@ class GeneralizedStrip {
/**
* Takes a fan and converts it to one or more strips.
- *
+ *
* @param v index into the fans array of the first vertex in the fan
* @param length number of vertices in the fan
* @param fans array of vertex indices representing one or more fans
diff --git a/src/classes/share/javax/media/j3d/GeneralizedStripFlags.java b/src/classes/share/javax/media/j3d/GeneralizedStripFlags.java
index cc9d2a8..8776c55 100644
--- a/src/classes/share/javax/media/j3d/GeneralizedStripFlags.java
+++ b/src/classes/share/javax/media/j3d/GeneralizedStripFlags.java
@@ -45,7 +45,7 @@ interface GeneralizedStripFlags {
/**
* This flag indicates that a vertex starts a new strip with clockwise
- * winding.
+ * winding.
*/
static final int RESTART_CW = 0 ;
diff --git a/src/classes/share/javax/media/j3d/GeneralizedVertexList.java b/src/classes/share/javax/media/j3d/GeneralizedVertexList.java
index 5732048..45b5611 100644
--- a/src/classes/share/javax/media/j3d/GeneralizedVertexList.java
+++ b/src/classes/share/javax/media/j3d/GeneralizedVertexList.java
@@ -53,10 +53,10 @@ class GeneralizedVertexList implements GeneralizedStripFlags {
private boolean hasColor3 = false ;
private boolean hasColor4 = false ;
private boolean hasNormals = false ;
-
+
// Indicates the vertex winding of front-facing triangles in this strip.
private int frontFace ;
-
+
/**
* Count of number of strips generated after conversion to GeometryArray.
*/
@@ -90,7 +90,7 @@ class GeneralizedVertexList implements GeneralizedStripFlags {
GeneralizedVertexList(int vertexFormat, int frontFace, int initSize) {
this.frontFace = frontFace ;
setVertexFormat(vertexFormat) ;
-
+
if (initSize == 0)
vertices = new ArrayList() ;
else
@@ -130,7 +130,7 @@ class GeneralizedVertexList implements GeneralizedStripFlags {
else
hasColor3 = true ;
}
-
+
/**
* A class with fields corresponding to all the data that can be bundled
* with the vertices of generalized strips.
@@ -141,11 +141,11 @@ class GeneralizedVertexList implements GeneralizedStripFlags {
Color3f color3 ;
Color4f color4 ;
Vector3f normal ;
-
+
Vertex(Point3f p, Vector3f n, Color4f c, int flag) {
this.flag = flag ;
coord = new Point3f(p) ;
-
+
if (hasNormals)
normal = new Vector3f(n) ;
@@ -163,7 +163,7 @@ class GeneralizedVertexList implements GeneralizedStripFlags {
void addVertex(Point3f pos, Vector3f norm, Color4f color, int flag) {
vertices.add(new Vertex(pos, norm, color, flag)) ;
}
-
+
/**
* Return the number of vertices in this list.
*/
@@ -230,7 +230,7 @@ class GeneralizedVertexList implements GeneralizedStripFlags {
c3f[i] = v.color3 ;
}
ga.setColors(0, c3f) ;
-
+
} else if (hasColor4) {
Color4f c4f[] = new Color4f[indices.count] ;
for (int i = 0 ; i < indices.count ; i++) {
diff --git a/src/classes/share/javax/media/j3d/Geometry.java b/src/classes/share/javax/media/j3d/Geometry.java
index 8e0797f..60276c8 100644
--- a/src/classes/share/javax/media/j3d/Geometry.java
+++ b/src/classes/share/javax/media/j3d/Geometry.java
@@ -45,7 +45,7 @@ package javax.media.j3d;
* Each of these geometric types defines a visible object or set of
* objects. A Geometry object is used as a component object of a Shape3D
* leaf node.
- *
+ *
*/
public abstract class Geometry extends NodeComponent {
@@ -61,7 +61,7 @@ public abstract class Geometry extends NodeComponent {
private static final int[] readCapabilities = {
ALLOW_INTERSECT
};
-
+
/**
* Constructs a new Geometry object.
*/
diff --git a/src/classes/share/javax/media/j3d/GeometryArray.java b/src/classes/share/javax/media/j3d/GeometryArray.java
index 9f95391..a402865 100644
--- a/src/classes/share/javax/media/j3d/GeometryArray.java
+++ b/src/classes/share/javax/media/j3d/GeometryArray.java
@@ -348,10 +348,10 @@ public abstract class GeometryArray extends Geometry {
//NVaidya
/**
- * Specifies that the indices in this GeometryArray
- * are accessed by reference. This flag is only valid for
+ * Specifies that the indices in this GeometryArray
+ * are accessed by reference. This flag is only valid for
* indexed geometry arrays (subclasses of IndexedGeometryArray) and only
- * when used in conjunction with the BY_REFERENCE
and
+ * when used in conjunction with the BY_REFERENCE
and
* USE_COORD_INDEX_ONLY
flags.
*
* @since Java 3D 1.5
@@ -367,7 +367,7 @@ public abstract class GeometryArray extends Geometry {
private TexCoord4f [] texCoord4fArray = null;
private TexCoord2f texCoord2fScratch = null;
private TexCoord3f texCoord3fScratch = null;
-
+
private static final int[] defTexCoordMap = { 0 };
// Array for setting default read capabilities
@@ -379,9 +379,9 @@ public abstract class GeometryArray extends Geometry {
ALLOW_NORMAL_READ,
ALLOW_REF_DATA_READ,
ALLOW_TEXCOORD_READ,
- ALLOW_VERTEX_ATTR_READ
+ ALLOW_VERTEX_ATTR_READ
};
-
+
// non-public, no parameter constructor
GeometryArray() {
@@ -444,7 +444,7 @@ public abstract class GeometryArray extends Geometry {
* include COORDINATES
*
* @exception IllegalArgumentException if the USE_COORD_INDEX_ONLY
- * bit or the BY_REFERENCE_INDICES
bit is set for
+ * bit or the BY_REFERENCE_INDICES
bit is set for
* non-indexed geometry arrays (that is, GeometryArray objects
* that are not a subclass of IndexedGeometryArray)
*
@@ -457,9 +457,9 @@ public abstract class GeometryArray extends Geometry {
* @exception IllegalArgumentException if the INTERLEAVED
* bit and the VERTEX_ATTRIBUTES
bit are both set
*
- * @exception IllegalArgumentException if the
+ * @exception IllegalArgumentException if the
* BY_REFERENCE_INDICES
- * bit is set without the BY_REFERENCE
and
+ * bit is set without the BY_REFERENCE
and
* USE_COORD_INDEX_ONLY
bits being set
*/
public GeometryArray(int vertexCount, int vertexFormat) {
@@ -578,7 +578,7 @@ public abstract class GeometryArray extends Geometry {
* include COORDINATES
*
* @exception IllegalArgumentException if the USE_COORD_INDEX_ONLY
- * bit or the BY_REFERENCE_INDICES
bit is set for
+ * bit or the BY_REFERENCE_INDICES
bit is set for
* non-indexed geometry arrays (that is, GeometryArray objects
* that are not a subclass of IndexedGeometryArray)
*
@@ -591,9 +591,9 @@ public abstract class GeometryArray extends Geometry {
* @exception IllegalArgumentException if the INTERLEAVED
* bit and the VERTEX_ATTRIBUTES
bit are both set
*
- * @exception IllegalArgumentException if the
+ * @exception IllegalArgumentException if the
* BY_REFERENCE_INDICES
- * bit is set without the BY_REFERENCE
and
+ * bit is set without the BY_REFERENCE
and
* USE_COORD_INDEX_ONLY
bits being set
*
* @exception IllegalArgumentException if
@@ -733,7 +733,7 @@ public abstract class GeometryArray extends Geometry {
* include COORDINATES
*
* @exception IllegalArgumentException if the USE_COORD_INDEX_ONLY
- * bit or the BY_REFERENCE_INDICES
bit is set for
+ * bit or the BY_REFERENCE_INDICES
bit is set for
* non-indexed geometry arrays (that is, GeometryArray objects
* that are not a subclass of IndexedGeometryArray)
*
@@ -746,9 +746,9 @@ public abstract class GeometryArray extends Geometry {
* @exception IllegalArgumentException if the INTERLEAVED
* bit and the VERTEX_ATTRIBUTES
bit are both set
*
- * @exception IllegalArgumentException if the
+ * @exception IllegalArgumentException if the
* BY_REFERENCE_INDICES
- * bit is set without the BY_REFERENCE
and
+ * bit is set without the BY_REFERENCE
and
* USE_COORD_INDEX_ONLY
bits being set
*
* @exception IllegalArgumentException if
@@ -844,13 +844,13 @@ public abstract class GeometryArray extends Geometry {
texCoord4fArray = new TexCoord4f[1];
}
}
-
+
if ((vertexFormat & VERTEX_ATTRIBUTES) != 0) {
if (vertexAttrCount > 0) {
if (vertexAttrCount != vertexAttrSizes.length) {
throw new IllegalArgumentException(J3dI18N.getString("GeometryArray132"));
}
-
+
for (int i = 0; i < vertexAttrSizes.length; i++) {
if (vertexAttrSizes[i] < 1 || vertexAttrSizes[i] > 4) {
throw new IllegalArgumentException(J3dI18N.getString("GeometryArray133"));
@@ -866,10 +866,10 @@ public abstract class GeometryArray extends Geometry {
throw new IllegalArgumentException(J3dI18N.getString("GeometryArray131"));
}
}
-
+
// set default read capabilities
setDefaultReadCapabilities(readCapabilities);
-
+
((GeometryArrayRetained)this.retained).createGeometryArrayData(
vertexCount, vertexFormat,
texCoordSetCount, texCoordSetMap,
@@ -1642,7 +1642,7 @@ public abstract class GeometryArray extends Geometry {
* constructor vertexFormat
or array index for element is out of bounds.
* @exception IllegalStateException if the data mode for this geometry
* array object is BY_REFERENCE
.
- * @exception IllegalStateException if COLOR_4 is specified in the vertex
+ * @exception IllegalStateException if COLOR_4 is specified in the vertex
* format
*/
public void setColor(int index, Color3f color) {
@@ -1659,7 +1659,7 @@ public abstract class GeometryArray extends Geometry {
if ((format & WITH_ALPHA) != 0)
throw new IllegalStateException(J3dI18N.getString("GeometryArray92"));
-
+
((GeometryArrayRetained)this.retained).setColor(index, color);
}
@@ -1674,7 +1674,7 @@ public abstract class GeometryArray extends Geometry {
* constructor vertexFormat
or array index for element is out of bounds.
* @exception IllegalStateException if the data mode for this geometry
* array object is BY_REFERENCE
.
- * @exception IllegalStateException if COLOR_3 is specified in the vertex
+ * @exception IllegalStateException if COLOR_3 is specified in the vertex
* format
*/
public void setColor(int index, Color4f color) {
@@ -1706,7 +1706,7 @@ public abstract class GeometryArray extends Geometry {
* constructor vertexFormat
or array index for element is out of bounds.
* @exception IllegalStateException if the data mode for this geometry
* array object is BY_REFERENCE
.
- * @exception IllegalStateException if COLOR_4 is specified in the vertex
+ * @exception IllegalStateException if COLOR_4 is specified in the vertex
* format
*/
public void setColor(int index, Color3b color) {
@@ -1738,7 +1738,7 @@ public abstract class GeometryArray extends Geometry {
* constructor vertexFormat
or array index for element is out of bounds.
* @exception IllegalStateException if the data mode for this geometry
* array object is BY_REFERENCE
.
- * @exception IllegalStateException if COLOR_3 is specified in the vertex
+ * @exception IllegalStateException if COLOR_3 is specified in the vertex
* format
*/
public void setColor(int index, Color4b color) {
@@ -2405,7 +2405,7 @@ public abstract class GeometryArray extends Geometry {
if(!this.getCapability(ALLOW_TEXCOORD_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("GeometryArray39"));
- if (((((GeometryArrayRetained)this.retained).vertexFormat) &
+ if (((((GeometryArrayRetained)this.retained).vertexFormat) &
(TEXTURE_COORDINATE_3 | TEXTURE_COORDINATE_4)) != 0)
throw new IllegalStateException(J3dI18N.getString("GeometryArray94"));
@@ -2454,7 +2454,7 @@ public abstract class GeometryArray extends Geometry {
if(!this.getCapability(ALLOW_TEXCOORD_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("GeometryArray39"));
- if (((((GeometryArrayRetained)this.retained).vertexFormat) &
+ if (((((GeometryArrayRetained)this.retained).vertexFormat) &
(TEXTURE_COORDINATE_2 | TEXTURE_COORDINATE_4)) != 0)
throw new IllegalStateException(J3dI18N.getString("GeometryArray95"));
@@ -2494,7 +2494,7 @@ public abstract class GeometryArray extends Geometry {
if(!this.getCapability(ALLOW_TEXCOORD_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("GeometryArray39"));
- if (((((GeometryArrayRetained)this.retained).vertexFormat) &
+ if (((((GeometryArrayRetained)this.retained).vertexFormat) &
(TEXTURE_COORDINATE_2 | TEXTURE_COORDINATE_3)) != 0)
throw new IllegalStateException(J3dI18N.getString("GeometryArray109"));
@@ -2548,7 +2548,7 @@ public abstract class GeometryArray extends Geometry {
else if ((format & GeometryArray.TEXTURE_COORDINATE_3) != 0)
((GeometryArrayRetained)this.retained).setTextureCoordinates(
texCoordSet, index, texCoords, 0, texCoords.length / 3);
- else
+ else
((GeometryArrayRetained)this.retained).setTextureCoordinates(
texCoordSet, index, texCoords, 0, texCoords.length / 4);
}
@@ -2600,7 +2600,7 @@ public abstract class GeometryArray extends Geometry {
if(!this.getCapability(ALLOW_TEXCOORD_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("GeometryArray42"));
- if (((((GeometryArrayRetained)this.retained).vertexFormat) &
+ if (((((GeometryArrayRetained)this.retained).vertexFormat) &
(TEXTURE_COORDINATE_3 | TEXTURE_COORDINATE_4)) != 0)
throw new IllegalStateException(J3dI18N.getString("GeometryArray94"));
@@ -2655,7 +2655,7 @@ public abstract class GeometryArray extends Geometry {
throw new CapabilityNotSetException(J3dI18N.getString("GeometryArray42"));
- if (((((GeometryArrayRetained)this.retained).vertexFormat) &
+ if (((((GeometryArrayRetained)this.retained).vertexFormat) &
(TEXTURE_COORDINATE_2 | TEXTURE_COORDINATE_4)) != 0)
throw new IllegalStateException(J3dI18N.getString("GeometryArray95"));
@@ -2697,7 +2697,7 @@ public abstract class GeometryArray extends Geometry {
throw new CapabilityNotSetException(J3dI18N.getString("GeometryArray42"));
- if (((((GeometryArrayRetained)this.retained).vertexFormat) &
+ if (((((GeometryArrayRetained)this.retained).vertexFormat) &
(TEXTURE_COORDINATE_2 | TEXTURE_COORDINATE_3)) != 0)
throw new IllegalStateException(J3dI18N.getString("GeometryArray109"));
@@ -2722,7 +2722,7 @@ public abstract class GeometryArray extends Geometry {
* ending at index start+length
.
*
* @param index starting destination vertex index in this geometry array
- * @param texCoords source array of 2*n , 3*n or 4*n values containing
+ * @param texCoords source array of 2*n , 3*n or 4*n values containing
* n new texture coordinates
* @param start starting source vertex index in texCoords
* array.
@@ -2792,7 +2792,7 @@ public abstract class GeometryArray extends Geometry {
* @exception IllegalStateException if the data mode for this geometry
* array object is BY_REFERENCE
.
*
- * @exception IllegalStateException if TEXTURE_COORDINATE_3 or
+ * @exception IllegalStateException if TEXTURE_COORDINATE_3 or
* TEXTURE_COORDINATE_4 is specified in vertex format
*
* @since Java 3D 1.2
@@ -2804,7 +2804,7 @@ public abstract class GeometryArray extends Geometry {
if(!this.getCapability(ALLOW_TEXCOORD_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("GeometryArray42"));
- if (((((GeometryArrayRetained)this.retained).vertexFormat) &
+ if (((((GeometryArrayRetained)this.retained).vertexFormat) &
(TEXTURE_COORDINATE_3 | TEXTURE_COORDINATE_4)) != 0)
throw new IllegalStateException(J3dI18N.getString("GeometryArray94"));
@@ -2863,7 +2863,7 @@ public abstract class GeometryArray extends Geometry {
if(!this.getCapability(ALLOW_TEXCOORD_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("GeometryArray42"));
- if (((((GeometryArrayRetained)this.retained).vertexFormat) &
+ if (((((GeometryArrayRetained)this.retained).vertexFormat) &
(TEXTURE_COORDINATE_2 | TEXTURE_COORDINATE_4)) != 0)
throw new IllegalStateException(J3dI18N.getString("GeometryArray95"));
@@ -2908,7 +2908,7 @@ public abstract class GeometryArray extends Geometry {
if(!this.getCapability(ALLOW_TEXCOORD_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("GeometryArray42"));
- if (((((GeometryArrayRetained)this.retained).vertexFormat) &
+ if (((((GeometryArrayRetained)this.retained).vertexFormat) &
(TEXTURE_COORDINATE_2 | TEXTURE_COORDINATE_3)) != 0)
throw new IllegalStateException(J3dI18N.getString("GeometryArray109"));
@@ -3702,7 +3702,7 @@ public abstract class GeometryArray extends Geometry {
/**
* Gets the color associated with the vertex at
* the specified index for this object. The color is copied into the
- * specified array. The array must be large enough to hold all
+ * specified array. The array must be large enough to hold all
* of the colors.
* @param index source vertex index in this geometry array
* @param color destination array of 3 or 4 values that will receive the color
@@ -3886,7 +3886,7 @@ public abstract class GeometryArray extends Geometry {
* many colors as the array will hold are copied.
*
* @param index starting source vertex index in this geometry array
- * @param colors destination array of 3*n or 4*n values that will
+ * @param colors destination array of 3*n or 4*n values that will
* receive n new colors
* @exception CapabilityNotSetException if the appropriate capability is
* not set and this object is part of a live or compiled scene graph
@@ -3921,7 +3921,7 @@ public abstract class GeometryArray extends Geometry {
* many colors as the array will hold are copied.
*
* @param index starting source vertex index in this geometry array
- * @param colors destination array of 3*n or 4*n values that will
+ * @param colors destination array of 3*n or 4*n values that will
* receive new colors
* @exception CapabilityNotSetException if the appropriate capability is
* not set and this object is part of a live or compiled scene graph
@@ -5104,7 +5104,7 @@ public abstract class GeometryArray extends Geometry {
if (initialCoordIndex < 0)
throw new IllegalArgumentException(J3dI18N.getString("GeometryArray97"));
if ((format & BY_REFERENCE) == 0)
- throw new IllegalStateException(J3dI18N.getString("GeometryArray83"));
+ throw new IllegalStateException(J3dI18N.getString("GeometryArray83"));
if ((format & INTERLEAVED) != 0)
throw new IllegalStateException(J3dI18N.getString("GeometryArray84"));
@@ -5182,7 +5182,7 @@ public abstract class GeometryArray extends Geometry {
throw new IllegalArgumentException(J3dI18N.getString("GeometryArray97"));
int format = ((GeometryArrayRetained)this.retained).vertexFormat;
if ((format & BY_REFERENCE) == 0)
- throw new IllegalStateException(J3dI18N.getString("GeometryArray83"));
+ throw new IllegalStateException(J3dI18N.getString("GeometryArray83"));
if ((format & INTERLEAVED) != 0)
throw new IllegalStateException(J3dI18N.getString("GeometryArray84"));
@@ -5541,7 +5541,7 @@ public abstract class GeometryArray extends Geometry {
throw new CapabilityNotSetException(J3dI18N.getString("GeometryArray86"));
int format = ((GeometryArrayRetained)this.retained).vertexFormat;
-
+
if ((format & USE_NIO_BUFFER) == 0)
throw new IllegalStateException(J3dI18N.getString("GeometryArray118"));
@@ -5925,7 +5925,7 @@ public abstract class GeometryArray extends Geometry {
throw new IllegalStateException(J3dI18N.getString("GeometryArray84"));
((GeometryArrayRetained)this.retained).setColorRefBuffer(colors);
-
+
}
@@ -5955,7 +5955,7 @@ public abstract class GeometryArray extends Geometry {
if ((format & INTERLEAVED) != 0)
throw new IllegalStateException(J3dI18N.getString("GeometryArray84"));
- return ((GeometryArrayRetained)this.retained).getColorRefBuffer();
+ return ((GeometryArrayRetained)this.retained).getColorRefBuffer();
}
@@ -6474,7 +6474,7 @@ public abstract class GeometryArray extends Geometry {
if ((format & INTERLEAVED) != 0)
throw new IllegalStateException(J3dI18N.getString("GeometryArray84"));
- return ((GeometryArrayRetained)this.retained).getNormalRefBuffer();
+ return ((GeometryArrayRetained)this.retained).getNormalRefBuffer();
}
@@ -6631,9 +6631,9 @@ public abstract class GeometryArray extends Geometry {
* texture coordinate set to the
* specified buffer object. The buffer contains a java.nio.FloatBuffer
* object containing s,
- * t, and, optionally, r and q values for each
+ * t, and, optionally, r and q values for each
* vertex (for
- * a total of 2*n , 3*n or 4*n values,
+ * a total of 2*n , 3*n or 4*n values,
* where n is
* the number of vertices).
* If the texCoord buffer reference is null and texture
@@ -6735,7 +6735,7 @@ public abstract class GeometryArray extends Geometry {
if ((format & INTERLEAVED) != 0)
throw new IllegalStateException(J3dI18N.getString("GeometryArray84"));
- return ((GeometryArrayRetained)this.retained).getTexCoordRefBuffer(texCoordSet);
+ return ((GeometryArrayRetained)this.retained).getTexCoordRefBuffer(texCoordSet);
}
@@ -6743,9 +6743,9 @@ public abstract class GeometryArray extends Geometry {
* Sets the float texture coordinate array reference for the specified
* texture coordinate set to the
* specified array. The array contains floating-point s,
- * t, and, optionally, r and q values for each
+ * t, and, optionally, r and q values for each
* vertex (for
- * a total of 2*n , 3*n or 4*n values,
+ * a total of 2*n , 3*n or 4*n values,
* where n is
* the number of vertices). Only one of
* texCoordRefFloat
, texCoordRef2f
, or
diff --git a/src/classes/share/javax/media/j3d/GeometryArrayRetained.java b/src/classes/share/javax/media/j3d/GeometryArrayRetained.java
index 190029c..869a208 100644
--- a/src/classes/share/javax/media/j3d/GeometryArrayRetained.java
+++ b/src/classes/share/javax/media/j3d/GeometryArrayRetained.java
@@ -4660,7 +4660,7 @@ abstract class GeometryArrayRetained extends GeometryRetained{
this.vertexData[offset] = normal[0];
this.vertexData[offset+1] = normal[1];
this.vertexData[offset+2] = normal[2];
-
+
if(isLive) {
geomLock.unLock();
sendDataChangedMessage(false);
diff --git a/src/classes/share/javax/media/j3d/GeometryAtom.java b/src/classes/share/javax/media/j3d/GeometryAtom.java
index e7286db..7891ba1 100644
--- a/src/classes/share/javax/media/j3d/GeometryAtom.java
+++ b/src/classes/share/javax/media/j3d/GeometryAtom.java
@@ -39,21 +39,21 @@ import javax.vecmath.*;
*/
class GeometryAtom extends Object implements BHLeafInterface, NnuId {
-
+
/**
* Array of geometry components of this geometry atom
*/
// The first index of geometryArr should always be 0, unless geometryArr contains
// multiple Text3Ds.
GeometryRetained[] geometryArray = null;
-
+
/**
* Array of transforms used only for Text3d.
*/
Transform3D[] lastLocalTransformArray = null;
- /**
+ /**
* The locale that this geometry atom is attatched to. This is only non-null
* if this instance is directly linked into a locale.
*/
@@ -63,18 +63,18 @@ class GeometryAtom extends Object implements BHLeafInterface, NnuId {
* The mirror Shape3DRetained for this GeometryAtom.
*/
Shape3DRetained source = null;
-
+
/**
* The BHLeafNode for this GeometryAtom.
*/
- BHLeafNode bhLeafNode = null;
-
+ BHLeafNode bhLeafNode = null;
+
// true if alpha channel is editable
boolean alphaEditable;
-
+
// true if this ga is visible. Default is true.
boolean visible = true;
-
+
/**
* This is the original geometry type from which this atom came
*/
@@ -114,22 +114,22 @@ class GeometryAtom extends Object implements BHLeafInterface, NnuId {
return 0;
}
}
-
+
public BoundingBox computeBoundingHull() {
/*
- System.err.println("Bounds is " + source.vwcBounds);
+ System.err.println("Bounds is " + source.vwcBounds);
for(int i=0; ioriginalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
@@ -523,7 +523,7 @@ public class Group extends Node {
rt.children.clear();
}
-
+
/**
* Used to create a new instance of the node. This routine is called
* by cloneTree
to duplicate the current node.
@@ -555,6 +555,6 @@ public class Group extends Node {
*/
public Group() {
// set default read capabilities
- setDefaultReadCapabilities(readCapabilities);
+ setDefaultReadCapabilities(readCapabilities);
}
}
diff --git a/src/classes/share/javax/media/j3d/GroupRetained.java b/src/classes/share/javax/media/j3d/GroupRetained.java
index 860abfd..674d650 100644
--- a/src/classes/share/javax/media/j3d/GroupRetained.java
+++ b/src/classes/share/javax/media/j3d/GroupRetained.java
@@ -86,7 +86,7 @@ class GroupRetained extends NodeRetained implements BHLeafInterface {
// per shared path ordered path data
ArrayList orderedPaths = null;
-
+
/**
* If collisionBound is set, this is equal to the
* transformed collisionBounds, otherwise it is equal
@@ -111,7 +111,7 @@ class GroupRetained extends NodeRetained implements BHLeafInterface {
HashKey key;
/**
- * sourceNode of this mirror Group
+ * sourceNode of this mirror Group
*/
GroupRetained sourceNode;
@@ -138,7 +138,7 @@ class GroupRetained extends NodeRetained implements BHLeafInterface {
// > 0 if this group is being used in scoping
int scopingRefCount = 0;
-
+
ArrayList compiledChildrenList = null;
boolean isInClearLive = false;
@@ -165,7 +165,7 @@ class GroupRetained extends NodeRetained implements BHLeafInterface {
((BoundingSphere) localBounds).setRadius(-1.0);
}
}
-
+
/**
* Sets the collision bounds of a node.
* @param bounds the bounding object for the node
@@ -187,7 +187,7 @@ class GroupRetained extends NodeRetained implements BHLeafInterface {
VirtualUniverse.mc.processMessage(message);
}
- }
+ }
/**
@@ -196,8 +196,8 @@ class GroupRetained extends NodeRetained implements BHLeafInterface {
*/
Bounds getCollisionBounds() {
return (collisionBound == null ? null : (Bounds)collisionBound.clone());
- }
-
+ }
+
/**
* Replaces the specified child with the child provided.
* @param child the new child
@@ -210,7 +210,7 @@ class GroupRetained extends NodeRetained implements BHLeafInterface {
universe.resetWaitMCFlag();
synchronized (universe.sceneGraphLock) {
doSetChild(child, index);
- universe.setLiveState.clear();
+ universe.setLiveState.clear();
}
universe.waitForMC();
@@ -218,27 +218,27 @@ class GroupRetained extends NodeRetained implements BHLeafInterface {
doSetChild(child, index);
if (universe != null) {
synchronized (universe.sceneGraphLock) {
- universe.setLiveState.clear();
- }
+ universe.setLiveState.clear();
+ }
}
}
dirtyBoundsCache();
}
-
+
// The method that does the work once the lock is acquired.
void doSetChild(Node child, int index) {
NodeRetained oldchildr;
J3dMessage[] messages = null;
int numMessages = 0;
int attachStartIndex = 0;
-
+
// since we want to make sure the replacement of the child
// including removal of the oldChild and insertion of the newChild
// all happen in the same frame, we'll send all the necessary
// messages to masterControl for processing in one call.
// So let's first find out how many messages will be sent
-
+
oldchildr = (NodeRetained) children.get(index);
if (this.source.isLive()) {
@@ -275,7 +275,7 @@ class GroupRetained extends NodeRetained implements BHLeafInterface {
}
return;
}
-
+
if (this.source.isLive()) {
universe.notifyStructureChangeListeners(true, this.source, (BranchGroup)child);
}
@@ -294,7 +294,7 @@ class GroupRetained extends NodeRetained implements BHLeafInterface {
VirtualUniverse.mc.processMessage(messages);
}
}
-
+
/**
* Inserts the specified child at specified index.
* @param child the new child
@@ -308,20 +308,20 @@ class GroupRetained extends NodeRetained implements BHLeafInterface {
synchronized (universe.sceneGraphLock) {
universe.notifyStructureChangeListeners(true, this.source, (BranchGroup)child);
doInsertChild(child, index);
- universe.setLiveState.clear();
+ universe.setLiveState.clear();
}
universe.waitForMC();
} else {
doInsertChild(child, index);
if (universe != null) {
synchronized (universe.sceneGraphLock) {
- universe.setLiveState.clear();
- }
+ universe.setLiveState.clear();
+ }
}
}
dirtyBoundsCache();
}
-
+
// The method that does the work once the lock is acquired.
void doInsertChild(Node child, int index) {
int i;
@@ -332,12 +332,12 @@ class GroupRetained extends NodeRetained implements BHLeafInterface {
childi = (NodeRetained) children.get(i);
if(childi != null)
childi.childIndex++;
- }
+ }
if(child==null) {
children.add(index, null);
return;
}
-
+
NodeRetained childr = (NodeRetained) child.retained;
childr.setParent(this);
children.add(index, childr);
@@ -346,19 +346,19 @@ class GroupRetained extends NodeRetained implements BHLeafInterface {
((BranchGroupRetained)childr).isNew = true;
}
}
-
+
/**
* Removes the child at specified index.
* @param index which child to remove
*/
void removeChild(int index) {
-
+
if (this.source.isLive()) {
universe.resetWaitMCFlag();
synchronized (universe.sceneGraphLock) {
NodeRetained childr = (NodeRetained)children.get(index);
doRemoveChild(index, null, 0);
- universe.setLiveState.clear();
+ universe.setLiveState.clear();
universe.notifyStructureChangeListeners(false, this.source, (BranchGroup)childr.source);
}
universe.waitForMC();
@@ -366,20 +366,20 @@ class GroupRetained extends NodeRetained implements BHLeafInterface {
doRemoveChild(index, null, 0);
if (universe != null) {
synchronized (universe.sceneGraphLock) {
- universe.setLiveState.clear();
- }
+ universe.setLiveState.clear();
+ }
}
}
dirtyBoundsCache();
}
- /**
+ /**
* Returns the index of the specified Node in this Group's list of Nodes
* @param Node whose index is desired
* @return index of the Node
*/
int indexOfChild(Node child) {
- if(child != null)
+ if(child != null)
return children.indexOf((NodeRetained)child.retained);
else
return children.indexOf(null);
@@ -410,7 +410,7 @@ class GroupRetained extends NodeRetained implements BHLeafInterface {
void doRemoveChild(int index, J3dMessage messages[], int messageIndex) {
NodeRetained oldchildr, child;
int i;
-
+
oldchildr = (NodeRetained) children.get(index);
int size = children.size();
@@ -424,7 +424,7 @@ class GroupRetained extends NodeRetained implements BHLeafInterface {
oldchildr.setParent(null);
checkClearLive(oldchildr, messages, messageIndex, index, null);
}
-
+
children.remove(index);
removeChildrenData(index);
@@ -435,7 +435,7 @@ class GroupRetained extends NodeRetained implements BHLeafInterface {
}
}
-
+
/**
* Returns the child specified by the index.
* @param index which child to return
@@ -446,18 +446,18 @@ class GroupRetained extends NodeRetained implements BHLeafInterface {
SceneGraphObjectRetained sgo = (SceneGraphObjectRetained) children.get(index);
if(sgo == null)
return null;
- else
+ else
return (Node) sgo.source;
}
-
+
/**
* Returns an enumeration object of the children.
* @return an enumeration object of the children
- */
+ */
Enumeration getAllChildren() {
Vector userChildren=new Vector(children.size());
SceneGraphObjectRetained sgo;
-
+
for(int i=0; iBY_REFERENCE
.
*
- * @exception IllegalArgumentException if width
or
+ * @exception IllegalArgumentException if width
or
* height
of
* the subregion exceeds the dimension of the image of this object.
*
* @exception IllegalArgumentException if dstX
< 0, or
- * (dstX
+ width
) > width of this object, or
+ * (dstX
+ width
) > width of this object, or
* dstY
< 0, or
* (dstY
+ height
) > height of this object.
*
* @exception IllegalArgumentException if srcX
< 0, or
* (srcX
+ width
) > width of the RenderedImage
- * object containing the subimage, or
+ * object containing the subimage, or
* srcY
< 0, or
- * (srcY
+ height
) > height of the
+ * (srcY
+ height
) > height of the
* RenderedImage object containing the subimage.
*
* @exception IllegalArgumentException if the specified RenderedImage
- * is not compatible with the existing RenderedImage.
+ * is not compatible with the existing RenderedImage.
*
* @exception IllegalStateException if the image class is not one of:
* ImageClass.BUFFERED_IMAGE or ImageClass.RENDERED_IMAGE.
@@ -572,8 +572,8 @@ public class ImageComponent2D extends ImageComponent {
((dstX + width) > w) || ((dstY + height) > h)) {
throw new IllegalArgumentException(
J3dI18N.getString("ImageComponent2D3"));
- }
-
+ }
+
((ImageComponent2DRetained)this.retained).setSubImage(
image, width, height, srcX, srcY, dstX, dstY);
}
@@ -615,7 +615,7 @@ public class ImageComponent2D extends ImageComponent {
*
* @since Java 3D 1.3
*/
- public void updateData(Updater updater,
+ public void updateData(Updater updater,
int x, int y,
int width, int height) {
@@ -666,13 +666,13 @@ public class ImageComponent2D extends ImageComponent {
return img;
}
-
+
/**
- * Copies all node information from originalNodeComponent
+ * Copies all node information from originalNodeComponent
* into the current node. This method is called from the
* duplicateNode
method. This routine does
* the actual duplication of all "local data" (any data defined in
- * this object).
+ * this object).
*
* @param originalNodeComponent the original node to duplicate
* @param forceDuplicate when set to true
, causes the
diff --git a/src/classes/share/javax/media/j3d/ImageComponent2DRetained.java b/src/classes/share/javax/media/j3d/ImageComponent2DRetained.java
index 0591dbd..2e145e7 100644
--- a/src/classes/share/javax/media/j3d/ImageComponent2DRetained.java
+++ b/src/classes/share/javax/media/j3d/ImageComponent2DRetained.java
@@ -44,7 +44,7 @@ class ImageComponent2DRetained extends ImageComponentRetained {
ImageComponent2DRetained() {
}
-
+
/**
* This method handles NioImageBuffer
* Refers or copies the specified NioImageBuffer to this 2D image component object.
@@ -58,19 +58,19 @@ class ImageComponent2DRetained extends ImageComponentRetained {
int height = image.getHeight();
if (!byReference) {
- throw new IllegalArgumentException(J3dI18N.getString("ImageComponent2D7"));
+ throw new IllegalArgumentException(J3dI18N.getString("ImageComponent2D7"));
}
if (!yUp) {
- throw new IllegalArgumentException(J3dI18N.getString("ImageComponent2D8"));
+ throw new IllegalArgumentException(J3dI18N.getString("ImageComponent2D8"));
}
-
+
if (width != this.width) {
throw new IllegalArgumentException(J3dI18N.getString("ImageComponent2DRetained0"));
}
if (height != this.height) {
throw new IllegalArgumentException(J3dI18N.getString("ImageComponent2DRetained1"));
}
-
+
geomLock.getLock();
setImageClass(image);
@@ -85,27 +85,27 @@ class ImageComponent2DRetained extends ImageComponentRetained {
imageTypeIsSupported = isImageTypeSupported(image);
if (imageTypeIsSupported) {
-
+
/* Use reference when ( format is OK, Yup is true, and byRef is true). */
// Create image data object with the byRef image. */
imageData = createNioImageBufferDataObject(image);
-
+
} else {
// Handle abgrSupported is false case.
imageData = createNioImageBufferDataObject(null);
copyUnsupportedNioImageToImageData(image, 0, 0, 0, 0, width, height, imageData);
}
-
+
geomLock.unLock();
-
+
if (source.isLive()) {
// send a IMAGE_CHANGED message in order to
// notify all the users of the change
sendMessage(IMAGE_CHANGED, null);
}
}
-
+
/**
* This method handles both BufferedImage and RenderedImage
* Copies the specified RenderedImage to this 2D image component object.
@@ -114,46 +114,46 @@ class ImageComponent2DRetained extends ImageComponentRetained {
* ImageComponent2D object.
*/
void set(RenderedImage image) {
-
+
int width = image.getWidth();
int height = image.getHeight();
-
+
if (width != this.width) {
throw new IllegalArgumentException(J3dI18N.getString("ImageComponent2DRetained0"));
}
if (height != this.height) {
throw new IllegalArgumentException(J3dI18N.getString("ImageComponent2DRetained1"));
}
-
+
setImageClass(image);
-
- geomLock.getLock();
-
- if (byReference) {
- setRefImage(image,0);
+
+ geomLock.getLock();
+
+ if (byReference) {
+ setRefImage(image,0);
}
-
- // Reset this flag to true, incase it was set to false due to
+
+ // Reset this flag to true, incase it was set to false due to
// the previous image type.
abgrSupported = true;
-
+
imageTypeIsSupported = isImageTypeSupported(image);
-
+
if (imageTypeIsSupported) {
if (byReference && yUp) {
/* Use reference when ( format is OK, Yup is true, and byRef is true). */
// System.err.println("ImageComponent2DRetained.set() : (imageTypeSupported && byReference && yUp) --- (1)");
if (image instanceof BufferedImage) {
- // Create image data object with the byRef image. */
- imageData = createRenderedImageDataObject(image);
+ // Create image data object with the byRef image. */
+ imageData = createRenderedImageDataObject(image);
}
else {
// System.err.println("byRef and not BufferedImage !!!");
imageData = null;
}
- } else {
+ } else {
// Either not byRef or not yUp or not both
// System.err.println("ImageComponent2DRetained.set() : (imageTypeSupported && ((!byReference && yUp) || (imageTypeSupported && !yUp)) --- (2)");
@@ -172,10 +172,10 @@ class ImageComponent2DRetained extends ImageComponentRetained {
imageData = createRenderedImageDataObject(null);
copyUnsupportedImageToImageData(image, 0, imageData);
- }
-
+ }
+
geomLock.unLock();
-
+
if (source.isLive()) {
// send a IMAGE_CHANGED message in order to
// notify all the users of the change
@@ -183,12 +183,12 @@ class ImageComponent2DRetained extends ImageComponentRetained {
}
}
- void setSubImage(RenderedImage image, int width, int height,
+ void setSubImage(RenderedImage image, int width, int height,
int srcX, int srcY, int dstX, int dstY) {
if (!isSubImageTypeEqual(image)) {
throw new IllegalStateException(
- J3dI18N.getString("ImageComponent2D6"));
+ J3dI18N.getString("ImageComponent2D6"));
}
// Can't be byReference
@@ -197,7 +197,7 @@ class ImageComponent2DRetained extends ImageComponentRetained {
geomLock.getLock();
- if (imageTypeIsSupported) {
+ if (imageTypeIsSupported) {
// Either not byRef or not yUp or not both
// System.err.println("ImageComponent2DRetained.setSubImage() : (imageTypeSupported ) --- (1)");
if (image instanceof BufferedImage) {
@@ -211,12 +211,12 @@ class ImageComponent2DRetained extends ImageComponentRetained {
// TODO : Should look into borrow code from JAI to convert to right format.
// System.err.println("ImageComponent2DRetained.setSubImage() : (imageTypeSupported == false) --- (2)");
if (image instanceof BufferedImage) {
- copyUnsupportedImageToImageData((BufferedImage)image, srcX, srcY, dstX, dstY, 0, width, height, imageData);
+ copyUnsupportedImageToImageData((BufferedImage)image, srcX, srcY, dstX, dstY, 0, width, height, imageData);
}
else {
copyUnsupportedImageToImageData(image, srcX, srcY, dstX, dstY, 0, width, height, imageData);
}
- }
+ }
geomLock.unLock();
if (source.isLive()) {
@@ -235,23 +235,23 @@ class ImageComponent2DRetained extends ImageComponentRetained {
sendMessage(SUBIMAGE_CHANGED, info);
}
- }
-
+ }
+
/**
* Retrieves a copy of the image in this ImageComponent2D object.
* @return a new RenderedImage object created from the image in this
* ImageComponent2D object
*/
RenderedImage getImage() {
-
+
if (isByReference()) {
return (RenderedImage) getRefImage(0);
}
-
+
if(imageData != null) {
return imageData.createBufferedImage(0);
}
-
+
return null;
}
@@ -261,11 +261,11 @@ class ImageComponent2DRetained extends ImageComponentRetained {
NioImageBuffer getNioImage() {
if (getImageClass() != ImageComponent.ImageClass.NIO_IMAGE_BUFFER) {
- throw new IllegalStateException(J3dI18N.getString("ImageComponent2D9"));
+ throw new IllegalStateException(J3dI18N.getString("ImageComponent2D9"));
}
-
+
assert (byReference == true);
-
+
return (NioImageBuffer) getRefImage(0);
}
@@ -284,11 +284,11 @@ class ImageComponent2DRetained extends ImageComponentRetained {
Object refImage = getRefImage(0);
assert (refImage != null);
assert (imageData != null);
-
+
// Check is data copied internally.
if(!imageData.isDataByRef()) {
// update the internal copy of the image data if a copy has been
- // made
+ // made
if (imageTypeIsSupported) {
assert !(refImage instanceof NioImageBuffer);
@@ -298,7 +298,7 @@ class ImageComponent2DRetained extends ImageComponentRetained {
RenderedImage ri = (RenderedImage)refImage;
copySupportedImageToImageData(ri, (x + ri.getMinX()), (y + ri.getMinY()), x, y, 0, width, height, imageData);
}
- } else {
+ } else {
// image type is unsupported, need to create a supported local copy.
// TODO : Should look into borrow code from JAI to convert to right format.
if (refImage instanceof BufferedImage) {
@@ -315,10 +315,10 @@ class ImageComponent2DRetained extends ImageComponentRetained {
}
geomLock.unLock();
-
+
if (source.isLive()) {
- // send a SUBIMAGE_CHANGED message in order to
+ // send a SUBIMAGE_CHANGED message in order to
// notify all the users of the change
ImageComponentUpdateInfo info;
diff --git a/src/classes/share/javax/media/j3d/ImageComponent3D.java b/src/classes/share/javax/media/j3d/ImageComponent3D.java
index ae965db..af4221d 100644
--- a/src/classes/share/javax/media/j3d/ImageComponent3D.java
+++ b/src/classes/share/javax/media/j3d/ImageComponent3D.java
@@ -66,7 +66,7 @@ public class ImageComponent3D extends ImageComponent {
// non-public, no parameter constructor
ImageComponent3D() {}
-
+
/**
* Constructs a 3D image component object using the specified
* format, width, height, and depth. Default values are used for
@@ -110,7 +110,7 @@ public class ImageComponent3D extends ImageComponent {
* the width or height of the first image are not positive.
*/
public ImageComponent3D(int format, BufferedImage[] images) {
- ((ImageComponent3DRetained)this.retained).processParams(format,
+ ((ImageComponent3DRetained)this.retained).processParams(format,
images[0].getWidth(null), images[0].getHeight(null), images.length);
for (int i=0; iduplicateNode
method. This routine does
* the actual duplication of all "local data" (any data defined in
- * this object).
+ * this object).
*
* @param originalNodeComponent the original node to duplicate.
* @param forceDuplicate when set to true
, causes the
@@ -923,8 +923,8 @@ public class ImageComponent3D extends ImageComponent {
* @see Node#cloneTree
* @see NodeComponent#setDuplicateOnCloneTree
*/
- void duplicateAttributes(NodeComponent originalNodeComponent,
- boolean forceDuplicate) {
+ void duplicateAttributes(NodeComponent originalNodeComponent,
+ boolean forceDuplicate) {
super.duplicateAttributes(originalNodeComponent, forceDuplicate);
// TODO : Handle NioImageBuffer if its supported.
RenderedImage imgs[] = ((ImageComponent3DRetained)
diff --git a/src/classes/share/javax/media/j3d/ImageComponent3DRetained.java b/src/classes/share/javax/media/j3d/ImageComponent3DRetained.java
index 55247f7..0a1a9ea 100644
--- a/src/classes/share/javax/media/j3d/ImageComponent3DRetained.java
+++ b/src/classes/share/javax/media/j3d/ImageComponent3DRetained.java
@@ -62,16 +62,16 @@ class ImageComponent3DRetained extends ImageComponentRetained {
* ImageComponent3D object.
*/
void set(int index, BufferedImage image) {
-
- geomLock.getLock();
-
+
+ geomLock.getLock();
+
if(byReference) {
// Fix to issue 488.
- setRefImage(image, index);
+ setRefImage(image, index);
}
if(imageData == null) {
- // Only do this once, on the first image
+ // Only do this once, on the first image
// Reset this flag to true, incase it was set to false due to
// the previous image type.
abgrSupported = true;
@@ -83,7 +83,7 @@ class ImageComponent3DRetained extends ImageComponentRetained {
// TODO need to throw illegal state exception
}
}
-
+
if (imageTypeIsSupported) {
copySupportedImageToImageData(image, index, imageData);
} else {
@@ -91,17 +91,17 @@ class ImageComponent3DRetained extends ImageComponentRetained {
// TODO : borrow code from JAI to convert to right format.
copyUnsupportedImageToImageData(image, index, imageData);
- }
-
+ }
+
geomLock.unLock();
-
+
if (source.isLive()) {
// send a IMAGE_CHANGED message in order to
// notify all the users of the change
sendMessage(IMAGE_CHANGED, null);
- }
+ }
}
-
+
/**
* Copies the specified BufferedImage to this 3D image component
* object at the specified index.
@@ -112,81 +112,81 @@ class ImageComponent3DRetained extends ImageComponentRetained {
* ImageComponent3D object.
*
void set(int index, NioImageBuffer nioImage) {
-
+
int width = nioImage.getWidth();
int height = nioImage.getHeight();
-
+
if (!byReference) {
- throw new IllegalArgumentException(J3dI18N.getString("Need_New_Message_XXXXXImageComponent2D7"));
+ throw new IllegalArgumentException(J3dI18N.getString("Need_New_Message_XXXXXImageComponent2D7"));
}
if (!yUp) {
- throw new IllegalArgumentException(J3dI18N.getString("Need_New_Message_XXXXXImageComponent2D8"));
+ throw new IllegalArgumentException(J3dI18N.getString("Need_New_Message_XXXXXImageComponent2D8"));
}
-
+
if (width != this.width) {
throw new IllegalArgumentException(J3dI18N.getString("ImageComponent3D2"));
}
if (height != this.height) {
throw new IllegalArgumentException(J3dI18N.getString("ImageComponent3D4"));
}
-
+
geomLock.getLock();
-
+
setImageClass(nioImage);
-
- // This is a byRef image.
- setRefImage(nioImage,0);
+
+ // This is a byRef image.
+ setRefImage(nioImage,0);
if(imageData == null) {
- // Only do this once, on the first image
+ // Only do this once, on the first image
// Reset this flag to true, incase it was set to false due to
// the previous image type.
abgrSupported = true;
-
+
imageTypeIsSupported = isImageTypeSupported(nioImage);
-
+
// TODO : Need to handle null ....
imageData = createNioImageBufferDataObject(null);
}
else {
-
+
//if(getImageType() != evaluateImageType(image)) {
// TODO need to throw illegal state exception
//}
-
+
}
-
+
if (imageTypeIsSupported) {
- // TODO : Need to handle this ..... case ....
+ // TODO : Need to handle this ..... case ....
// copySupportedImageToImageData(image, index, imageData);
} else {
// System.err.println("Image format is unsupported -- illogical case");
throw new AssertionError();
- }
-
+ }
+
geomLock.unLock();
-
+
if (source.isLive()) {
// send a IMAGE_CHANGED message in order to
// notify all the users of the change
sendMessage(IMAGE_CHANGED, null);
- }
+ }
}
*/
-
+
void set(int index, RenderedImage image) {
-
+
int width = image.getWidth();
int height = image.getHeight();
-
+
if (width != this.width) {
throw new IllegalArgumentException(J3dI18N.getString("ImageComponent3D2"));
}
if (height != this.height) {
throw new IllegalArgumentException(J3dI18N.getString("ImageComponent3D4"));
}
-
+
if (image instanceof BufferedImage) {
set(index, ((BufferedImage)image));
}
@@ -210,7 +210,7 @@ class ImageComponent3DRetained extends ImageComponentRetained {
RenderedImage[] getRenderedImage() {
int i;
RenderedImage bi[] = new RenderedImage[depth];
-
+
if (!byReference) {
for (i=0; iduplicateNode
method. This routine does
* the actual duplication of all "local data" (any data defined in
- * this object).
+ * this object).
*
* @param originalNodeComponent the original node to duplicate.
* @param forceDuplicate when set to true
, causes the
@@ -1225,17 +1225,17 @@ public abstract class IndexedGeometryArray extends GeometryArray {
* @see Node#cloneTree
* @see NodeComponent#setDuplicateOnCloneTree
*/
- void duplicateAttributes(NodeComponent originalNodeComponent,
+ void duplicateAttributes(NodeComponent originalNodeComponent,
boolean forceDuplicate) {
super.duplicateAttributes(originalNodeComponent, forceDuplicate);
- // vertexFormat, vertexCount and indexCount are copied in
+ // vertexFormat, vertexCount and indexCount are copied in
// subclass when constructor
- // public IndexedGeometryArray(int vertexCount, int vertexFormat,
- // int indexCount)
+ // public IndexedGeometryArray(int vertexCount, int vertexFormat,
+ // int indexCount)
// is used in cloneNodeComponent()
- IndexedGeometryArrayRetained ga =
+ IndexedGeometryArrayRetained ga =
(IndexedGeometryArrayRetained) originalNodeComponent.retained;
- IndexedGeometryArrayRetained rt =
+ IndexedGeometryArrayRetained rt =
(IndexedGeometryArrayRetained) retained;
int vformat = ga.getVertexFormat();
diff --git a/src/classes/share/javax/media/j3d/IndexedGeometryArrayRetained.java b/src/classes/share/javax/media/j3d/IndexedGeometryArrayRetained.java
index 5bd9f36..8df03cd 100644
--- a/src/classes/share/javax/media/j3d/IndexedGeometryArrayRetained.java
+++ b/src/classes/share/javax/media/j3d/IndexedGeometryArrayRetained.java
@@ -135,7 +135,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
obj.cloneSourceArray = this;
obj.unIndexify(this);
obj.source=source;
-
+
return obj;
}
@@ -206,18 +206,18 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("IndexedGeometryArray23"));
}
break;
- case PD:
+ case PD:
if (doubleRefCoords != null && (3 * newMax >= doubleRefCoords.length)) {
throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("IndexedGeometryArray23"));
}
break;
- case P3F:
+ case P3F:
if (p3fRefCoords != null && (newMax >= p3fRefCoords.length)) {
throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("IndexedGeometryArray23"));
}
break;
- case P3D:
+ case P3D:
if (p3dRefCoords != null && (newMax >= p3dRefCoords.length)) {
throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("IndexedGeometryArray23"));
}
@@ -234,7 +234,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
}
}
- }
+ }
void doColorCheck(int newMax) {
// If the new Value is greater than the old value, make sure there is array length
@@ -242,14 +242,14 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
// Check to make sure that the array length defined by the user is ateast maxCoordIndex long
if ((vertexFormat & GeometryArray.COLOR) == 0)
return;
-
+
if ((vertexFormat & GeometryArray.BY_REFERENCE) == 0) {
if (newMax >= vertexCount) {
throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("IndexedGeometryArray24"));
}
}
else {
- int multiplier = getColorStride();
+ int multiplier = getColorStride();
if(( vertexFormat & GeometryArray.USE_NIO_BUFFER) != 0) {
if ((vertexFormat & GeometryArray.INTERLEAVED) == 0) {
@@ -257,12 +257,12 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
case CF:
if (floatBufferRefColors != null && multiplier * newMax >= floatBufferRefColors.limit()) {
throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("IndexedGeometryArray24"));
- }
+ }
break;
- case CUB:
+ case CUB:
if (byteBufferRefColors != null && multiplier * newMax >= byteBufferRefColors.limit()) {
throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("IndexedGeometryArray24"));
- }
+ }
break;
}
}
@@ -280,28 +280,28 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("IndexedGeometryArray24"));
}
break;
- case CUB:
+ case CUB:
if (byteRefColors != null && (multiplier * newMax >= byteRefColors.length)) {
throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("IndexedGeometryArray24"));
}
break;
- case C3F:
+ case C3F:
if (c3fRefColors != null && (newMax >= c3fRefColors.length)) {
throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("IndexedGeometryArray24"));
}
break;
- case C4F:
+ case C4F:
if (c4fRefColors != null && (newMax >= c4fRefColors.length)) {
throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("IndexedGeometryArray24"));
}
break;
- case C3UB:
+ case C3UB:
if (c3bRefColors != null && (newMax >= c3bRefColors.length)) {
throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("IndexedGeometryArray24"));
}
break;
- case C4UB:
+ case C4UB:
if (c4bRefColors != null && (newMax >= c4bRefColors.length)) {
throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("IndexedGeometryArray24"));
}
@@ -346,7 +346,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("IndexedGeometryArray26"));
}
}
- } else {
+ } else {
if ((vertexFormat & GeometryArray.INTERLEAVED) == 0) {
switch ((vertexType & NORMAL_DEFINED)) {
case NF:
@@ -354,7 +354,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("IndexedGeometryArray26"));
}
break;
- case N3F:
+ case N3F:
if (v3fRefNormals != null && (newMax >= v3fRefNormals.length)) {
throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("IndexedGeometryArray26"));
}
@@ -416,13 +416,13 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("IndexedGeometryArray25"));
}
break;
- case T2F:
+ case T2F:
if (refTexCoords[texCoordSet] != null && (newMax >= ((TexCoord2f[])refTexCoords[texCoordSet]).length)) {
throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("IndexedGeometryArray25"));
}
break;
- case T3F:
+ case T3F:
if (refTexCoords[texCoordSet] != null && (newMax >= ((TexCoord3f[])refTexCoords[texCoordSet]).length)) {
throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("IndexedGeometryArray25"));
}
@@ -507,9 +507,9 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
}
if ((vertexFormat & GeometryArray.NORMALS) != 0) {
maxNormalIndex = newMax;
- }
+ }
}
-
+
boolean isLive = source!=null && source.isLive();
if(isLive){
geomLock.getLock();
@@ -536,9 +536,9 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
if (dataValue < 0) {
// Throw an exception, since index is negative
throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("IndexedGeometryArray27"));
-
+
}
-
+
if (newMax == indices[index]) {
if (dataValue >= newMax) {
newMax = dataValue;
@@ -572,7 +572,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
if (newIndices[j] < 0) {
// Throw an exception, since index is negative
throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("IndexedGeometryArray27"));
-
+
}
if (indices[index+j] == maxIndex) {
if (newIndices[j] >= newMax) {
@@ -633,9 +633,9 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
}
if ((vertexFormat & GeometryArray.NORMALS) != 0) {
maxNormalIndex = newMax;
- }
+ }
}
-
+
boolean isLive = source!=null && source.isLive();
if(isLive){
geomLock.getLock();
@@ -726,8 +726,8 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
final void doPostUpdaterUpdate() {
// user may have called setCoordIndicesRef and/or
// changed contents of indexCoord array. Thus, need to
- // recompute maxCoordIndex unconditionally (and redundantly
- // if user had only invoked setCoordIndicesRef but not also
+ // recompute maxCoordIndex unconditionally (and redundantly
+ // if user had only invoked setCoordIndicesRef but not also
// changed contents). geomLock is currently locked.
// Option 1:
@@ -736,7 +736,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
// out too many sendDataChangedMessage(true) - occurs if updateData
// method is called rapidly.
// setCoordIndicesRef(indexCoord);
-
+
// Option 2:
// use only necessary code from setCoordIndicesRef
// System.err.println("IndexedGeometryArrayretained#doUpdaterUpdate");
@@ -744,7 +744,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
if (indexCoord != null) {
newMax = computeMaxIndexWithCheck(initialIndexIndex, validIndexCount, indexCoord);
- if (newMax > maxCoordIndex) {
+ if (newMax > maxCoordIndex) {
doErrorCheck(newMax);
}
}
@@ -765,9 +765,9 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
}
if ((vertexFormat & GeometryArray.NORMALS) != 0) {
maxNormalIndex = newMax;
- }
+ }
}
-
+
dirtyFlag |= INDEX_CHANGED;
maxCoordIndex = newMax;
}
@@ -791,7 +791,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
}
// No need to set INDEX_CHANGED since IndexBuffer
// is used only when USE_COORD_INDEX_ONLY specified.
- // In this case only coordinate index array is
+ // In this case only coordinate index array is
// considered.
this.indexColor[index] = colorIndex;
maxColorIndex = newMax;
@@ -990,7 +990,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
void setVertexAttrIndices(int vertexAttrNum,
int index,
int[] vertexAttrIndices) {
-
+
int i, j, num = vertexAttrIndices.length;
int [] indices = this.indexVertexAttr[vertexAttrNum];
@@ -1042,7 +1042,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
//NVaidya
/**
- * Returns a reference to the coordinate indices associated
+ * Returns a reference to the coordinate indices associated
* with the vertices
*/
final int[] getCoordIndicesRef() {
@@ -1157,7 +1157,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
}
- void execute(Canvas3D cv, RenderAtom ra, boolean isNonUniformScale,
+ void execute(Canvas3D cv, RenderAtom ra, boolean isNonUniformScale,
boolean updateAlpha, float alpha,
int screen, boolean ignoreVertexColors) {
@@ -1240,7 +1240,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
retVal = updateAlphaInInterLeavedData(cv, screen, alpha);
useAlpha = (retVal[0] == Boolean.TRUE);
cdata = (float[])retVal[1];
- if (alpha != lastScreenAlpha) {
+ if (alpha != lastScreenAlpha) {
lastScreenAlpha = alpha;
cdirty |= COLOR_CHANGED;
}
@@ -1283,11 +1283,11 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
(vertexType & VATTR_DEFINED) == 0) ||
(((vertexFormat& GeometryArray.TEXTURE_COORDINATE) != 0) &&
(vertexType & TEXCOORD_DEFINED) == 0)) {
- return;
+ return;
} else {
byte[] cbdata = null;
float[] cfdata = null;
-
+
if ((vertexType & (CF | C3F | C4F )) != 0) {
synchronized (this) {
cdirty = dirtyFlag;
@@ -1305,7 +1305,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
lastScreenAlpha = -1;
cdirty |= COLOR_CHANGED;
}
-
+
}
dirtyFlag = 0;
}
@@ -1332,7 +1332,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
} else {
cdirty = dirtyFlag;
}
-
+
int vdefined = 0;
if((vertexType & (PF | P3F)) != 0)
vdefined |= COORD_FLOAT;
@@ -1375,7 +1375,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
if ((vertexFormat & GeometryArray.INTERLEAVED) != 0) {
if( interleavedFloatBufferImpl == null)
return;
-
+
float[] cdata = null;
synchronized (this) {
@@ -1385,7 +1385,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
retVal = updateAlphaInInterLeavedData(cv, screen, alpha);
useAlpha = (retVal[0] == Boolean.TRUE);
cdata = (float[])retVal[1];
- if (alpha != lastScreenAlpha) {
+ if (alpha != lastScreenAlpha) {
lastScreenAlpha = alpha;
cdirty |= COLOR_CHANGED;
}
@@ -1398,7 +1398,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
}
dirtyFlag = 0;
}
-
+
Pipeline.getPipeline().executeIndexedGeometryBuffer(cv.ctx,
this, geoType, isNonUniformScale,
useAlpha,
@@ -1427,11 +1427,11 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
(vertexType & VATTR_DEFINED) == 0) ||
(((vertexFormat& GeometryArray.TEXTURE_COORDINATE) != 0) &&
(vertexType & TEXCOORD_DEFINED) == 0)) {
- return;
+ return;
} else {
byte[] cbdata = null;
float[] cfdata = null;
-
+
if ((vertexType & CF ) != 0) {
synchronized (this) {
cdirty = dirtyFlag;
@@ -1451,7 +1451,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
lastScreenAlpha = -1;
cdirty |= COLOR_CHANGED;
}
-
+
}
dirtyFlag = 0;
}
@@ -1482,7 +1482,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
}
Object vcoord = null, cdataBuffer=null, normal=null;
-
+
int vdefined = 0;
if((vertexType & PF) != 0) {
vdefined |= COORD_FLOAT;
@@ -1498,7 +1498,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
vdefined |= COLOR_BYTE;
cdataBuffer = byteBufferRefColors.getBufferAsObject();
}
-
+
if((vertexType & NORMAL_DEFINED) != 0) {
vdefined |= NORMAL_FLOAT;
normal = floatBufferRefNormals.getBufferAsObject();
@@ -1537,7 +1537,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
} // end of nio buffer
}
- void buildGA(Canvas3D cv, RenderAtom ra, boolean isNonUniformScale,
+ void buildGA(Canvas3D cv, RenderAtom ra, boolean isNonUniformScale,
boolean updateAlpha, float alpha, boolean ignoreVertexColors,
Transform3D xform, Transform3D nxform) {
int cdirty;
@@ -1548,7 +1548,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
ignoreVertexColors, xform, nxform);
}
else {
-
+
if ((vertexFormat & GeometryArray.BY_REFERENCE) == 0) {
float[] vdata;
// System.err.println("by-copy");
@@ -1603,7 +1603,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
// go into a display list.
}
}
-
+
void mergeGeometryArrays(ArrayList list) {
int numMerge = list.size();
int[] texCoord = null;
@@ -1641,11 +1641,11 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
for (int j = 0; j < curIndexCount; j++) {
indexCoord[j+curIndexOffset] = geo.indexCoord[j+geo.initialIndexIndex]+curDataOffset;
if (notUCIO) {
- if ((vertexFormat & GeometryArray.COLOR) != 0)
+ if ((vertexFormat & GeometryArray.COLOR) != 0)
indexColor[j+curIndexOffset] = geo.indexColor[j+geo.initialIndexIndex]+curDataOffset;
- if ((vertexFormat & GeometryArray.NORMALS) != 0)
+ if ((vertexFormat & GeometryArray.NORMALS) != 0)
indexNormal[j+curIndexOffset] = geo.indexNormal[j+geo.initialIndexIndex]+curDataOffset;
- if ((vertexFormat & GeometryArray.TEXTURE_COORDINATE) != 0)
+ if ((vertexFormat & GeometryArray.TEXTURE_COORDINATE) != 0)
texCoord[j+curIndexOffset] = geo.indexTexCoord[0][j+geo.initialIndexIndex]+curDataOffset;
}
}
@@ -1657,7 +1657,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
// reset the max Values
// call the super to merge the vertex data
- super.mergeGeometryArrays(list);
+ super.mergeGeometryArrays(list);
}
@@ -1674,7 +1674,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
return true;
}
-
+
/**
* Gets current number of indices
* @return indexCount
@@ -1693,7 +1693,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
}
}
return maxIndex;
-
+
}
//NVaidya
@@ -1709,7 +1709,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
}
}
return maxIndex;
-
+
}
void setValidIndexCount(int validIndexCount) {
@@ -1802,7 +1802,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
if (!inUpdater && isLive) {
sendDataChangedMessage(true);
}
-
+
}
void setInitialIndexIndex(int initialIndexIndex) {
@@ -1820,7 +1820,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
int newNormalIndex=0;
int[] newTexCoordIndex = null;
int[] newVertexAttrIndex = null;
-
+
newCoordMax = computeMaxIndex(initialIndexIndex, validIndexCount, indexCoord);
doErrorCheck(newCoordMax);
if ((vertexFormat & GeometryArray.USE_COORD_INDEX_ONLY) == 0) {
@@ -1850,7 +1850,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
doNormalCheck(newNormalIndex);
}
}
-
+
boolean isLive = source!=null && source.isLive();
if(isLive){
geomLock.getLock();
@@ -1899,7 +1899,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
int getInitialIndexIndex() {
return initialIndexIndex;
}
-
+
int getValidIndexCount() {
return validIndexCount;
}
diff --git a/src/classes/share/javax/media/j3d/IndexedGeometryStripArray.java b/src/classes/share/javax/media/j3d/IndexedGeometryStripArray.java
index 41a61f1..e449114 100644
--- a/src/classes/share/javax/media/j3d/IndexedGeometryStripArray.java
+++ b/src/classes/share/javax/media/j3d/IndexedGeometryStripArray.java
@@ -75,7 +75,7 @@ public abstract class IndexedGeometryStripArray extends IndexedGeometryArray {
int vertexFormat,
int indexCount,
int[] stripIndexCounts) {
-
+
super(vertexCount, vertexFormat, indexCount);
((IndexedGeometryStripArrayRetained)this.retained).
setStripIndexCounts(stripIndexCounts);
@@ -127,7 +127,7 @@ public abstract class IndexedGeometryStripArray extends IndexedGeometryArray {
int[] texCoordSetMap,
int indexCount,
int[] stripIndexCounts) {
-
+
super(vertexCount, vertexFormat,
texCoordSetCount, texCoordSetMap,
indexCount);
diff --git a/src/classes/share/javax/media/j3d/IndexedGeometryStripArrayRetained.java b/src/classes/share/javax/media/j3d/IndexedGeometryStripArrayRetained.java
index 544daf0..8becf30 100644
--- a/src/classes/share/javax/media/j3d/IndexedGeometryStripArrayRetained.java
+++ b/src/classes/share/javax/media/j3d/IndexedGeometryStripArrayRetained.java
@@ -71,16 +71,16 @@ abstract class IndexedGeometryStripArrayRetained extends IndexedGeometryArrayRet
}
}
}
-
- // Sum of all stripIndexCounts MUST be same as indexCount
- if ((initialIndexIndex + total) > indexCount)
+
+ // Sum of all stripIndexCounts MUST be same as indexCount
+ if ((initialIndexIndex + total) > indexCount)
throw new IllegalArgumentException(J3dI18N.getString("IndexedGeometryStripArrayRetained0"));
int newCoordMax =0;
int newColorIndex=0;
int newNormalIndex=0;
int[] newTexCoordIndex = null;
int[] newVertexAttrIndex = null;
-
+
newCoordMax = computeMaxIndex(initialIndexIndex, total, indexCoord);
doErrorCheck(newCoordMax);
if ((vertexFormat & GeometryArray.USE_COORD_INDEX_ONLY) == 0) {
@@ -211,12 +211,12 @@ abstract class IndexedGeometryStripArrayRetained extends IndexedGeometryArrayRet
int numMerge = list.size();
int numCount = 0;
int i, j;
-
+
for (i = 0; i < numMerge; i++) {
IndexedGeometryStripArrayRetained geo = (IndexedGeometryStripArrayRetained) list.get(i);
numCount += geo.stripIndexCounts.length;
}
-
+
stripIndexCounts = new int[numCount];
compileIndexLength = new int[numCount];
compileStripICOffset = new int[numMerge];
@@ -247,5 +247,5 @@ abstract class IndexedGeometryStripArrayRetained extends IndexedGeometryArrayRet
stripIndexCounts[i] = this.stripIndexCounts[coffset+1];
}
}
-
+
}
diff --git a/src/classes/share/javax/media/j3d/IndexedLineArray.java b/src/classes/share/javax/media/j3d/IndexedLineArray.java
index 10860cb..f994079 100644
--- a/src/classes/share/javax/media/j3d/IndexedLineArray.java
+++ b/src/classes/share/javax/media/j3d/IndexedLineArray.java
@@ -69,8 +69,8 @@ public class IndexedLineArray extends IndexedGeometryArray {
public IndexedLineArray(int vertexCount, int vertexFormat, int indexCount) {
super(vertexCount,vertexFormat, indexCount);
- if (vertexCount < 1)
- throw new IllegalArgumentException(J3dI18N.getString("IndexedLineArray0"));
+ if (vertexCount < 1)
+ throw new IllegalArgumentException(J3dI18N.getString("IndexedLineArray0"));
if (indexCount < 2 || ((indexCount%2) != 0))
throw new IllegalArgumentException(J3dI18N.getString("IndexedLineArray1"));
@@ -119,8 +119,8 @@ public class IndexedLineArray extends IndexedGeometryArray {
texCoordSetCount, texCoordSetMap,
indexCount);
- if (vertexCount < 1)
- throw new IllegalArgumentException(J3dI18N.getString("IndexedLineArray0"));
+ if (vertexCount < 1)
+ throw new IllegalArgumentException(J3dI18N.getString("IndexedLineArray0"));
if (indexCount < 2 || ((indexCount%2) != 0))
throw new IllegalArgumentException(J3dI18N.getString("IndexedLineArray1"));
@@ -176,8 +176,8 @@ public class IndexedLineArray extends IndexedGeometryArray {
vertexAttrCount, vertexAttrSizes,
indexCount);
- if (vertexCount < 1)
- throw new IllegalArgumentException(J3dI18N.getString("IndexedLineArray0"));
+ if (vertexCount < 1)
+ throw new IllegalArgumentException(J3dI18N.getString("IndexedLineArray0"));
if (indexCount < 2 || ((indexCount%2) != 0))
throw new IllegalArgumentException(J3dI18N.getString("IndexedLineArray1"));
diff --git a/src/classes/share/javax/media/j3d/IndexedLineArrayRetained.java b/src/classes/share/javax/media/j3d/IndexedLineArrayRetained.java
index 4a7408f..8bc049d 100644
--- a/src/classes/share/javax/media/j3d/IndexedLineArrayRetained.java
+++ b/src/classes/share/javax/media/j3d/IndexedLineArrayRetained.java
@@ -44,7 +44,7 @@ class IndexedLineArrayRetained extends IndexedGeometryArrayRetained {
IndexedLineArrayRetained() {
this.geoType = GEO_TYPE_INDEXED_LINE_SET;
}
-
+
boolean intersect(PickShape pickShape, PickInfo pickInfo, int flags, Point3d iPnt,
GeometryRetained geom, int geomIndex) {
Point3d pnts[] = new Point3d[2];
@@ -60,11 +60,11 @@ class IndexedLineArrayRetained extends IndexedGeometryArrayRetained {
pnts[0] = new Point3d();
pnts[1] = new Point3d();
int[] vtxIndexArr = new int[2];
-
+
switch (pickShape.getPickType()) {
case PickShape.PICKRAY:
PickRay pickRay= (PickRay) pickShape;
-
+
while (i < loopStopIndex) {
for(int k=0; k<2; k++) {
vtxIndexArr[k] = indexCoord[i];
@@ -99,7 +99,7 @@ class IndexedLineArrayRetained extends IndexedGeometryArrayRetained {
new Vector3d(pickSegment.end.x - pickSegment.start.x,
pickSegment.end.y - pickSegment.start.y,
pickSegment.end.z - pickSegment.start.z);
-
+
while (i < loopStopIndex) {
for(int k=0; k<2; k++) {
vtxIndexArr[k] = indexCoord[i];
@@ -132,7 +132,7 @@ class IndexedLineArrayRetained extends IndexedGeometryArrayRetained {
case PickShape.PICKBOUNDINGBOX:
BoundingBox bbox = (BoundingBox)
((PickBounds) pickShape).bounds;
-
+
while (i < loopStopIndex) {
for(int k=0; k<2; k++) {
vtxIndexArr[k] = indexCoord[i];
@@ -162,7 +162,7 @@ class IndexedLineArrayRetained extends IndexedGeometryArrayRetained {
case PickShape.PICKBOUNDINGSPHERE:
BoundingSphere bsphere = (BoundingSphere)
((PickBounds) pickShape).bounds;
-
+
while (i < loopStopIndex) {
for(int k=0; k<2; k++) {
vtxIndexArr[k] = indexCoord[i];
@@ -192,7 +192,7 @@ class IndexedLineArrayRetained extends IndexedGeometryArrayRetained {
case PickShape.PICKBOUNDINGPOLYTOPE:
BoundingPolytope bpolytope = (BoundingPolytope)
((PickBounds) pickShape).bounds;
-
+
while (i < loopStopIndex) {
for(int k=0; k<2; k++) {
vtxIndexArr[k] = indexCoord[i];
@@ -221,7 +221,7 @@ class IndexedLineArrayRetained extends IndexedGeometryArrayRetained {
break;
case PickShape.PICKCYLINDER:
PickCylinder pickCylinder= (PickCylinder) pickShape;
-
+
while (i < loopStopIndex) {
for(int k=0; k<2; k++) {
vtxIndexArr[k] = indexCoord[i];
@@ -250,7 +250,7 @@ class IndexedLineArrayRetained extends IndexedGeometryArrayRetained {
break;
case PickShape.PICKCONE:
PickCone pickCone= (PickCone) pickShape;
-
+
while (i < loopStopIndex) {
for(int k=0; k<2; k++) {
vtxIndexArr[k] = indexCoord[i];
@@ -283,7 +283,7 @@ class IndexedLineArrayRetained extends IndexedGeometryArrayRetained {
default:
throw new RuntimeException("PickShape not supported for intersection");
}
-
+
if (minDist < Double.MAX_VALUE) {
iPnt.x = x;
iPnt.y = y;
@@ -291,9 +291,9 @@ class IndexedLineArrayRetained extends IndexedGeometryArrayRetained {
return true;
}
return false;
-
+
}
-
+
boolean intersect(Point3d[] pnts) {
Point3d[] points = new Point3d[2];
Vector3d dir;
@@ -304,7 +304,7 @@ class IndexedLineArrayRetained extends IndexedGeometryArrayRetained {
int loopStopIndex = initialIndexIndex + validIndexCount;
points[0] = new Point3d();
points[1] = new Point3d();
-
+
switch (pnts.length) {
case 3: // Triangle/Quad , common case first
case 4:
@@ -349,11 +349,11 @@ class IndexedLineArrayRetained extends IndexedGeometryArrayRetained {
}
return false;
}
-
-
+
+
boolean intersect(Transform3D thisToOtherVworld,
GeometryRetained geom) {
-
+
Point3d[] pnts = new Point3d[2];
//NVaidya
// Bug 447: correction for loop indices
@@ -361,7 +361,7 @@ class IndexedLineArrayRetained extends IndexedGeometryArrayRetained {
int loopStopIndex = initialIndexIndex + validIndexCount;
pnts[0] = new Point3d();
pnts[1] = new Point3d();
-
+
while (i < loopStopIndex) {
getVertexData(indexCoord[i++], pnts[0]);
getVertexData(indexCoord[i++], pnts[1]);
@@ -373,7 +373,7 @@ class IndexedLineArrayRetained extends IndexedGeometryArrayRetained {
}
return false;
}
-
+
// the bounds argument is already transformed
boolean intersect(Bounds targetBound) {
Point3d[] pnts = new Point3d[2];
@@ -383,11 +383,11 @@ class IndexedLineArrayRetained extends IndexedGeometryArrayRetained {
int loopStopIndex = initialIndexIndex + validIndexCount;
pnts[0] = new Point3d();
pnts[1] = new Point3d();
-
+
switch(targetBound.getPickType()) {
case PickShape.PICKBOUNDINGBOX:
BoundingBox box = (BoundingBox) targetBound;
-
+
while(i < loopStopIndex) {
getVertexData(indexCoord[i++], pnts[0]);
getVertexData(indexCoord[i++], pnts[1]);
@@ -398,7 +398,7 @@ class IndexedLineArrayRetained extends IndexedGeometryArrayRetained {
break;
case PickShape.PICKBOUNDINGSPHERE:
BoundingSphere bsphere = (BoundingSphere) targetBound;
-
+
while(i < loopStopIndex) {
getVertexData(indexCoord[i++], pnts[0]);
getVertexData(indexCoord[i++], pnts[1]);
@@ -409,7 +409,7 @@ class IndexedLineArrayRetained extends IndexedGeometryArrayRetained {
break;
case PickShape.PICKBOUNDINGPOLYTOPE:
BoundingPolytope bpolytope = (BoundingPolytope) targetBound;
-
+
while(i < loopStopIndex) {
getVertexData(indexCoord[i++], pnts[0]);
getVertexData(indexCoord[i++], pnts[1]);
@@ -425,7 +425,7 @@ class IndexedLineArrayRetained extends IndexedGeometryArrayRetained {
return false;
}
- int getClassType() {
- return LINE_TYPE;
+ int getClassType() {
+ return LINE_TYPE;
}
}
diff --git a/src/classes/share/javax/media/j3d/IndexedLineStripArray.java b/src/classes/share/javax/media/j3d/IndexedLineStripArray.java
index 3b9f46a..bddaff6 100644
--- a/src/classes/share/javax/media/j3d/IndexedLineStripArray.java
+++ b/src/classes/share/javax/media/j3d/IndexedLineStripArray.java
@@ -82,8 +82,8 @@ public class IndexedLineStripArray extends IndexedGeometryStripArray {
super(vertexCount, vertexFormat, indexCount, stripIndexCounts);
- if (vertexCount < 1)
- throw new IllegalArgumentException(J3dI18N.getString("IndexedLineStripArray0"));
+ if (vertexCount < 1)
+ throw new IllegalArgumentException(J3dI18N.getString("IndexedLineStripArray0"));
if (indexCount < 2 )
throw new IllegalArgumentException(J3dI18N.getString("IndexedLineStripArray1"));
@@ -137,8 +137,8 @@ public class IndexedLineStripArray extends IndexedGeometryStripArray {
texCoordSetCount, texCoordSetMap,
indexCount, stripIndexCounts);
- if (vertexCount < 1)
- throw new IllegalArgumentException(J3dI18N.getString("IndexedLineStripArray0"));
+ if (vertexCount < 1)
+ throw new IllegalArgumentException(J3dI18N.getString("IndexedLineStripArray0"));
if (indexCount < 2 )
throw new IllegalArgumentException(J3dI18N.getString("IndexedLineStripArray1"));
@@ -199,8 +199,8 @@ public class IndexedLineStripArray extends IndexedGeometryStripArray {
vertexAttrCount, vertexAttrSizes,
indexCount, stripIndexCounts);
- if (vertexCount < 1)
- throw new IllegalArgumentException(J3dI18N.getString("IndexedLineStripArray0"));
+ if (vertexCount < 1)
+ throw new IllegalArgumentException(J3dI18N.getString("IndexedLineStripArray0"));
if (indexCount < 2 )
throw new IllegalArgumentException(J3dI18N.getString("IndexedLineStripArray1"));
diff --git a/src/classes/share/javax/media/j3d/IndexedLineStripArrayRetained.java b/src/classes/share/javax/media/j3d/IndexedLineStripArrayRetained.java
index a6f132f..5280c01 100644
--- a/src/classes/share/javax/media/j3d/IndexedLineStripArrayRetained.java
+++ b/src/classes/share/javax/media/j3d/IndexedLineStripArrayRetained.java
@@ -43,7 +43,7 @@ import java.lang.Math;
*/
class IndexedLineStripArrayRetained extends IndexedGeometryStripArrayRetained {
-
+
IndexedLineStripArrayRetained() {
geoType = GEO_TYPE_INDEXED_LINE_STRIP_SET;
}
@@ -57,10 +57,10 @@ class IndexedLineStripArrayRetained extends IndexedGeometryStripArrayRetained {
int scount, j, i = 0;
int count = 0;
int[] vtxIndexArr = new int[2];
-
+
pnts[0] = new Point3d();
pnts[1] = new Point3d();
-
+
switch (pickShape.getPickType()) {
case PickShape.PICKRAY:
PickRay pickRay= (PickRay) pickShape;
@@ -84,13 +84,13 @@ class IndexedLineStripArrayRetained extends IndexedGeometryStripArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
pnts[0].set(pnts[1]);
@@ -100,20 +100,20 @@ class IndexedLineStripArrayRetained extends IndexedGeometryStripArrayRetained {
break;
case PickShape.PICKSEGMENT:
PickSegment pickSegment = (PickSegment) pickShape;
- Vector3d dir =
- new Vector3d(pickSegment.end.x - pickSegment.start.x,
+ Vector3d dir =
+ new Vector3d(pickSegment.end.x - pickSegment.start.x,
pickSegment.end.y - pickSegment.start.y,
pickSegment.end.z - pickSegment.start.z);
-
- while (i < stripIndexCounts.length) {
+
+ while (i < stripIndexCounts.length) {
vtxIndexArr[0] = indexCoord[count];
getVertexData(indexCoord[count++], pnts[0]);
scount = stripIndexCounts[i++];
- for (j=1; j < scount; j++) {
+ for (j=1; j < scount; j++) {
vtxIndexArr[1] = indexCoord[count];
getVertexData(indexCoord[count++], pnts[1]);
if (intersectLineAndRay(pnts[0], pnts[1],
- pickSegment.start,
+ pickSegment.start,
dir, sdist, iPnt) &&
(sdist[0] <= 1.0)) {
if (flags == 0) {
@@ -125,13 +125,13 @@ class IndexedLineStripArrayRetained extends IndexedGeometryStripArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
pnts[0].set(pnts[1]);
@@ -140,14 +140,14 @@ class IndexedLineStripArrayRetained extends IndexedGeometryStripArrayRetained {
}
break;
case PickShape.PICKBOUNDINGBOX:
- BoundingBox bbox = (BoundingBox)
+ BoundingBox bbox = (BoundingBox)
((PickBounds) pickShape).bounds;
- while (i < stripIndexCounts.length) {
+ while (i < stripIndexCounts.length) {
vtxIndexArr[0] = indexCoord[count];
getVertexData(indexCoord[count++], pnts[0]);
scount = stripIndexCounts[i++];
- for (j=1; j < scount; j++) {
+ for (j=1; j < scount; j++) {
vtxIndexArr[1] = indexCoord[count];
getVertexData(indexCoord[count++], pnts[1]);
if (intersectBoundingBox(pnts, bbox, sdist, iPnt)) {
@@ -160,13 +160,13 @@ class IndexedLineStripArrayRetained extends IndexedGeometryStripArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
pnts[0].set(pnts[1]);
@@ -175,10 +175,10 @@ class IndexedLineStripArrayRetained extends IndexedGeometryStripArrayRetained {
}
break;
case PickShape.PICKBOUNDINGSPHERE:
- BoundingSphere bsphere = (BoundingSphere)
+ BoundingSphere bsphere = (BoundingSphere)
((PickBounds) pickShape).bounds;
- while (i < stripIndexCounts.length) {
+ while (i < stripIndexCounts.length) {
vtxIndexArr[0] = indexCoord[count];
getVertexData(indexCoord[count++], pnts[0]);
scount = stripIndexCounts[i++];
@@ -195,13 +195,13 @@ class IndexedLineStripArrayRetained extends IndexedGeometryStripArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
pnts[0].set(pnts[1]);
@@ -210,10 +210,10 @@ class IndexedLineStripArrayRetained extends IndexedGeometryStripArrayRetained {
}
break;
case PickShape.PICKBOUNDINGPOLYTOPE:
- BoundingPolytope bpolytope = (BoundingPolytope)
+ BoundingPolytope bpolytope = (BoundingPolytope)
((PickBounds) pickShape).bounds;
- while (i < stripIndexCounts.length) {
+ while (i < stripIndexCounts.length) {
vtxIndexArr[0] = indexCoord[count];
getVertexData(indexCoord[count++], pnts[0]);
scount = stripIndexCounts[i++];
@@ -230,13 +230,13 @@ class IndexedLineStripArrayRetained extends IndexedGeometryStripArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
pnts[0].set(pnts[1]);
@@ -247,7 +247,7 @@ class IndexedLineStripArrayRetained extends IndexedGeometryStripArrayRetained {
case PickShape.PICKCYLINDER:
PickCylinder pickCylinder= (PickCylinder) pickShape;
- while (i < stripIndexCounts.length) {
+ while (i < stripIndexCounts.length) {
vtxIndexArr[0] = indexCoord[count];
getVertexData(indexCoord[count++], pnts[0]);
scount = stripIndexCounts[i++];
@@ -264,13 +264,13 @@ class IndexedLineStripArrayRetained extends IndexedGeometryStripArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
pnts[0].set(pnts[1]);
@@ -281,7 +281,7 @@ class IndexedLineStripArrayRetained extends IndexedGeometryStripArrayRetained {
case PickShape.PICKCONE:
PickCone pickCone= (PickCone) pickShape;
- while (i < stripIndexCounts.length) {
+ while (i < stripIndexCounts.length) {
vtxIndexArr[0] = indexCoord[count];
getVertexData(indexCoord[count++], pnts[0]);
scount = stripIndexCounts[i++];
@@ -298,13 +298,13 @@ class IndexedLineStripArrayRetained extends IndexedGeometryStripArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
pnts[0].set(pnts[1]);
@@ -316,8 +316,8 @@ class IndexedLineStripArrayRetained extends IndexedGeometryStripArrayRetained {
// Should not happen since API already check for this
throw new IllegalArgumentException(J3dI18N.getString("IndexedLineStripArrayRetained0"));
default:
- throw new RuntimeException ("PickShape not supported for intersection");
- }
+ throw new RuntimeException ("PickShape not supported for intersection");
+ }
if (minDist < Double.MAX_VALUE) {
iPnt.x = x;
@@ -327,7 +327,7 @@ class IndexedLineStripArrayRetained extends IndexedGeometryStripArrayRetained {
}
return false;
}
-
+
// intersect pnts[] with every triangle in this object
boolean intersect(Point3d[] pnts) {
int i = 0;
@@ -336,10 +336,10 @@ class IndexedLineStripArrayRetained extends IndexedGeometryStripArrayRetained {
Point3d[] points = new Point3d[2];
double dist[] = new double[1];
Vector3d dir;
-
+
points[0] = new Point3d();
points[1] = new Point3d();
-
+
switch (pnts.length) {
case 3:
case 4: // Triangle, Quad
@@ -395,10 +395,10 @@ class IndexedLineStripArrayRetained extends IndexedGeometryStripArrayRetained {
}
break;
}
-
+
return false;
}
-
+
boolean intersect(Transform3D thisToOtherVworld,
GeometryRetained geom) {
int i = 0;
@@ -483,12 +483,12 @@ class IndexedLineStripArrayRetained extends IndexedGeometryStripArrayRetained {
break;
default:
throw new RuntimeException("Bounds not supported for intersection "
- + targetBound);
+ + targetBound);
}
return false;
}
- int getClassType() {
- return LINE_TYPE;
+ int getClassType() {
+ return LINE_TYPE;
}
}
diff --git a/src/classes/share/javax/media/j3d/IndexedObject.java b/src/classes/share/javax/media/j3d/IndexedObject.java
index d08fbf0..66e444d 100644
--- a/src/classes/share/javax/media/j3d/IndexedObject.java
+++ b/src/classes/share/javax/media/j3d/IndexedObject.java
@@ -52,7 +52,7 @@ abstract class IndexedObject extends Object {
int[][] listIdx;
abstract VirtualUniverse getVirtualUniverse();
-
+
synchronized int getIdxUsed(VirtualUniverse u) {
int idx = listIdx[2][0];
if (u == getVirtualUniverse()) {
@@ -63,10 +63,10 @@ abstract class IndexedObject extends Object {
void incIdxUsed() {
if (listIdx[2][0] == 0) {
- listIdx[2][0] = 1;
+ listIdx[2][0] = 1;
} else {
- listIdx[2][0] = 0;
- }
+ listIdx[2][0] = 0;
+ }
}
}
diff --git a/src/classes/share/javax/media/j3d/IndexedPointArray.java b/src/classes/share/javax/media/j3d/IndexedPointArray.java
index c4c9e1b..3b9423f 100644
--- a/src/classes/share/javax/media/j3d/IndexedPointArray.java
+++ b/src/classes/share/javax/media/j3d/IndexedPointArray.java
@@ -69,8 +69,8 @@ public class IndexedPointArray extends IndexedGeometryArray {
public IndexedPointArray(int vertexCount, int vertexFormat, int indexCount) {
super(vertexCount,vertexFormat, indexCount);
- if (vertexCount < 1)
- throw new IllegalArgumentException(J3dI18N.getString("IndexedPointArray0"));
+ if (vertexCount < 1)
+ throw new IllegalArgumentException(J3dI18N.getString("IndexedPointArray0"));
if (indexCount < 1 )
throw new IllegalArgumentException(J3dI18N.getString("IndexedPointArray1"));
@@ -118,8 +118,8 @@ public class IndexedPointArray extends IndexedGeometryArray {
texCoordSetCount, texCoordSetMap,
indexCount);
- if (vertexCount < 1)
- throw new IllegalArgumentException(J3dI18N.getString("IndexedPointArray0"));
+ if (vertexCount < 1)
+ throw new IllegalArgumentException(J3dI18N.getString("IndexedPointArray0"));
if (indexCount < 1 )
throw new IllegalArgumentException(J3dI18N.getString("IndexedPointArray1"));
@@ -174,8 +174,8 @@ public class IndexedPointArray extends IndexedGeometryArray {
vertexAttrCount, vertexAttrSizes,
indexCount);
- if (vertexCount < 1)
- throw new IllegalArgumentException(J3dI18N.getString("IndexedPointArray0"));
+ if (vertexCount < 1)
+ throw new IllegalArgumentException(J3dI18N.getString("IndexedPointArray0"));
if (indexCount < 1 )
throw new IllegalArgumentException(J3dI18N.getString("IndexedPointArray1"));
diff --git a/src/classes/share/javax/media/j3d/IndexedPointArrayRetained.java b/src/classes/share/javax/media/j3d/IndexedPointArrayRetained.java
index b60a8c1..befe726 100644
--- a/src/classes/share/javax/media/j3d/IndexedPointArrayRetained.java
+++ b/src/classes/share/javax/media/j3d/IndexedPointArrayRetained.java
@@ -42,7 +42,7 @@ class IndexedPointArrayRetained extends IndexedGeometryArrayRetained {
IndexedPointArrayRetained() {
this.geoType = GEO_TYPE_INDEXED_POINT_SET;
- }
+ }
boolean intersect(PickShape pickShape, PickInfo pickInfo, int flags, Point3d iPnt,
GeometryRetained geom, int geomIndex) {
@@ -54,7 +54,7 @@ class IndexedPointArrayRetained extends IndexedGeometryArrayRetained {
int i = ((vertexFormat & GeometryArray.BY_REFERENCE) == 0 ?
initialVertexIndex : initialCoordIndex);
-
+
switch (pickShape.getPickType()) {
case PickShape.PICKRAY:
PickRay pickRay= (PickRay) pickShape;
@@ -73,28 +73,28 @@ class IndexedPointArrayRetained extends IndexedGeometryArrayRetained {
y = pnt.y;
z = pnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
break;
case PickShape.PICKSEGMENT:
PickSegment pickSegment = (PickSegment) pickShape;
- Vector3d dir =
- new Vector3d(pickSegment.end.x - pickSegment.start.x,
+ Vector3d dir =
+ new Vector3d(pickSegment.end.x - pickSegment.start.x,
pickSegment.end.y - pickSegment.start.y,
pickSegment.end.z - pickSegment.start.z);
-
+
while (i < validVertexCount) {
vtxIndexArr[0] = indexCoord[i];
getVertexData(indexCoord[i++], pnt);
- if (intersectPntAndRay(pnt, pickSegment.start,
+ if (intersectPntAndRay(pnt, pickSegment.start,
dir, sdist) &&
(sdist[0] <= 1.0)) {
if (flags == 0) {
@@ -106,13 +106,13 @@ class IndexedPointArrayRetained extends IndexedGeometryArrayRetained {
y = pnt.y;
z = pnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
@@ -136,13 +136,13 @@ class IndexedPointArrayRetained extends IndexedGeometryArrayRetained {
y = pnt.y;
z = pnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
@@ -163,13 +163,13 @@ class IndexedPointArrayRetained extends IndexedGeometryArrayRetained {
y = pnt.y;
z = pnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
@@ -190,13 +190,13 @@ class IndexedPointArrayRetained extends IndexedGeometryArrayRetained {
y = pnt.y;
z = pnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
@@ -205,8 +205,8 @@ class IndexedPointArrayRetained extends IndexedGeometryArrayRetained {
// Should not happen since API already check for this
throw new IllegalArgumentException(J3dI18N.getString("IndexedPointArrayRetained0"));
default:
- throw new RuntimeException ("PickShape not supported for intersection");
- }
+ throw new RuntimeException ("PickShape not supported for intersection");
+ }
if (minDist < Double.MAX_VALUE) {
iPnt.x = x;
@@ -221,12 +221,12 @@ class IndexedPointArrayRetained extends IndexedGeometryArrayRetained {
Point3d point = new Point3d();
int i = ((vertexFormat & GeometryArray.BY_REFERENCE) == 0 ?
initialVertexIndex : initialCoordIndex);
-
+
switch (pnts.length) {
case 3: // Triangle
while (i < validVertexCount) {
getVertexData(indexCoord[i++], point);
- if (intersectTriPnt(pnts[0], pnts[1], pnts[2], point)) {
+ if (intersectTriPnt(pnts[0], pnts[1], pnts[2], point)) {
return true;
}
}
@@ -234,8 +234,8 @@ class IndexedPointArrayRetained extends IndexedGeometryArrayRetained {
case 4: // Quad
while (i < validVertexCount) {
getVertexData(indexCoord[i++], point);
- if (intersectTriPnt(pnts[0], pnts[1], pnts[2], point) ||
- intersectTriPnt(pnts[0], pnts[2], pnts[3], point)) {
+ if (intersectTriPnt(pnts[0], pnts[1], pnts[2], point) ||
+ intersectTriPnt(pnts[0], pnts[2], pnts[3], point)) {
return true;
}
}
@@ -258,8 +258,8 @@ class IndexedPointArrayRetained extends IndexedGeometryArrayRetained {
case 1: // Point
while (i < validVertexCount) {
getVertexData(indexCoord[i++], point);
- if ((pnts[0].x == point.x) &&
- (pnts[0].y == point.y) &&
+ if ((pnts[0].x == point.x) &&
+ (pnts[0].y == point.y) &&
(pnts[0].z == point.z)) {
return true;
}
@@ -284,7 +284,7 @@ class IndexedPointArrayRetained extends IndexedGeometryArrayRetained {
}
}
return false;
-
+
}
// the bounds argument is already transformed
@@ -292,7 +292,7 @@ class IndexedPointArrayRetained extends IndexedGeometryArrayRetained {
int i = ((vertexFormat & GeometryArray.BY_REFERENCE) == 0 ?
initialVertexIndex : initialCoordIndex);
Point3d pnt = new Point3d();
-
+
while (i < validVertexCount) {
getVertexData(indexCoord[i++], pnt);
if (targetBound.intersect(pnt)) {
@@ -300,10 +300,10 @@ class IndexedPointArrayRetained extends IndexedGeometryArrayRetained {
}
}
return false;
- }
+ }
- int getClassType() {
- return POINT_TYPE;
+ int getClassType() {
+ return POINT_TYPE;
}
}
diff --git a/src/classes/share/javax/media/j3d/IndexedQuadArray.java b/src/classes/share/javax/media/j3d/IndexedQuadArray.java
index 7447f05..d524ae4 100644
--- a/src/classes/share/javax/media/j3d/IndexedQuadArray.java
+++ b/src/classes/share/javax/media/j3d/IndexedQuadArray.java
@@ -71,8 +71,8 @@ public class IndexedQuadArray extends IndexedGeometryArray {
public IndexedQuadArray(int vertexCount, int vertexFormat, int indexCount) {
super(vertexCount,vertexFormat, indexCount);
- if (vertexCount < 1)
- throw new IllegalArgumentException(J3dI18N.getString("IndexedQuadArray0"));
+ if (vertexCount < 1)
+ throw new IllegalArgumentException(J3dI18N.getString("IndexedQuadArray0"));
if (indexCount < 4 || ((indexCount%4) != 0))
throw new IllegalArgumentException(J3dI18N.getString("IndexedQuadArray1"));
@@ -121,8 +121,8 @@ public class IndexedQuadArray extends IndexedGeometryArray {
texCoordSetCount, texCoordSetMap,
indexCount);
- if (vertexCount < 1)
- throw new IllegalArgumentException(J3dI18N.getString("IndexedQuadArray0"));
+ if (vertexCount < 1)
+ throw new IllegalArgumentException(J3dI18N.getString("IndexedQuadArray0"));
if (indexCount < 4 || ((indexCount%4) != 0))
throw new IllegalArgumentException(J3dI18N.getString("IndexedQuadArray1"));
@@ -178,8 +178,8 @@ public class IndexedQuadArray extends IndexedGeometryArray {
vertexAttrCount, vertexAttrSizes,
indexCount);
- if (vertexCount < 1)
- throw new IllegalArgumentException(J3dI18N.getString("IndexedQuadArray0"));
+ if (vertexCount < 1)
+ throw new IllegalArgumentException(J3dI18N.getString("IndexedQuadArray0"));
if (indexCount < 4 || ((indexCount%4) != 0))
throw new IllegalArgumentException(J3dI18N.getString("IndexedQuadArray1"));
@@ -194,7 +194,7 @@ public class IndexedQuadArray extends IndexedGeometryArray {
this.retained.setSource(this);
}
-
+
/**
* @deprecated replaced with cloneNodeComponent(boolean forceDuplicate)
*/
diff --git a/src/classes/share/javax/media/j3d/IndexedQuadArrayRetained.java b/src/classes/share/javax/media/j3d/IndexedQuadArrayRetained.java
index a9ab1a7..30e29bd 100644
--- a/src/classes/share/javax/media/j3d/IndexedQuadArrayRetained.java
+++ b/src/classes/share/javax/media/j3d/IndexedQuadArrayRetained.java
@@ -41,7 +41,7 @@ import java.lang.Math;
*/
class IndexedQuadArrayRetained extends IndexedGeometryArrayRetained {
-
+
IndexedQuadArrayRetained() {
this.geoType = GEO_TYPE_INDEXED_QUAD_SET;
}
@@ -53,7 +53,7 @@ class IndexedQuadArrayRetained extends IndexedGeometryArrayRetained {
double minDist = Double.MAX_VALUE;
double x = 0, y = 0, z = 0;
int[] vtxIndexArr = new int[4];
-
+
//NVaidya
// Bug 447: While loops below now traverse over all
// elements in the valid index range from initialIndexIndex
@@ -64,7 +64,7 @@ class IndexedQuadArrayRetained extends IndexedGeometryArrayRetained {
pnts[1] = new Point3d();
pnts[2] = new Point3d();
pnts[3] = new Point3d();
-
+
switch (pickShape.getPickType()) {
case PickShape.PICKRAY:
PickRay pickRay= (PickRay) pickShape;
@@ -84,13 +84,13 @@ class IndexedQuadArrayRetained extends IndexedGeometryArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
@@ -114,19 +114,19 @@ class IndexedQuadArrayRetained extends IndexedGeometryArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
break;
case PickShape.PICKBOUNDINGBOX:
- BoundingBox bbox = (BoundingBox)
+ BoundingBox bbox = (BoundingBox)
((PickBounds) pickShape).bounds;
while (i < loopStopIndex) {
for(int j=0; j<4; j++) {
@@ -143,19 +143,19 @@ class IndexedQuadArrayRetained extends IndexedGeometryArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
break;
case PickShape.PICKBOUNDINGSPHERE:
- BoundingSphere bsphere = (BoundingSphere)
+ BoundingSphere bsphere = (BoundingSphere)
((PickBounds) pickShape).bounds;
while (i < loopStopIndex) {
for(int j=0; j<4; j++) {
@@ -172,19 +172,19 @@ class IndexedQuadArrayRetained extends IndexedGeometryArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
break;
case PickShape.PICKBOUNDINGPOLYTOPE:
- BoundingPolytope bpolytope = (BoundingPolytope)
+ BoundingPolytope bpolytope = (BoundingPolytope)
((PickBounds) pickShape).bounds;
while (i < loopStopIndex) {
for(int j=0; j<4; j++) {
@@ -201,13 +201,13 @@ class IndexedQuadArrayRetained extends IndexedGeometryArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
@@ -229,13 +229,13 @@ class IndexedQuadArrayRetained extends IndexedGeometryArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
@@ -257,13 +257,13 @@ class IndexedQuadArrayRetained extends IndexedGeometryArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
@@ -272,8 +272,8 @@ class IndexedQuadArrayRetained extends IndexedGeometryArrayRetained {
// Should not happen since API already check for this
throw new IllegalArgumentException(J3dI18N.getString("IndexedQuadArrayRetained0"));
default:
- throw new RuntimeException("PickShape not supported for intersection ");
- }
+ throw new RuntimeException("PickShape not supported for intersection ");
+ }
if (minDist < Double.MAX_VALUE) {
iPnt.x = x;
@@ -282,8 +282,8 @@ class IndexedQuadArrayRetained extends IndexedGeometryArrayRetained {
return true;
}
return false;
-
- }
+
+ }
// intersect pnts[] with every quad in this object
boolean intersect(Point3d[] pnts) {
@@ -293,19 +293,19 @@ class IndexedQuadArrayRetained extends IndexedGeometryArrayRetained {
// Bug 447: correction for loop indices
int i = initialIndexIndex;
int loopStopIndex = initialIndexIndex + validIndexCount;
-
+
points[0] = new Point3d();
points[1] = new Point3d();
points[2] = new Point3d();
points[3] = new Point3d();
-
+
switch (pnts.length) {
case 3: // Triangle
while (i < loopStopIndex) {
- getVertexData(indexCoord[i++], points[0]);
- getVertexData(indexCoord[i++], points[1]);
- getVertexData(indexCoord[i++], points[2]);
- getVertexData(indexCoord[i++], points[3]);
+ getVertexData(indexCoord[i++], points[0]);
+ getVertexData(indexCoord[i++], points[1]);
+ getVertexData(indexCoord[i++], points[2]);
+ getVertexData(indexCoord[i++], points[3]);
if (intersectTriTri(points[0], points[1], points[2],
pnts[0], pnts[1], pnts[2]) ||
intersectTriTri(points[0], points[2], points[3],
@@ -316,10 +316,10 @@ class IndexedQuadArrayRetained extends IndexedGeometryArrayRetained {
break;
case 4: // Quad
while (i < loopStopIndex) {
- getVertexData(indexCoord[i++], points[0]);
- getVertexData(indexCoord[i++], points[1]);
- getVertexData(indexCoord[i++], points[2]);
- getVertexData(indexCoord[i++], points[3]);
+ getVertexData(indexCoord[i++], points[0]);
+ getVertexData(indexCoord[i++], points[1]);
+ getVertexData(indexCoord[i++], points[2]);
+ getVertexData(indexCoord[i++], points[3]);
if (intersectTriTri(points[0], points[1], points[2],
pnts[0], pnts[1], pnts[2]) ||
intersectTriTri(points[0], points[1], points[2],
@@ -334,10 +334,10 @@ class IndexedQuadArrayRetained extends IndexedGeometryArrayRetained {
break;
case 2: // Line
while (i < loopStopIndex) {
- getVertexData(indexCoord[i++], points[0]);
- getVertexData(indexCoord[i++], points[1]);
- getVertexData(indexCoord[i++], points[2]);
- getVertexData(indexCoord[i++], points[3]);
+ getVertexData(indexCoord[i++], points[0]);
+ getVertexData(indexCoord[i++], points[1]);
+ getVertexData(indexCoord[i++], points[2]);
+ getVertexData(indexCoord[i++], points[3]);
if (intersectSegment(points, pnts[0], pnts[1], dist,
null)) {
return true;
@@ -346,10 +346,10 @@ class IndexedQuadArrayRetained extends IndexedGeometryArrayRetained {
break;
case 1: // Point
while (i < loopStopIndex) {
- getVertexData(indexCoord[i++], points[0]);
- getVertexData(indexCoord[i++], points[1]);
- getVertexData(indexCoord[i++], points[2]);
- getVertexData(indexCoord[i++], points[3]);
+ getVertexData(indexCoord[i++], points[0]);
+ getVertexData(indexCoord[i++], points[1]);
+ getVertexData(indexCoord[i++], points[2]);
+ getVertexData(indexCoord[i++], points[3]);
if (intersectTriPnt(points[0], points[1], points[2],
pnts[0]) ||
intersectTriPnt(points[0], points[2], points[3],
@@ -361,9 +361,9 @@ class IndexedQuadArrayRetained extends IndexedGeometryArrayRetained {
}
return false;
}
-
- boolean intersect(Transform3D thisToOtherVworld,
+
+ boolean intersect(Transform3D thisToOtherVworld,
GeometryRetained geom) {
Point3d[] points = new Point3d[4];
@@ -371,17 +371,17 @@ class IndexedQuadArrayRetained extends IndexedGeometryArrayRetained {
// Bug 447: correction for loop indices
int i = initialIndexIndex;
int loopStopIndex = initialIndexIndex + validIndexCount;
-
+
points[0] = new Point3d();
points[1] = new Point3d();
points[2] = new Point3d();
points[3] = new Point3d();
-
+
while (i < loopStopIndex) {
- getVertexData(indexCoord[i++], points[0]);
- getVertexData(indexCoord[i++], points[1]);
- getVertexData(indexCoord[i++], points[2]);
- getVertexData(indexCoord[i++], points[3]);
+ getVertexData(indexCoord[i++], points[0]);
+ getVertexData(indexCoord[i++], points[1]);
+ getVertexData(indexCoord[i++], points[2]);
+ getVertexData(indexCoord[i++], points[3]);
thisToOtherVworld.transform(points[0]);
thisToOtherVworld.transform(points[1]);
thisToOtherVworld.transform(points[2]);
@@ -400,7 +400,7 @@ class IndexedQuadArrayRetained extends IndexedGeometryArrayRetained {
// Bug 447: correction for loop indices
int i = initialIndexIndex;
int loopStopIndex = initialIndexIndex + validIndexCount;
-
+
points[0] = new Point3d();
points[1] = new Point3d();
points[2] = new Point3d();
@@ -411,10 +411,10 @@ class IndexedQuadArrayRetained extends IndexedGeometryArrayRetained {
BoundingBox box = (BoundingBox) targetBound;
while (i < loopStopIndex) {
- getVertexData(indexCoord[i++], points[0]);
- getVertexData(indexCoord[i++], points[1]);
- getVertexData(indexCoord[i++], points[2]);
- getVertexData(indexCoord[i++], points[3]);
+ getVertexData(indexCoord[i++], points[0]);
+ getVertexData(indexCoord[i++], points[1]);
+ getVertexData(indexCoord[i++], points[2]);
+ getVertexData(indexCoord[i++], points[3]);
if (intersectBoundingBox(points, box, null, null)) {
return true;
}
@@ -424,10 +424,10 @@ class IndexedQuadArrayRetained extends IndexedGeometryArrayRetained {
BoundingSphere bsphere = (BoundingSphere) targetBound;
while (i < loopStopIndex) {
- getVertexData(indexCoord[i++], points[0]);
- getVertexData(indexCoord[i++], points[1]);
- getVertexData(indexCoord[i++], points[2]);
- getVertexData(indexCoord[i++], points[3]);
+ getVertexData(indexCoord[i++], points[0]);
+ getVertexData(indexCoord[i++], points[1]);
+ getVertexData(indexCoord[i++], points[2]);
+ getVertexData(indexCoord[i++], points[3]);
if (intersectBoundingSphere(points, bsphere, null,
null)) {
return true;
@@ -437,10 +437,10 @@ class IndexedQuadArrayRetained extends IndexedGeometryArrayRetained {
case PickShape.PICKBOUNDINGPOLYTOPE:
BoundingPolytope bpolytope = (BoundingPolytope) targetBound;
while (i < loopStopIndex) {
- getVertexData(indexCoord[i++], points[0]);
- getVertexData(indexCoord[i++], points[1]);
- getVertexData(indexCoord[i++], points[2]);
- getVertexData(indexCoord[i++], points[3]);
+ getVertexData(indexCoord[i++], points[0]);
+ getVertexData(indexCoord[i++], points[1]);
+ getVertexData(indexCoord[i++], points[2]);
+ getVertexData(indexCoord[i++], points[3]);
if (intersectBoundingPolytope(points, bpolytope, null, null)) {
return true;
}
@@ -448,11 +448,11 @@ class IndexedQuadArrayRetained extends IndexedGeometryArrayRetained {
break;
default:
throw new RuntimeException("Bounds not supported for intersection "
- + targetBound);
+ + targetBound);
}
return false;
}
-
+
int getClassType() {
return QUAD_TYPE;
diff --git a/src/classes/share/javax/media/j3d/IndexedTriangleArray.java b/src/classes/share/javax/media/j3d/IndexedTriangleArray.java
index b189b69..aba5b61 100644
--- a/src/classes/share/javax/media/j3d/IndexedTriangleArray.java
+++ b/src/classes/share/javax/media/j3d/IndexedTriangleArray.java
@@ -71,8 +71,8 @@ public class IndexedTriangleArray extends IndexedGeometryArray {
public IndexedTriangleArray(int vertexCount, int vertexFormat, int indexCount) {
super(vertexCount,vertexFormat, indexCount);
- if (vertexCount < 1)
- throw new IllegalArgumentException(J3dI18N.getString("IndexedTriangleArray0"));
+ if (vertexCount < 1)
+ throw new IllegalArgumentException(J3dI18N.getString("IndexedTriangleArray0"));
if (indexCount < 3 || ((indexCount%3) != 0))
throw new IllegalArgumentException(J3dI18N.getString("IndexedTriangleArray1"));
@@ -121,8 +121,8 @@ public class IndexedTriangleArray extends IndexedGeometryArray {
texCoordSetCount, texCoordSetMap,
indexCount);
- if (vertexCount < 1)
- throw new IllegalArgumentException(J3dI18N.getString("IndexedTriangleArray0"));
+ if (vertexCount < 1)
+ throw new IllegalArgumentException(J3dI18N.getString("IndexedTriangleArray0"));
if (indexCount < 3 || ((indexCount%3) != 0))
throw new IllegalArgumentException(J3dI18N.getString("IndexedTriangleArray1"));
@@ -178,8 +178,8 @@ public class IndexedTriangleArray extends IndexedGeometryArray {
vertexAttrCount, vertexAttrSizes,
indexCount);
- if (vertexCount < 1)
- throw new IllegalArgumentException(J3dI18N.getString("IndexedTriangleArray0"));
+ if (vertexCount < 1)
+ throw new IllegalArgumentException(J3dI18N.getString("IndexedTriangleArray0"));
if (indexCount < 3 || ((indexCount%3) != 0))
throw new IllegalArgumentException(J3dI18N.getString("IndexedTriangleArray1"));
@@ -216,7 +216,7 @@ public class IndexedTriangleArray extends IndexedGeometryArray {
rt.getVertexFormat(),
texSetCount,
texMap,
- vertexAttrCount,
+ vertexAttrCount,
vertexAttrSizes,
rt.getIndexCount());
t.duplicateNodeComponent(this);
diff --git a/src/classes/share/javax/media/j3d/IndexedTriangleArrayRetained.java b/src/classes/share/javax/media/j3d/IndexedTriangleArrayRetained.java
index bbd51d9..da579a0 100644
--- a/src/classes/share/javax/media/j3d/IndexedTriangleArrayRetained.java
+++ b/src/classes/share/javax/media/j3d/IndexedTriangleArrayRetained.java
@@ -41,7 +41,7 @@ import java.lang.Math;
*/
class IndexedTriangleArrayRetained extends IndexedGeometryArrayRetained {
-
+
IndexedTriangleArrayRetained() {
this.geoType = GEO_TYPE_INDEXED_TRI_SET;
}
@@ -53,7 +53,7 @@ class IndexedTriangleArrayRetained extends IndexedGeometryArrayRetained {
double minDist = Double.MAX_VALUE;
double x = 0, y = 0, z = 0;
int[] vtxIndexArr = new int[3];
-
+
//NVaidya
// Bug 447: While loops below now traverse over all
// elements in the valid index range from initialIndexIndex
@@ -63,7 +63,7 @@ class IndexedTriangleArrayRetained extends IndexedGeometryArrayRetained {
pnts[0] = new Point3d();
pnts[1] = new Point3d();
pnts[2] = new Point3d();
-
+
switch (pickShape.getPickType()) {
case PickShape.PICKRAY:
PickRay pickRay= (PickRay) pickShape;
@@ -83,13 +83,13 @@ class IndexedTriangleArrayRetained extends IndexedGeometryArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
@@ -112,21 +112,21 @@ class IndexedTriangleArrayRetained extends IndexedGeometryArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
break;
case PickShape.PICKBOUNDINGBOX:
- BoundingBox bbox = (BoundingBox)
+ BoundingBox bbox = (BoundingBox)
((PickBounds) pickShape).bounds;
-
+
while (i < loopStopIndex) {
for(int j=0; j<3; j++) {
vtxIndexArr[j] = indexCoord[i];
@@ -142,21 +142,21 @@ class IndexedTriangleArrayRetained extends IndexedGeometryArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
break;
case PickShape.PICKBOUNDINGSPHERE:
- BoundingSphere bsphere = (BoundingSphere)
+ BoundingSphere bsphere = (BoundingSphere)
((PickBounds) pickShape).bounds;
-
+
while (i < loopStopIndex) {
for(int j=0; j<3; j++) {
vtxIndexArr[j] = indexCoord[i];
@@ -172,28 +172,28 @@ class IndexedTriangleArrayRetained extends IndexedGeometryArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
break;
case PickShape.PICKBOUNDINGPOLYTOPE:
- BoundingPolytope bpolytope = (BoundingPolytope)
+ BoundingPolytope bpolytope = (BoundingPolytope)
((PickBounds) pickShape).bounds;
-
+
while (i < loopStopIndex) {
for(int j=0; j<3; j++) {
vtxIndexArr[j] = indexCoord[i];
getVertexData(indexCoord[i++], pnts[j]);
}
if (intersectBoundingPolytope(pnts, bpolytope,
- sdist,iPnt)) {
+ sdist,iPnt)) {
if (flags == 0) {
return true;
}
@@ -203,13 +203,13 @@ class IndexedTriangleArrayRetained extends IndexedGeometryArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
@@ -232,20 +232,20 @@ class IndexedTriangleArrayRetained extends IndexedGeometryArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
break;
case PickShape.PICKCONE:
PickCone pickCone= (PickCone) pickShape;
-
+
while (i < loopStopIndex) {
for(int j=0; j<3; j++) {
vtxIndexArr[j] = indexCoord[i];
@@ -261,13 +261,13 @@ class IndexedTriangleArrayRetained extends IndexedGeometryArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
@@ -276,9 +276,9 @@ class IndexedTriangleArrayRetained extends IndexedGeometryArrayRetained {
// Should not happen since API already check for this
throw new IllegalArgumentException(J3dI18N.getString("IndexedTriangleArrayRetained0"));
default:
- throw new RuntimeException ("PickShape not supported for intersection");
- }
-
+ throw new RuntimeException ("PickShape not supported for intersection");
+ }
+
if (minDist < Double.MAX_VALUE) {
iPnt.x = x;
iPnt.y = y;
@@ -287,7 +287,7 @@ class IndexedTriangleArrayRetained extends IndexedGeometryArrayRetained {
}
return false;
}
-
+
// intersect pnts[] with every triangle in this object
boolean intersect(Point3d[] pnts) {
Point3d[] points = new Point3d[3];
@@ -296,10 +296,10 @@ class IndexedTriangleArrayRetained extends IndexedGeometryArrayRetained {
// Bug 447: correction for loop indices
int i = initialIndexIndex;
int loopStopIndex = initialIndexIndex + validIndexCount;
-
+
points[0] = new Point3d();
- points[1] = new Point3d();
- points[2] = new Point3d();
+ points[1] = new Point3d();
+ points[2] = new Point3d();
switch (pnts.length) {
case 3: // Triangle
@@ -352,7 +352,7 @@ class IndexedTriangleArrayRetained extends IndexedGeometryArrayRetained {
return false;
}
-
+
boolean intersect(Transform3D thisToOtherVworld, GeometryRetained geom) {
Point3d[] pnts = new Point3d[3];
//NVaidya
@@ -391,7 +391,7 @@ class IndexedTriangleArrayRetained extends IndexedGeometryArrayRetained {
switch(targetBound.getPickType()) {
case PickShape.PICKBOUNDINGBOX:
BoundingBox box = (BoundingBox) targetBound;
-
+
while (i < loopStopIndex) {
getVertexData(indexCoord[i++], pnts[0]);
getVertexData(indexCoord[i++], pnts[1]);
@@ -403,7 +403,7 @@ class IndexedTriangleArrayRetained extends IndexedGeometryArrayRetained {
break;
case PickShape.PICKBOUNDINGSPHERE:
BoundingSphere bsphere = (BoundingSphere) targetBound;
-
+
while (i < loopStopIndex) {
getVertexData(indexCoord[i++], pnts[0]);
getVertexData(indexCoord[i++], pnts[1]);
@@ -416,7 +416,7 @@ class IndexedTriangleArrayRetained extends IndexedGeometryArrayRetained {
break;
case PickShape.PICKBOUNDINGPOLYTOPE:
BoundingPolytope bpolytope = (BoundingPolytope) targetBound;
-
+
while (i < loopStopIndex) {
getVertexData(indexCoord[i++], pnts[0]);
getVertexData(indexCoord[i++], pnts[1]);
@@ -429,11 +429,11 @@ class IndexedTriangleArrayRetained extends IndexedGeometryArrayRetained {
break;
default:
throw new RuntimeException("Bounds not supported for intersection "
- + targetBound);
+ + targetBound);
}
return false;
}
-
+
int getClassType() {
return TRIANGLE_TYPE;
}
diff --git a/src/classes/share/javax/media/j3d/IndexedTriangleFanArray.java b/src/classes/share/javax/media/j3d/IndexedTriangleFanArray.java
index 31c576c..b81452d 100644
--- a/src/classes/share/javax/media/j3d/IndexedTriangleFanArray.java
+++ b/src/classes/share/javax/media/j3d/IndexedTriangleFanArray.java
@@ -81,8 +81,8 @@ public class IndexedTriangleFanArray extends IndexedGeometryStripArray {
super(vertexCount, vertexFormat, indexCount, stripIndexCounts);
- if (vertexCount < 1)
- throw new IllegalArgumentException(J3dI18N.getString("IndexedTriangleFanArray0"));
+ if (vertexCount < 1)
+ throw new IllegalArgumentException(J3dI18N.getString("IndexedTriangleFanArray0"));
if (indexCount < 3 )
throw new IllegalArgumentException(J3dI18N.getString("IndexedTriangleFanArray1"));
@@ -136,8 +136,8 @@ public class IndexedTriangleFanArray extends IndexedGeometryStripArray {
texCoordSetCount, texCoordSetMap,
indexCount, stripIndexCounts);
- if (vertexCount < 1)
- throw new IllegalArgumentException(J3dI18N.getString("IndexedTriangleFanArray0"));
+ if (vertexCount < 1)
+ throw new IllegalArgumentException(J3dI18N.getString("IndexedTriangleFanArray0"));
if (indexCount < 3 )
throw new IllegalArgumentException(J3dI18N.getString("IndexedTriangleFanArray1"));
@@ -198,8 +198,8 @@ public class IndexedTriangleFanArray extends IndexedGeometryStripArray {
vertexAttrCount, vertexAttrSizes,
indexCount, stripIndexCounts);
- if (vertexCount < 1)
- throw new IllegalArgumentException(J3dI18N.getString("IndexedTriangleFanArray0"));
+ if (vertexCount < 1)
+ throw new IllegalArgumentException(J3dI18N.getString("IndexedTriangleFanArray0"));
if (indexCount < 3 )
throw new IllegalArgumentException(J3dI18N.getString("IndexedTriangleFanArray1"));
@@ -214,7 +214,7 @@ public class IndexedTriangleFanArray extends IndexedGeometryStripArray {
this.retained.setSource(this);
}
-
+
/**
* @deprecated replaced with cloneNodeComponent(boolean forceDuplicate)
*/
diff --git a/src/classes/share/javax/media/j3d/IndexedTriangleFanArrayRetained.java b/src/classes/share/javax/media/j3d/IndexedTriangleFanArrayRetained.java
index a94c28b..883a28c 100644
--- a/src/classes/share/javax/media/j3d/IndexedTriangleFanArrayRetained.java
+++ b/src/classes/share/javax/media/j3d/IndexedTriangleFanArrayRetained.java
@@ -46,7 +46,7 @@ import java.lang.Math;
*/
class IndexedTriangleFanArrayRetained extends IndexedGeometryStripArrayRetained {
-
+
IndexedTriangleFanArrayRetained(){
geoType = GEO_TYPE_INDEXED_TRI_FAN_SET;
}
@@ -61,13 +61,13 @@ class IndexedTriangleFanArrayRetained extends IndexedGeometryStripArrayRetained
int j, scount, count = 0;
pnts[0] = new Point3d();
pnts[1] = new Point3d();
- pnts[2] = new Point3d();
+ pnts[2] = new Point3d();
int[] vtxIndexArr = new int[3];
switch (pickShape.getPickType()) {
case PickShape.PICKRAY:
PickRay pickRay= (PickRay) pickShape;
-
+
while (i < stripIndexCounts.length) {
for(int k=0; k<2; k++) {
vtxIndexArr[k] = indexCoord[count];
@@ -87,13 +87,13 @@ class IndexedTriangleFanArrayRetained extends IndexedGeometryStripArrayRetained
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
pnts[1].set(pnts[2]);
@@ -104,7 +104,7 @@ class IndexedTriangleFanArrayRetained extends IndexedGeometryStripArrayRetained
case PickShape.PICKSEGMENT:
PickSegment pickSegment = (PickSegment) pickShape;
- while (i < stripIndexCounts.length) {
+ while (i < stripIndexCounts.length) {
for(int k=0; k<2; k++) {
vtxIndexArr[k] = indexCoord[count];
getVertexData(indexCoord[count++], pnts[k]);
@@ -113,7 +113,7 @@ class IndexedTriangleFanArrayRetained extends IndexedGeometryStripArrayRetained
for (j=2; j < scount; j++) {
vtxIndexArr[2] = indexCoord[count];
getVertexData(indexCoord[count++], pnts[2]);
- if (intersectSegment(pnts, pickSegment.start,
+ if (intersectSegment(pnts, pickSegment.start,
pickSegment.end, sdist, iPnt)) {
if (flags == 0) {
return true;
@@ -124,13 +124,13 @@ class IndexedTriangleFanArrayRetained extends IndexedGeometryStripArrayRetained
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
pnts[1].set(pnts[2]);
@@ -139,10 +139,10 @@ class IndexedTriangleFanArrayRetained extends IndexedGeometryStripArrayRetained
}
break;
case PickShape.PICKBOUNDINGBOX:
- BoundingBox bbox = (BoundingBox)
+ BoundingBox bbox = (BoundingBox)
((PickBounds) pickShape).bounds;
- while (i < stripIndexCounts.length) {
+ while (i < stripIndexCounts.length) {
for(int k=0; k<2; k++) {
vtxIndexArr[k] = indexCoord[count];
getVertexData(indexCoord[count++], pnts[k]);
@@ -161,13 +161,13 @@ class IndexedTriangleFanArrayRetained extends IndexedGeometryStripArrayRetained
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
pnts[1].set(pnts[2]);
@@ -176,10 +176,10 @@ class IndexedTriangleFanArrayRetained extends IndexedGeometryStripArrayRetained
}
break;
case PickShape.PICKBOUNDINGSPHERE:
- BoundingSphere bsphere = (BoundingSphere)
+ BoundingSphere bsphere = (BoundingSphere)
((PickBounds) pickShape).bounds;
- while (i < stripIndexCounts.length) {
+ while (i < stripIndexCounts.length) {
for(int k=0; k<2; k++) {
vtxIndexArr[k] = indexCoord[count];
getVertexData(indexCoord[count++], pnts[k]);
@@ -189,7 +189,7 @@ class IndexedTriangleFanArrayRetained extends IndexedGeometryStripArrayRetained
vtxIndexArr[2] = indexCoord[count];
getVertexData(indexCoord[count++], pnts[2]);
if (intersectBoundingSphere(pnts, bsphere, sdist,
- iPnt)) {
+ iPnt)) {
if (flags == 0) {
return true;
}
@@ -199,13 +199,13 @@ class IndexedTriangleFanArrayRetained extends IndexedGeometryStripArrayRetained
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
pnts[1].set(pnts[2]);
@@ -214,10 +214,10 @@ class IndexedTriangleFanArrayRetained extends IndexedGeometryStripArrayRetained
}
break;
case PickShape.PICKBOUNDINGPOLYTOPE:
- BoundingPolytope bpolytope = (BoundingPolytope)
+ BoundingPolytope bpolytope = (BoundingPolytope)
((PickBounds) pickShape).bounds;
- while (i < stripIndexCounts.length) {
+ while (i < stripIndexCounts.length) {
for(int k=0; k<2; k++) {
vtxIndexArr[k] = indexCoord[count];
getVertexData(indexCoord[count++], pnts[k]);
@@ -237,13 +237,13 @@ class IndexedTriangleFanArrayRetained extends IndexedGeometryStripArrayRetained
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
pnts[1].set(pnts[2]);
@@ -254,7 +254,7 @@ class IndexedTriangleFanArrayRetained extends IndexedGeometryStripArrayRetained
case PickShape.PICKCYLINDER:
PickCylinder pickCylinder= (PickCylinder) pickShape;
- while (i < stripIndexCounts.length) {
+ while (i < stripIndexCounts.length) {
for(int k=0; k<2; k++) {
vtxIndexArr[k] = indexCoord[count];
getVertexData(indexCoord[count++], pnts[k]);
@@ -273,13 +273,13 @@ class IndexedTriangleFanArrayRetained extends IndexedGeometryStripArrayRetained
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
pnts[1].set(pnts[2]);
@@ -290,7 +290,7 @@ class IndexedTriangleFanArrayRetained extends IndexedGeometryStripArrayRetained
case PickShape.PICKCONE:
PickCone pickCone= (PickCone) pickShape;
- while (i < stripIndexCounts.length) {
+ while (i < stripIndexCounts.length) {
for(int k=0; k<2; k++) {
vtxIndexArr[k] = indexCoord[count];
getVertexData(indexCoord[count++], pnts[k]);
@@ -309,13 +309,13 @@ class IndexedTriangleFanArrayRetained extends IndexedGeometryStripArrayRetained
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
pnts[1].set(pnts[2]);
@@ -327,8 +327,8 @@ class IndexedTriangleFanArrayRetained extends IndexedGeometryStripArrayRetained
// Should not happen since API already check for this
throw new IllegalArgumentException(J3dI18N.getString("IndexedTriangleFanArrayRetained0"));
default:
- throw new RuntimeException ("PickShape not supported for intersection");
- }
+ throw new RuntimeException ("PickShape not supported for intersection");
+ }
if (minDist < Double.MAX_VALUE) {
iPnt.x = x;
@@ -337,8 +337,8 @@ class IndexedTriangleFanArrayRetained extends IndexedGeometryStripArrayRetained
return true;
}
return false;
- }
-
+ }
+
// intersect pnts[] with every triangle in this object
boolean intersect(Point3d[] pnts) {
int j, end;
@@ -416,7 +416,7 @@ class IndexedTriangleFanArrayRetained extends IndexedGeometryStripArrayRetained
}
return false;
}
-
+
boolean intersect(Transform3D thisToOtherVworld, GeometryRetained geom) {
int i = 0, j, scount, count = 0;
Point3d[] pnts = new Point3d[3];
@@ -470,7 +470,7 @@ class IndexedTriangleFanArrayRetained extends IndexedGeometryStripArrayRetained
break;
case PickShape.PICKBOUNDINGSPHERE:
BoundingSphere bsphere = (BoundingSphere) targetBound;
-
+
while (i < stripIndexCounts.length) {
getVertexData(indexCoord[count++], pnts[0]);
getVertexData(indexCoord[count++], pnts[1]);
@@ -502,7 +502,7 @@ class IndexedTriangleFanArrayRetained extends IndexedGeometryStripArrayRetained
break;
default:
throw new RuntimeException("Bounds not supported for intersection "
- + targetBound);
+ + targetBound);
}
return false;
}
diff --git a/src/classes/share/javax/media/j3d/IndexedTriangleStripArray.java b/src/classes/share/javax/media/j3d/IndexedTriangleStripArray.java
index f661e5d..68061f1 100644
--- a/src/classes/share/javax/media/j3d/IndexedTriangleStripArray.java
+++ b/src/classes/share/javax/media/j3d/IndexedTriangleStripArray.java
@@ -83,8 +83,8 @@ public class IndexedTriangleStripArray extends IndexedGeometryStripArray {
super(vertexCount, vertexFormat, indexCount, stripIndexCounts);
- if (vertexCount < 1)
- throw new IllegalArgumentException(J3dI18N.getString("IndexedTriangleStripArray0"));
+ if (vertexCount < 1)
+ throw new IllegalArgumentException(J3dI18N.getString("IndexedTriangleStripArray0"));
if (indexCount < 3 )
throw new IllegalArgumentException(J3dI18N.getString("IndexedTriangleStripArray1"));
@@ -138,8 +138,8 @@ public class IndexedTriangleStripArray extends IndexedGeometryStripArray {
texCoordSetCount, texCoordSetMap,
indexCount, stripIndexCounts);
- if (vertexCount < 1)
- throw new IllegalArgumentException(J3dI18N.getString("IndexedTriangleStripArray0"));
+ if (vertexCount < 1)
+ throw new IllegalArgumentException(J3dI18N.getString("IndexedTriangleStripArray0"));
if (indexCount < 3 )
throw new IllegalArgumentException(J3dI18N.getString("IndexedTriangleStripArray1"));
@@ -200,8 +200,8 @@ public class IndexedTriangleStripArray extends IndexedGeometryStripArray {
vertexAttrCount, vertexAttrSizes,
indexCount, stripIndexCounts);
- if (vertexCount < 1)
- throw new IllegalArgumentException(J3dI18N.getString("IndexedTriangleStripArray0"));
+ if (vertexCount < 1)
+ throw new IllegalArgumentException(J3dI18N.getString("IndexedTriangleStripArray0"));
if (indexCount < 3 )
throw new IllegalArgumentException(J3dI18N.getString("IndexedTriangleStripArray1"));
@@ -216,7 +216,7 @@ public class IndexedTriangleStripArray extends IndexedGeometryStripArray {
this.retained.setSource(this);
}
-
+
/**
* @deprecated replaced with cloneNodeComponent(boolean forceDuplicate)
*/
diff --git a/src/classes/share/javax/media/j3d/IndexedTriangleStripArrayRetained.java b/src/classes/share/javax/media/j3d/IndexedTriangleStripArrayRetained.java
index 376a39f..7742e8c 100644
--- a/src/classes/share/javax/media/j3d/IndexedTriangleStripArrayRetained.java
+++ b/src/classes/share/javax/media/j3d/IndexedTriangleStripArrayRetained.java
@@ -45,11 +45,11 @@ import java.lang.Math;
*/
class IndexedTriangleStripArrayRetained extends IndexedGeometryStripArrayRetained {
-
+
IndexedTriangleStripArrayRetained(){
geoType = GEO_TYPE_INDEXED_TRI_STRIP_SET;
}
-
+
boolean intersect(PickShape pickShape, PickInfo pickInfo, int flags, Point3d iPnt,
GeometryRetained geom, int geomIndex) {
Point3d pnts[] = new Point3d[3];
@@ -60,14 +60,14 @@ class IndexedTriangleStripArrayRetained extends IndexedGeometryStripArrayRetaine
int j, scount, count = 0;
pnts[0] = new Point3d();
pnts[1] = new Point3d();
- pnts[2] = new Point3d();
+ pnts[2] = new Point3d();
int[] vtxIndexArr = new int[3];
switch (pickShape.getPickType()) {
case PickShape.PICKRAY:
PickRay pickRay= (PickRay) pickShape;
-
- while (i < stripIndexCounts.length) {
+
+ while (i < stripIndexCounts.length) {
for(int k=0; k<2; k++) {
vtxIndexArr[k] = indexCoord[count];
getVertexData(indexCoord[count++], pnts[k]);
@@ -86,13 +86,13 @@ class IndexedTriangleStripArrayRetained extends IndexedGeometryStripArrayRetaine
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
pnts[0].set(pnts[1]);
@@ -105,7 +105,7 @@ class IndexedTriangleStripArrayRetained extends IndexedGeometryStripArrayRetaine
case PickShape.PICKSEGMENT:
PickSegment pickSegment = (PickSegment) pickShape;
- while (i < stripIndexCounts.length) {
+ while (i < stripIndexCounts.length) {
for(int k=0; k<2; k++) {
vtxIndexArr[k] = indexCoord[count];
getVertexData(indexCoord[count++], pnts[k]);
@@ -114,7 +114,7 @@ class IndexedTriangleStripArrayRetained extends IndexedGeometryStripArrayRetaine
for (j=2; j < scount; j++) {
vtxIndexArr[2] = indexCoord[count];
getVertexData(indexCoord[count++], pnts[2]);
- if (intersectSegment(pnts, pickSegment.start,
+ if (intersectSegment(pnts, pickSegment.start,
pickSegment.end, sdist, iPnt)) {
if (flags == 0) {
return true;
@@ -125,13 +125,13 @@ class IndexedTriangleStripArrayRetained extends IndexedGeometryStripArrayRetaine
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
pnts[0].set(pnts[1]);
@@ -142,10 +142,10 @@ class IndexedTriangleStripArrayRetained extends IndexedGeometryStripArrayRetaine
}
break;
case PickShape.PICKBOUNDINGBOX:
- BoundingBox bbox = (BoundingBox)
+ BoundingBox bbox = (BoundingBox)
((PickBounds) pickShape).bounds;
- while (i < stripIndexCounts.length) {
+ while (i < stripIndexCounts.length) {
for(int k=0; k<2; k++) {
vtxIndexArr[k] = indexCoord[count];
getVertexData(indexCoord[count++], pnts[k]);
@@ -164,13 +164,13 @@ class IndexedTriangleStripArrayRetained extends IndexedGeometryStripArrayRetaine
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
pnts[0].set(pnts[1]);
@@ -181,10 +181,10 @@ class IndexedTriangleStripArrayRetained extends IndexedGeometryStripArrayRetaine
}
break;
case PickShape.PICKBOUNDINGSPHERE:
- BoundingSphere bsphere = (BoundingSphere)
+ BoundingSphere bsphere = (BoundingSphere)
((PickBounds) pickShape).bounds;
- while (i < stripIndexCounts.length) {
+ while (i < stripIndexCounts.length) {
for(int k=0; k<2; k++) {
vtxIndexArr[k] = indexCoord[count];
getVertexData(indexCoord[count++], pnts[k]);
@@ -194,7 +194,7 @@ class IndexedTriangleStripArrayRetained extends IndexedGeometryStripArrayRetaine
vtxIndexArr[2] = indexCoord[count];
getVertexData(indexCoord[count++], pnts[2]);
if (intersectBoundingSphere(pnts, bsphere, sdist,
- iPnt)) {
+ iPnt)) {
if (flags == 0) {
return true;
}
@@ -204,13 +204,13 @@ class IndexedTriangleStripArrayRetained extends IndexedGeometryStripArrayRetaine
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
pnts[0].set(pnts[1]);
@@ -221,10 +221,10 @@ class IndexedTriangleStripArrayRetained extends IndexedGeometryStripArrayRetaine
}
break;
case PickShape.PICKBOUNDINGPOLYTOPE:
- BoundingPolytope bpolytope = (BoundingPolytope)
+ BoundingPolytope bpolytope = (BoundingPolytope)
((PickBounds) pickShape).bounds;
- while (i < stripIndexCounts.length) {
+ while (i < stripIndexCounts.length) {
for(int k=0; k<2; k++) {
vtxIndexArr[k] = indexCoord[count];
getVertexData(indexCoord[count++], pnts[k]);
@@ -244,13 +244,13 @@ class IndexedTriangleStripArrayRetained extends IndexedGeometryStripArrayRetaine
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
pnts[0].set(pnts[1]);
@@ -263,7 +263,7 @@ class IndexedTriangleStripArrayRetained extends IndexedGeometryStripArrayRetaine
case PickShape.PICKCYLINDER:
PickCylinder pickCylinder= (PickCylinder) pickShape;
- while (i < stripIndexCounts.length) {
+ while (i < stripIndexCounts.length) {
for(int k=0; k<2; k++) {
vtxIndexArr[k] = indexCoord[count];
getVertexData(indexCoord[count++], pnts[k]);
@@ -282,13 +282,13 @@ class IndexedTriangleStripArrayRetained extends IndexedGeometryStripArrayRetaine
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
pnts[0].set(pnts[1]);
@@ -301,7 +301,7 @@ class IndexedTriangleStripArrayRetained extends IndexedGeometryStripArrayRetaine
case PickShape.PICKCONE:
PickCone pickCone= (PickCone) pickShape;
- while (i < stripIndexCounts.length) {
+ while (i < stripIndexCounts.length) {
for(int k=0; k<2; k++) {
vtxIndexArr[k] = indexCoord[count];
getVertexData(indexCoord[count++], pnts[k]);
@@ -320,13 +320,13 @@ class IndexedTriangleStripArrayRetained extends IndexedGeometryStripArrayRetaine
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
pnts[0].set(pnts[1]);
@@ -340,8 +340,8 @@ class IndexedTriangleStripArrayRetained extends IndexedGeometryStripArrayRetaine
// Should not happen since API already check for this
throw new IllegalArgumentException(J3dI18N.getString("IndexedTriangleStripArrayRetained0"));
default:
- throw new RuntimeException ("PickShape not supported for intersection");
- }
+ throw new RuntimeException ("PickShape not supported for intersection");
+ }
if (minDist < Double.MAX_VALUE) {
iPnt.x = x;
@@ -351,7 +351,7 @@ class IndexedTriangleStripArrayRetained extends IndexedGeometryStripArrayRetaine
}
return false;
}
-
+
// intersect pnts[] with every triangle in this object
boolean intersect(Point3d[] pnts) {
int j, end;
@@ -433,7 +433,7 @@ class IndexedTriangleStripArrayRetained extends IndexedGeometryStripArrayRetaine
}
return false;
}
-
+
boolean intersect(Transform3D thisToOtherVworld, GeometryRetained geom) {
int i = 0, j, scount, count = 0;
Point3d[] pnts = new Point3d[3];
@@ -489,7 +489,7 @@ class IndexedTriangleStripArrayRetained extends IndexedGeometryStripArrayRetaine
break;
case PickShape.PICKBOUNDINGSPHERE:
BoundingSphere bsphere = (BoundingSphere) targetBound;
-
+
while (i < stripIndexCounts.length) {
getVertexData(indexCoord[count++], pnts[0]);
getVertexData(indexCoord[count++], pnts[1]);
@@ -523,7 +523,7 @@ class IndexedTriangleStripArrayRetained extends IndexedGeometryStripArrayRetaine
break;
default:
throw new RuntimeException("Bounds not supported for intersection "
- + targetBound);
+ + targetBound);
}
return false;
}
diff --git a/src/classes/share/javax/media/j3d/IndexedUnorderSet.java b/src/classes/share/javax/media/j3d/IndexedUnorderSet.java
index e26d500..9d18909 100644
--- a/src/classes/share/javax/media/j3d/IndexedUnorderSet.java
+++ b/src/classes/share/javax/media/j3d/IndexedUnorderSet.java
@@ -36,7 +36,7 @@ package javax.media.j3d;
* All operations remove(IndexedObject, ListType), add(IndexedObject, ListType),
* contains(IndexedObject, ListType) etc. take O(1) time.
* The class is designed to optimize speed. So many reductance
- * procedures call and range check as found in ArrayList are
+ * procedures call and range check as found in ArrayList are
* removed.
*
*
* 2) Don't use arr.length , use IUset.arraySize();
* 3) IndexedObject contains an array of listIndex, the number of
- * array elements depends on the number of different types of
+ * array elements depends on the number of different types of
* IndexedUnorderSet that use it.
* 4) No need to do casting for individual element as in ArrayList.
* 5) IndexedUnorderSet is thread safe.
@@ -176,7 +176,7 @@ class IndexedUnorderSet implements Cloneable, java.io.Serializable {
obj.listIdx[0][i] = -1;
obj.listIdx[1][i] = -1;
}
-
+
// Just want to set both RenderMolecule idx
// and BehaviorRetained idx to 0 by default
// It is OK without the following lines
@@ -197,9 +197,9 @@ class IndexedUnorderSet implements Cloneable, java.io.Serializable {
return size;
}
-
+
/**
- * Returns the size of entry use in toArray() number of elements
+ * Returns the size of entry use in toArray() number of elements
* in this list.
*
* @return the number of elements in this list.
@@ -229,8 +229,8 @@ class IndexedUnorderSet implements Cloneable, java.io.Serializable {
/**
- * Searches for the last occurence of the given argument, testing
- * for equality using the equals method.
+ * Searches for the last occurence of the given argument, testing
+ * for equality using the equals method.
*
* @param o an object.
* @return the index of the first occurrence of the argument in this
@@ -248,14 +248,14 @@ class IndexedUnorderSet implements Cloneable, java.io.Serializable {
* @return a clone of this ArrayList instance.
*/
synchronized protected final Object clone() {
- try {
+ try {
IndexedUnorderSet v = (IndexedUnorderSet)super.clone();
v.elementData = (IndexedObject[])java.lang.reflect.Array.newInstance(
componentType, size);
System.arraycopy(elementData, 0, v.elementData, 0, size);
isDirty = true; // can't use the old cloneData reference
return v;
- } catch (CloneNotSupportedException e) {
+ } catch (CloneNotSupportedException e) {
// this shouldn't happen, since we are Cloneable
throw new InternalError();
}
@@ -265,7 +265,7 @@ class IndexedUnorderSet implements Cloneable, java.io.Serializable {
/**
* Returns an array containing all of the elements in this list.
* The size of the array may longer than the actual size. Use
- * arraySize() to retrieve the size.
+ * arraySize() to retrieve the size.
* The array return is a copied of internal array. if copy
* is true.
*
@@ -287,13 +287,13 @@ class IndexedUnorderSet implements Cloneable, java.io.Serializable {
cloneSize = size;
return elementData;
}
-
+
}
/**
* Returns an array containing all of the elements in this list.
* The size of the array may longer than the actual size. Use
- * arraySize() to retrieve the size.
+ * arraySize() to retrieve the size.
* The array return is a copied of internal array. So another
* thread can continue add/delete the current list. However,
* it should be noticed that two call to toArray() may return
@@ -308,10 +308,10 @@ class IndexedUnorderSet implements Cloneable, java.io.Serializable {
/**
* Returns an array containing elements starting from startElement
- * all of the elements in this list. A new array of exact size
+ * all of the elements in this list. A new array of exact size
* is always allocated.
*
- * @param startElement starting element to copy
+ * @param startElement starting element to copy
*
* @return an array containing elements starting from
* startElement, null if element not found.
@@ -343,7 +343,7 @@ class IndexedUnorderSet implements Cloneable, java.io.Serializable {
System.arraycopy(oldData, 0, elementData, 0, size);
}
}
-
+
// Positional Access Operations
@@ -375,12 +375,12 @@ class IndexedUnorderSet implements Cloneable, java.io.Serializable {
oldElm.listIdx[oldElm.getIdxUsed(univ)][listType] = -1;
}
elementData[index] = o;
-
+
int univIdx = o.getIdxUsed(univ);
if (debug) {
if (o.listIdx[univIdx][listType] != -1) {
- System.err.println("Illegal use of UnorderIndexedList idx in set " +
+ System.err.println("Illegal use of UnorderIndexedList idx in set " +
o.listIdx[univIdx][listType]);
Thread.dumpStack();
}
@@ -398,7 +398,7 @@ class IndexedUnorderSet implements Cloneable, java.io.Serializable {
* @param o element to be appended to this list.
*/
synchronized final void add(IndexedObject o) {
-
+
if (elementData.length == size) {
IndexedObject oldData[] = elementData;
elementData = (IndexedObject[])java.lang.reflect.Array.newInstance(
@@ -426,7 +426,7 @@ class IndexedUnorderSet implements Cloneable, java.io.Serializable {
isDirty = true;
}
-
+
/**
* Removes the element at the specified position in this list.
* Replace the removed element by the last one.
@@ -443,17 +443,17 @@ class IndexedUnorderSet implements Cloneable, java.io.Serializable {
if (debug) {
if (elm.listIdx[univIdx][listType] != index) {
System.err.println("Inconsistent idx in remove, expect " + index + " actual " + elm.listIdx[univIdx][listType]);
- Thread.dumpStack();
- }
+ Thread.dumpStack();
+ }
}
elm.listIdx[univIdx][listType] = -1;
size--;
if (index != size) {
- elm = elementData[size];
+ elm = elementData[size];
elm.listIdx[univIdx][listType] = index;
elementData[index] = elm;
- }
+ }
elementData[size] = null;
isDirty = true;
/*
@@ -463,7 +463,7 @@ class IndexedUnorderSet implements Cloneable, java.io.Serializable {
*/
}
-
+
/**
* Removes the element at the last position in this list.
* @return The element remove
@@ -514,7 +514,7 @@ class IndexedUnorderSet implements Cloneable, java.io.Serializable {
o.listIdx[univIdx][listType] = -1;
isDirty = true;
return true;
- }
+ }
return false;
}
@@ -556,7 +556,7 @@ class IndexedUnorderSet implements Cloneable, java.io.Serializable {
StringBuffer sb = new StringBuffer("Size = " + size + "\n[");
int len = size-1;
Object obj;
-
+
for (int i=0; i < size; i++) {
obj = elementData[i];
if (obj != null) {
diff --git a/src/classes/share/javax/media/j3d/InputDevice.java b/src/classes/share/javax/media/j3d/InputDevice.java
index 3f158c7..33a5933 100644
--- a/src/classes/share/javax/media/j3d/InputDevice.java
+++ b/src/classes/share/javax/media/j3d/InputDevice.java
@@ -52,20 +52,20 @@ public interface InputDevice {
* Signifies that the driver for a device is a blocking driver and that
* it should be scheduled for regular reads by Java 3D. A blocking driver
* is defined as a driver that can cause the thread accessing the driver
- * (the Java 3D implementation thread calling the pollAndProcessInput
- * method) to block while the data is being accessed from the driver.
- */
+ * (the Java 3D implementation thread calling the pollAndProcessInput
+ * method) to block while the data is being accessed from the driver.
+ */
public static final int BLOCKING = 3;
- /**
+ /**
* Signifies that the driver for a device is a non-blocking driver and
* that it should be scheduled for regular reads by Java 3D. A
* non-blocking driver is defined as a driver that does not cause the
* calling thread to block while data is being retrieved from the
* driver. If no data is available from the device, pollAndProcessInput
* should return without updating the sensor read value.
- */
+ */
public static final int NON_BLOCKING = 4;
/**
@@ -76,13 +76,13 @@ public interface InputDevice {
* must always provide the current value of the sensor on demand whenever
* pollAndProcessInput is called. This means that DEMAND_DRIVEN drivers
* are non-blocking by definition.
- */
+ */
public static final int DEMAND_DRIVEN = 5;
/**
- * This method initializes the device. A device should be initialized
- * before it is registered with Java 3D via the
+ * This method initializes the device. A device should be initialized
+ * before it is registered with Java 3D via the
* PhysicalEnvironment.addInputDevice(InputDevice) method call.
* @return return true for succesful initialization, false for failure
*/
@@ -90,7 +90,7 @@ public interface InputDevice {
/**
* This method sets the device's current position and orientation as the
- * devices nominal position and orientation (establish its reference
+ * devices nominal position and orientation (establish its reference
* frame relative to the "Tracker base" reference frame).
*/
public abstract void setNominalPositionAndOrientation();
@@ -98,35 +98,35 @@ public interface InputDevice {
/**
* This method causes the device's sensor readings to be updated by the
- * device driver. For BLOCKING and NON_BLOCKING drivers, this method is
- * called regularly and the Java 3D implementation can cache the sensor
- * values. For DEMAND_DRIVEN drivers this method is called each time one
+ * device driver. For BLOCKING and NON_BLOCKING drivers, this method is
+ * called regularly and the Java 3D implementation can cache the sensor
+ * values. For DEMAND_DRIVEN drivers this method is called each time one
* of the Sensor.getRead methods is called, and is not otherwise called.
*/
public abstract void pollAndProcessInput();
/**
- * This method will not be called by the Java 3D implementation and
+ * This method will not be called by the Java 3D implementation and
* should be implemented as an empty method.
*/
public abstract void processStreamInput();
/**
- * Code to process the clean up of the device and relinquish associated
- * resources. This method should be called after the device has been
+ * Code to process the clean up of the device and relinquish associated
+ * resources. This method should be called after the device has been
* unregistered from Java 3D via the
* PhysicalEnvironment.removeInputDevice(InputDevice) method call.
*/
public abstract void close();
-
+
/**
- * This method retrieves the device's processing mode: one of BLOCKING,
+ * This method retrieves the device's processing mode: one of BLOCKING,
* NON_BLOCKING, or DEMAND_DRIVEN. The Java 3D implementation calls
* this method when PhysicalEnvironment.addInputDevice(InputDevice) is
- * called to register the device with Java 3D. If this method returns
+ * called to register the device with Java 3D. If this method returns
* any value other than BLOCKING, NON_BLOCKING, or DEMAND_DRIVEN,
* addInputDevice will throw an IllegalArgumentException.
- * @return Returns the devices processing mode, one of BLOCKING,
+ * @return Returns the devices processing mode, one of BLOCKING,
* NON_BLOCKING, or DEMAND_DRIVEN
*/
public abstract int getProcessingMode();
@@ -134,10 +134,10 @@ public interface InputDevice {
/**
* This method sets the device's processing mode to one of: BLOCKING,
- * NON_BLOCKING, or DEMAND_DRIVEN. Many drivers will be written to run
- * in only one mode. Applications using such drivers should not attempt
- * to set the processing mode. This method should throw an
- * IllegalArgumentException if there is an attempt to set the processing
+ * NON_BLOCKING, or DEMAND_DRIVEN. Many drivers will be written to run
+ * in only one mode. Applications using such drivers should not attempt
+ * to set the processing mode. This method should throw an
+ * IllegalArgumentException if there is an attempt to set the processing
* mode to anything other than the aforementioned three values.
*
* originalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
@@ -134,7 +134,7 @@ public abstract class Interpolator extends Behavior {
*/
void duplicateAttributes(Node originalNode, boolean forceDuplicate) {
super.duplicateAttributes(originalNode, forceDuplicate);
-
+
Interpolator it = (Interpolator) originalNode;
Alpha a = it.getAlpha();
diff --git a/src/classes/share/javax/media/j3d/J3DGraphics2DImpl.java b/src/classes/share/javax/media/j3d/J3DGraphics2DImpl.java
index 74d7ee0..87c480e 100644
--- a/src/classes/share/javax/media/j3d/J3DGraphics2DImpl.java
+++ b/src/classes/share/javax/media/j3d/J3DGraphics2DImpl.java
@@ -72,7 +72,7 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
// Package scope contructor
J3DGraphics2DImpl(Canvas3D c) {
canvas3d = c;
-
+
synchronized (VirtualUniverse.mc.contextCreationLock) {
if (c.ctx == null) {
// create a dummy bufferImage
@@ -80,7 +80,7 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
height = 1;
g3dImage = new BufferedImage(width, height,
BufferedImage.TYPE_INT_ARGB);
- offScreenGraphics2D = g3dImage.createGraphics();
+ offScreenGraphics2D = g3dImage.createGraphics();
} else {
init();
}
@@ -89,7 +89,7 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
}
// This is invoke from Renderer callback when the first
- // time createContext() finish which set
+ // time createContext() finish which set
// canvas3d.extensionSupported correctly.
void init() {
// if ABGR extension is supported, we want to use
@@ -100,14 +100,14 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
width = canvas3d.getWidth();
height = canvas3d.getHeight();
initTexMap = false;
-
+
if (width <= 0) {
width = 1;
}
if (height <= 0) {
height = 1;
}
-
+
synchronized (extentLock) {
xmax = width;
ymax = height;
@@ -122,7 +122,7 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
if (!abgr) {
data = new byte[width*height*4];
}
-
+
// should be the last flag to set
initCtx = true;
}
@@ -136,19 +136,19 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
* rendering to be complete before returning from this call.
*/
public void flush(boolean waiting) {
-
+
if (hasBeenDisposed) {
throw new IllegalStateException(J3dI18N.getString("J3DGraphics2D0"));
}
if (!isFlushed) {
- // Composite g3dImage into Canvas3D
+ // Composite g3dImage into Canvas3D
if (Thread.currentThread() == canvas3d.screen.renderer) {
if (!initCtx) {
return;
- }
+ }
doFlush();
- } else {
+ } else {
if (!initCtx) {
if (waiting &&
(canvas3d.pendingView != null) &&
@@ -166,23 +166,23 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
// XXXX: may not be legal for behaviorScheduler
// May cause deadlock if it is in behaviorScheduler
// and we wait for Renderer to finish
- boolean renderRun = (Thread.currentThread() !=
+ boolean renderRun = (Thread.currentThread() !=
canvas3d.view.universe.behaviorScheduler);
// This must put before sendRenderMessage()
threadWaiting = true;
sendRenderMessage(renderRun, GraphicsContext3D.FLUSH2D, null,
- null, null);
- if (waiting) {
+ null, null);
+ if (waiting) {
// It is possible that thread got notify BEFORE
// the following runMonitor invoke.
runMonitor(J3dThread.WAIT);
- }
+ }
}
isFlushed = true;
}
}
-
+
// copy the data into a byte buffer that will be passed to opengl
void doFlush() {
assert !hasBeenDisposed;
@@ -215,7 +215,7 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
}
copyDataToCanvas(0, 0, xmin, ymin, xmax, ymax, width, height);
} else {
-
+
runMonitor(J3dThread.NOTIFY);
}
// this define an empty region
@@ -239,7 +239,7 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
int biType = bi.getType();
int w, h, i, j;
int row, rowBegin, rowInc, dstBegin;
-
+
dstBegin = 0;
rowInc = 1;
rowBegin = 0;
@@ -249,17 +249,17 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
(biType == BufferedImage.TYPE_INT_RGB)) {
// optimized cases
rowBegin = y1;
-
+
int colBegin = x1;
-
+
int[] intData =
((DataBufferInt)bi.getRaster().getDataBuffer()).getData();
int rowOffset = rowInc * width;
int intPixel;
-
+
rowBegin = rowBegin*width + colBegin;
dstBegin = rowBegin*4;
-
+
if (biType == BufferedImage.TYPE_INT_ARGB) {
for (h = y1; h < y2; h++) {
i = rowBegin;
@@ -274,7 +274,7 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
rowBegin += rowOffset;
dstBegin += (rowOffset*4);
}
- } else {
+ } else {
for (h = y1; h < y2; h++) {
i = rowBegin;
j = dstBegin;
@@ -291,7 +291,7 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
}
} else {
// non-optimized cases
- WritableRaster ras = bi.getRaster();
+ WritableRaster ras = bi.getRaster();
ColorModel cm = bi.getColorModel();
Object pixel = ImageComponentRetained.getDataElementBuffer(ras);
@@ -346,7 +346,7 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
validate(0, 0, width, height);
}
- void validate(float x1, float y1, float x2, float y2,
+ void validate(float x1, float y1, float x2, float y2,
AffineTransform xform) {
float t;
@@ -359,7 +359,7 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
ptSrc.x = x2;
ptSrc.y = y2;
xform.transform(ptSrc, ptDst2);
-
+
if (ptDst1.x > ptDst2.x) {
t = ptDst1.x;
ptDst1.x = ptDst2.x;
@@ -386,7 +386,7 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
}
}
if (doResize) {
- synchronized (VirtualUniverse.mc.contextCreationLock) {
+ synchronized (VirtualUniverse.mc.contextCreationLock) {
Graphics2D oldOffScreenGraphics2D = offScreenGraphics2D;
initCtx = false;
init();
@@ -399,8 +399,8 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
tr.transform(ptSrc, ptDst1);
ptSrc.x = x2;
ptSrc.y = y2;
- tr.transform(ptSrc, ptDst2);
-
+ tr.transform(ptSrc, ptDst2);
+
synchronized (extentLock) {
if (ptDst1.x < xmin) {
xmin = (int) ptDst1.x;
@@ -417,10 +417,10 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
}
}
}
-
+
void copyGraphics2D(Graphics2D oldg) {
// restore the original setting of Graphics2D when resizing the windows
- setColor(oldg.getColor());
+ setColor(oldg.getColor());
setFont(oldg.getFont());
setClip(oldg.getClip());
setComposite(oldg.getComposite());
@@ -429,8 +429,8 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
setStroke(oldg.getStroke());
if (xOrModeColor != null) {
setXORMode(xOrModeColor);
- }
-
+ }
+
}
// Implementation of Graphics2D methods
@@ -452,7 +452,7 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
public String toString() {
return offScreenGraphics2D.toString();
-
+
}
public final AffineTransform getTransform() {
@@ -513,7 +513,7 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
validate(0, 0, img.getWidth(obs), img.getHeight(obs), xform);
return offScreenGraphics2D.drawImage(img, xform, obs);
}
-
+
public final void drawImage(BufferedImage img, BufferedImageOp op,
int x, int y) {
if (op != null) {
@@ -522,17 +522,17 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
validate(x, y, x+img.getWidth(), y+img.getHeight());
offScreenGraphics2D.drawImage(img, null, x, y);
}
-
+
public final boolean drawImage(Image img,
int x, int y,
ImageObserver observer) {
- validate(x, y,
- x + img.getWidth(observer),
+ validate(x, y,
+ x + img.getWidth(observer),
y + img.getWidth(observer));
return offScreenGraphics2D.drawImage(img, x, y, observer);
}
-
+
public final boolean drawImage(Image img, int x, int y,
int width, int height,
ImageObserver observer) {
@@ -540,7 +540,7 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
return offScreenGraphics2D.drawImage(img, x, y, width, height,
observer);
}
-
+
public final boolean drawImage(Image img, int x, int y,
int width, int height,
Color bgcolor,
@@ -555,7 +555,7 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
int sx1, int sy1, int sx2, int sy2,
ImageObserver observer) {
validate(dx1, dy1, dx2, dy2);
- offScreenGraphics2D.drawImage(img, dx1, dy1, dx2, dy2, sx1, sy1,
+ offScreenGraphics2D.drawImage(img, dx1, dy1, dx2, dy2, sx1, sy1,
sx2, sy2, observer);
}
@@ -564,7 +564,7 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
int sx1, int sy1, int sx2, int sy2,
ImageObserver observer) {
validate(dx1, dy1, dx2, dy2);
- return offScreenGraphics2D.drawImage(img, dx1, dy1, dx2, dy2, sx1, sy1,
+ return offScreenGraphics2D.drawImage(img, dx1, dy1, dx2, dy2, sx1, sy1,
sx2, sy2, observer);
}
@@ -574,7 +574,7 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
Color bgcolor,
ImageObserver observer) {
validate(dx1, dy1, dx2, dy2);
- return offScreenGraphics2D.drawImage(img, dx1, dy1, dx2, dy2, sx1, sy1,
+ return offScreenGraphics2D.drawImage(img, dx1, dy1, dx2, dy2, sx1, sy1,
sx2, sy2, bgcolor, observer);
}
@@ -605,8 +605,8 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
public final void draw(Shape s) {
Rectangle rect = s.getBounds();
- validate(rect.x, rect.y,
- rect.x + rect.width,
+ validate(rect.x, rect.y,
+ rect.x + rect.width,
rect.y + rect.height);
offScreenGraphics2D.draw(s);
}
@@ -712,7 +712,7 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
float x1 = (float) bounds.getX();
float y1 = (float) bounds.getY();
validate(x1+x, y1+y,
- x1 + x + (float) bounds.getWidth(),
+ x1 + x + (float) bounds.getWidth(),
y1 + y + (float) bounds.getHeight());
offScreenGraphics2D.drawString(s, x, y);
@@ -745,7 +745,7 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
int arcWidth, int arcHeight) {
// XXXX: call validate with bounding box of primitive
validate();
- offScreenGraphics2D.fillRoundRect(x, y, width, height, arcWidth,
+ offScreenGraphics2D.fillRoundRect(x, y, width, height, arcWidth,
arcHeight);
}
@@ -844,7 +844,7 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
validate();
offScreenGraphics2D.drawBytes(data, offset, length, x, y);
}
-
+
public void drawChars(char data[], int offset, int length, int x, int y) {
// XXXX: call validate with bounding box of primitive
validate();
@@ -952,15 +952,15 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
if (Thread.currentThread() == canvas3d.screen.renderer) {
doDrawAndFlushImage(img, x, y, observer);
- } else {
+ } else {
// Behavior Scheduler or other threads
// XXXX: may not be legal for behaviorScheduler
// May cause deadlock if it is in behaviorScheduler
// and we wait for Renderer to finish
- boolean renderRun = (Thread.currentThread() !=
+ boolean renderRun = (Thread.currentThread() !=
canvas3d.view.universe.behaviorScheduler);
sendRenderMessage(renderRun, GraphicsContext3D.DRAWANDFLUSH2D,
- img, new Point(x, y), observer);
+ img, new Point(x, y), observer);
}
}
@@ -1004,7 +1004,7 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
} else {
x1 = 0;
}
-
+
if (py + imgHeight > height) {
y2 = height - py;
} else {
@@ -1024,13 +1024,13 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
}
-
+
void copyDataToCanvas(int px, int py, int x1, int y1,
int x2, int y2, int w, int h) {
try {
if (!canvas3d.drawingSurfaceObject.renderLock()) {
return;
- }
+ }
if (!initTexMap) {
if (objectId == -1) {
@@ -1038,7 +1038,7 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
}
texWidth = getGreaterPowerOf2(w);
texHeight = getGreaterPowerOf2(h);
-
+
// Canvas got resize, need to init texture map again
// in Renderer thread
if (!canvas3d.initTexturemapping(canvas3d.ctx,
@@ -1050,8 +1050,8 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
VirtualUniverse.mc.freeTexture2DId(objectId);
objectId = -1;
// TODO : Need to find a better way to report no resource problem --- Chien.
- System.err.println("J3DGraphics2DImpl.copyDataToCanvas() : Fail to get texture resources ...");
-
+ System.err.println("J3DGraphics2DImpl.copyDataToCanvas() : Fail to get texture resources ...");
+
} else {
initTexMap = true;
}
@@ -1064,7 +1064,7 @@ final class J3DGraphics2DImpl extends J3DGraphics2D {
ImageComponentRetained.TYPE_BYTE_RGBA),
objectId, data, width, height);
}
-
+
canvas3d.drawingSurfaceObject.unLock();
} catch (NullPointerException ne) {
canvas3d.drawingSurfaceObject.unLock();
diff --git a/src/classes/share/javax/media/j3d/J3dDebug.java b/src/classes/share/javax/media/j3d/J3dDebug.java
index 8eec3bd..bc8f06e 100644
--- a/src/classes/share/javax/media/j3d/J3dDebug.java
+++ b/src/classes/share/javax/media/j3d/J3dDebug.java
@@ -34,7 +34,7 @@ package javax.media.j3d;
class J3dDebug {
// For production release devPhase is set to false.
-
+
// Do no debugging.
static final int NO_DEBUG = 0;
@@ -68,7 +68,7 @@ class J3dDebug {
// devPhase is put before debug, smart compiler will not include
// code_segment when devPhase is false.
static boolean debug;
-
+
// Class debug variable, there is one debug variable per class.
// Set one of the 5 debug levels to the class debug variable when
// debugging.
@@ -330,7 +330,7 @@ class J3dDebug {
// switch is a reserved word.
static final int Switch = !devPhase?NO_DEBUG:NO_DEBUG;
static final int switchRetained = !devPhase?NO_DEBUG:NO_DEBUG;
- static final int switchValueInterpolator = !devPhase?NO_DEBUG:NO_DEBUG;
+ static final int switchValueInterpolator = !devPhase?NO_DEBUG:NO_DEBUG;
static final int table = !devPhase?NO_DEBUG:NO_DEBUG;
static final int texCoordGeneration = !devPhase?NO_DEBUG:NO_DEBUG;
static final int texCoordGenerationRetained = !devPhase?NO_DEBUG:NO_DEBUG;
@@ -360,7 +360,7 @@ class J3dDebug {
static final int triangleFanArray = !devPhase?NO_DEBUG:NO_DEBUG;
static final int triangleFanArrayRetained = !devPhase?NO_DEBUG:NO_DEBUG;
static final int triangleStripArray = !devPhase?NO_DEBUG:NO_DEBUG;
- static final int triangleStripArrayRetained = !devPhase?NO_DEBUG:NO_DEBUG;
+ static final int triangleStripArrayRetained = !devPhase?NO_DEBUG:NO_DEBUG;
static final int unorderList = !devPhase?NO_DEBUG:NO_DEBUG;
static final int vertexArrayRenderMethod = !devPhase?NO_DEBUG:NO_DEBUG;
static final int view = !devPhase?NO_DEBUG:NO_DEBUG;
@@ -391,7 +391,7 @@ class J3dDebug {
static final int wakeupOr = !devPhase?NO_DEBUG:NO_DEBUG;
static final int wakeupOrOfAnds = !devPhase?NO_DEBUG:NO_DEBUG;
-
+
static boolean doDebug(int j3dClassLevel, int level, String str) {
if(j3dClassLevel >= level) {
System.err.print(str);
@@ -416,10 +416,10 @@ class J3dDebug {
static void pkgInfo(ClassLoader classLoader,
String pkgName,
String className) {
-
+
try {
classLoader.loadClass(pkgName + "." + className);
-
+
Package p = Package.getPackage(pkgName);
if (p == null) {
System.err.println("WARNING: Package.getPackage(" +
@@ -451,7 +451,7 @@ class J3dDebug {
// System.err.println();
}
-
+
static {
// initialize the debug flag
debug = false;
diff --git a/src/classes/share/javax/media/j3d/J3dMessage.java b/src/classes/share/javax/media/j3d/J3dMessage.java
index e5a7302..1ba60e2 100644
--- a/src/classes/share/javax/media/j3d/J3dMessage.java
+++ b/src/classes/share/javax/media/j3d/J3dMessage.java
@@ -76,8 +76,8 @@ class J3dMessage extends Object {
static final int ORDERED_GROUP_INSERTED = 32;
static final int ORDERED_GROUP_REMOVED = 33;
static final int COLLISION_BOUND_CHANGED = 34;
- static final int REGION_BOUND_CHANGED = 35;
- static final int MODELCLIP_CHANGED = 36;
+ static final int REGION_BOUND_CHANGED = 35;
+ static final int MODELCLIP_CHANGED = 36;
static final int BOUNDS_AUTO_COMPUTE_CHANGED = 37;
static final int SOUND_ATTRIB_CHANGED = 38;
static final int AURALATTRIBUTES_CHANGED = 39;
@@ -93,8 +93,8 @@ class J3dMessage extends Object {
static final int BEHAVIOR_ACTIVATE = 49;
static final int GEOMETRYARRAY_CHANGED = 50;
static final int MEDIA_CONTAINER_CHANGED = 51;
- static final int RESIZE_CANVAS = 52;
- static final int TOGGLE_CANVAS = 53;
+ static final int RESIZE_CANVAS = 52;
+ static final int TOGGLE_CANVAS = 53;
static final int IMAGE_COMPONENT_CHANGED = 54;
static final int SCHEDULING_INTERVAL_CHANGED = 55;
static final int VIEWSPECIFICGROUP_CHANGED = 56;
@@ -116,12 +116,12 @@ class J3dMessage extends Object {
long time = -1;
/**
- * This is the number of references to this message
+ * This is the number of references to this message
*/
private int refcount = 0;
/**
- * This is a bitmask of the types of threads that need to be run
+ * This is a bitmask of the types of threads that need to be run
* once this message is consumed.
*/
int threads = 0;
@@ -138,7 +138,7 @@ class J3dMessage extends Object {
/**
* This holds the target view of this message, null means all views
- */
+ */
View view = null;
diff --git a/src/classes/share/javax/media/j3d/J3dNodeTable.java b/src/classes/share/javax/media/j3d/J3dNodeTable.java
index 9a41b5c..4433b9d 100644
--- a/src/classes/share/javax/media/j3d/J3dNodeTable.java
+++ b/src/classes/share/javax/media/j3d/J3dNodeTable.java
@@ -75,7 +75,7 @@ class J3dNodeTable {
static final int ORDERED_GROUP = 4;
static final int BRANCH_GROUP = 5;
static final int ENDGROUP = 9; // denotes done with group
-
+
// 10 - 19: Shape3D (in a class by itself)
static final int SHAPE3D = 10;
@@ -97,7 +97,7 @@ class J3dNodeTable {
static final int IMAGE_COMPONENT_2D = 34;
static final int IMAGE_COMPONENT_3D = 35;
static final int ENDAPPEARANCE = 49;
-
+
// 100 - 149: All Geometry types
static final int GEOMETRY = 100;
static final int COMPRESSED_GEOMETRY = 101;
@@ -145,7 +145,7 @@ class J3dNodeTable {
static final int BOUNDING_POLYTOPE = 173;
static final int TRANSFORM3D = 180;
static final int BACKGROUND = 181;
-
+
// 190 - 199: Lights
static final int LIGHT = 190;
static final int POINT_LIGHT = 191;
@@ -153,7 +153,7 @@ class J3dNodeTable {
static final int DIRECTIONAL_LIGHT = 193;
static final int AMBIENT_LIGHT = 194;
-
+
/**
* Constructs this Object, which initializes the array and Hashtable
*/
@@ -170,13 +170,13 @@ class J3dNodeTable {
nodeArray[BRANCH_GROUP] = "BranchGroup";
nodeArray[SHAPE3D] = "Shape3D";
-
+
nodeArray[APPEARANCE] = "Appearance";
nodeArray[MATERIAL] = "Material";
- nodeArray[TEXTURE] = "Texture";
+ nodeArray[TEXTURE] = "Texture";
nodeArray[TEXTURE_2D] = "Texture2D";
nodeArray[TEXTURE_3D] = "Texture3D";
- nodeArray[IMAGE_COMPONENT] = "ImageComponent";
+ nodeArray[IMAGE_COMPONENT] = "ImageComponent";
nodeArray[IMAGE_COMPONENT_2D] = "ImageComponent2D";
nodeArray[IMAGE_COMPONENT_3D] = "ImageComponent3D";
nodeArray[TRANSPARENCY_ATTRIBUTES] = "TransparencyAttributes";
@@ -217,7 +217,7 @@ class J3dNodeTable {
nodeArray[SCALE_INTERPOLATOR] = "ScaleInterpolator";
nodeArray[SOUND_PLAYER] = "SoundPlayer";
nodeArray[SOUND_FADER] = "SoundFader";
-
+
nodeArray[BOUNDS] = "Bounds";
nodeArray[BOUNDING_SPHERE] = "BoundingSphere";
nodeArray[BOUNDING_BOX] = "BoundingBox";
@@ -230,7 +230,7 @@ class J3dNodeTable {
nodeArray[SPOT_LIGHT] = "SpotLight";
nodeArray[DIRECTIONAL_LIGHT] = "DirectionalLight";
nodeArray[AMBIENT_LIGHT] = "AmbientLight";
-
+
for (int i = 0; i < MAX_NUM_NODES; ++i) {
if (nodeArray[i] != null)
nodeTable.put(nodeArray[i], new Integer(i));
@@ -256,7 +256,7 @@ class J3dNodeTable {
if ((lastIndex = fullName.lastIndexOf("Retained")) == -1)
lastIndex = fullName.length();
String nodeName = fullName.substring(firstIndex, lastIndex);
- if ((i = (Integer)nodeTable.get(nodeName))
+ if ((i = (Integer)nodeTable.get(nodeName))
!= null) {
return i.intValue();
}
diff --git a/src/classes/share/javax/media/j3d/J3dStructure.java b/src/classes/share/javax/media/j3d/J3dStructure.java
index aac6dcc..2ce0b5c 100644
--- a/src/classes/share/javax/media/j3d/J3dStructure.java
+++ b/src/classes/share/javax/media/j3d/J3dStructure.java
@@ -35,7 +35,7 @@ import java.util.ArrayList;
import java.util.Arrays;
/**
- * The J3dStructure is the super class of all structures in Java 3D.
+ * The J3dStructure is the super class of all structures in Java 3D.
* A structure is a object that organizes a collection of objects.
*/
@@ -144,13 +144,13 @@ abstract class J3dStructure extends Object {
nMessage = 0;
msgList = new J3dMessage[5];
}
-
+
}
int getNumMessage() {
return nMessage;
}
-
+
/**
* This gets overriden by the structure
*/
@@ -161,12 +161,12 @@ abstract class J3dStructure extends Object {
* for final cleanup. DON'T decrememt message count in
* the method, as it is done by MasterControl.
*/
- abstract void removeNodes(J3dMessage m);
+ abstract void removeNodes(J3dMessage m);
/**
* Release resource associate with this structure before GC
- * We need to clear all those IndexedUnorderSet/WakeupIndexedList
+ * We need to clear all those IndexedUnorderSet/WakeupIndexedList
* so that the listIdx associate with IndexedObject reset to -1.
*/
- abstract void cleanup();
+ abstract void cleanup();
}
diff --git a/src/classes/share/javax/media/j3d/J3dThread.java b/src/classes/share/javax/media/j3d/J3dThread.java
index 63e4e6b..42d9c12 100644
--- a/src/classes/share/javax/media/j3d/J3dThread.java
+++ b/src/classes/share/javax/media/j3d/J3dThread.java
@@ -54,7 +54,7 @@ abstract class J3dThread extends Thread {
static final int UPDATE_TRANSFORM = 0x2000;
/**
- * The classification types.
+ * The classification types.
*/
static final int WORK_THREAD = 0x01;
static final int UPDATE_THREAD = 0x02;
@@ -65,7 +65,7 @@ abstract class J3dThread extends Thread {
static final int WAIT = 0;
/**
- * This runMonitor action notifies MasterControl that this thread
+ * This runMonitor action notifies MasterControl that this thread
* has completed and wait.
*/
static final int NOTIFY_AND_WAIT = 1;
@@ -77,7 +77,7 @@ abstract class J3dThread extends Thread {
static final int NOTIFY = 2;
/**
- * This runMonitor action tells the thread to run N number of
+ * This runMonitor action tells the thread to run N number of
* iterations.
*/
static final int RUN = 2;
@@ -96,7 +96,7 @@ abstract class J3dThread extends Thread {
* This indicates that this thread is alive and running
*/
private volatile boolean running = true;
-
+
/**
* This flag is set by the RUN action of runMonitor to indicate that the
* waiting thread has work to do.
@@ -184,7 +184,7 @@ abstract class J3dThread extends Thread {
J3dThreadData threadData;
int i, j;
J3dThreadData[] newData;
-
+
if (type != RENDER_THREAD) { // Regular Thread
if (data == null) {
data = new J3dThreadData[1];
@@ -211,7 +211,7 @@ abstract class J3dThread extends Thread {
threadData = data[0];
} else {
for (i=0; icloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
@@ -191,7 +191,7 @@ public abstract class LOD extends Behavior {
*/
void duplicateAttributes(Node originalNode, boolean forceDuplicate) {
super.duplicateAttributes(originalNode, forceDuplicate);
-
+
LOD lod = (LOD) originalNode;
int numSwitch = lod.numSwitches();
diff --git a/src/classes/share/javax/media/j3d/Light.java b/src/classes/share/javax/media/j3d/Light.java
index d4c1283..2e591ad 100644
--- a/src/classes/share/javax/media/j3d/Light.java
+++ b/src/classes/share/javax/media/j3d/Light.java
@@ -35,12 +35,12 @@ import javax.vecmath.Color3f;
import java.util.Enumeration;
/**
- * The Light leaf node is an abstract class that defines a set of
+ * The Light leaf node is an abstract class that defines a set of
* parameters common to all
* types of light. These parameters include the light color, an enable
* flag, and a region of influence in which this Light node is active.
* A Light node also contains a list of Group nodes that specifies the
- * hierarchical scope of this Light. If the scope list is empty,
+ * hierarchical scope of this Light. If the scope list is empty,
* the Light node has universe scope: all nodes within the region of
* influence are affected by this Light node. If the scope list is
* non-empty, only those Leaf nodes under the Group nodes in the
@@ -60,7 +60,7 @@ import java.util.Enumeration;
* Light Color
* false
as
* the argument.
- *
+ *
* @see Material
* @see Bounds
* @see BoundingLeaf
@@ -246,7 +246,7 @@ public abstract class Light extends Leaf {
ALLOW_INFLUENCING_BOUNDS_READ,
ALLOW_SCOPE_READ
};
-
+
/**
* Constructs a Light node with default parameters. The default
* values are as follows:
@@ -299,7 +299,7 @@ public abstract class Light extends Leaf {
if(!this.getCapability(ALLOW_STATE_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("Light0"));
- if (isLive())
+ if (isLive())
((LightRetained)this.retained).setEnable(state);
else
((LightRetained)this.retained).initEnable(state);
@@ -409,8 +409,8 @@ public abstract class Light extends Leaf {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_SCOPE_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("Light6"));
-
- if (isLive())
+
+ if (isLive())
((LightRetained)this.retained).insertScope(scope, index);
else
((LightRetained)this.retained).initInsertScope(scope, index);
@@ -645,7 +645,7 @@ public abstract class Light extends Leaf {
* originalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
@@ -663,7 +663,7 @@ public abstract class Light extends Leaf {
*/
void duplicateAttributes(Node originalNode, boolean forceDuplicate) {
super.duplicateAttributes(originalNode, forceDuplicate);
-
+
LightRetained attr = (LightRetained) originalNode.retained;
LightRetained rt = (LightRetained) retained;
@@ -677,7 +677,7 @@ public abstract class Light extends Leaf {
// this reference will set correctly in updateNodeReferences() callback
rt.initAddScope((Group) elm.nextElement());
}
-
+
// this reference will set correctly in updateNodeReferences() callback
rt.initInfluencingBoundingLeaf(attr.getInfluencingBoundingLeaf());
diff --git a/src/classes/share/javax/media/j3d/LightBin.java b/src/classes/share/javax/media/j3d/LightBin.java
index 8ebff0e..20b06dc 100644
--- a/src/classes/share/javax/media/j3d/LightBin.java
+++ b/src/classes/share/javax/media/j3d/LightBin.java
@@ -55,7 +55,7 @@ class LightBin extends Object implements ObjectUpdate {
LightRetained[] lights = null;
/**
- * An Array of reference counts for shared lights in
+ * An Array of reference counts for shared lights in
* among EnvirionmentSets
*/
int[] lightsRef = null;
@@ -95,7 +95,7 @@ class LightBin extends Object implements ObjectUpdate {
int canvasDirty = 0;
/**
- * lightDirty Mask cache , used to
+ * lightDirty Mask cache , used to
* mark the lightdirty bits for next frame
*/
int lightDirtyMaskCache = 0;
@@ -106,8 +106,8 @@ class LightBin extends Object implements ObjectUpdate {
*/
int lightDirtyMask = 0;
- /**
- * List of pointLts in this lightbin
+ /**
+ * List of pointLts in this lightbin
* Need to reload these lights when vworld scale changes
*/
ArrayList pointLts = new ArrayList();
@@ -161,7 +161,7 @@ class LightBin extends Object implements ObjectUpdate {
numEsLights = e.lights.size();
slotsNeeded = numEsLights;
- for (i=0; ioriginalNodeComponent
into
* the current node. This method is called from the
* duplicateNode
method. This routine does
* the actual duplication of all "local data" (any data defined in
- * this object).
+ * this object).
*
* @param originalNodeComponent the original node to duplicate.
* @param forceDuplicate when set to true
, causes the
@@ -483,12 +483,12 @@ public class LineAttributes extends NodeComponent {
* @see Node#cloneTree
* @see NodeComponent#setDuplicateOnCloneTree
*/
- void duplicateAttributes(NodeComponent originalNodeComponent,
- boolean forceDuplicate) {
+ void duplicateAttributes(NodeComponent originalNodeComponent,
+ boolean forceDuplicate) {
super.duplicateAttributes(originalNodeComponent,
forceDuplicate);
-
- LineAttributesRetained attr = (LineAttributesRetained)
+
+ LineAttributesRetained attr = (LineAttributesRetained)
originalNodeComponent.retained;
LineAttributesRetained rt = (LineAttributesRetained) retained;
diff --git a/src/classes/share/javax/media/j3d/LineAttributesRetained.java b/src/classes/share/javax/media/j3d/LineAttributesRetained.java
index 70f3d3d..11c9b6b 100644
--- a/src/classes/share/javax/media/j3d/LineAttributesRetained.java
+++ b/src/classes/share/javax/media/j3d/LineAttributesRetained.java
@@ -57,7 +57,7 @@ class LineAttributesRetained extends NodeComponentRetained {
// user-defined line pattern mask
int linePatternMask = 0xffff;
-
+
// line mask pattern scale factor
int linePatternScaleFactor = 1;
@@ -116,7 +116,7 @@ class LineAttributesRetained extends NodeComponentRetained {
/**
* Enables or disables line antialiasing
- * for this lineAttributes component object and sends a
+ * for this lineAttributes component object and sends a
* message notifying the interested structures of the change.
* @param state true or false to enable or disable line antialiasing
*/
@@ -125,13 +125,13 @@ class LineAttributesRetained extends NodeComponentRetained {
}
/**
* Enables or disables line antialiasing
- * for this lineAttributes component object and sends a
+ * for this lineAttributes component object and sends a
* message notifying the interested structures of the change.
* @param state true or false to enable or disable line antialiasing
*/
final void setLineAntialiasingEnable(boolean state) {
initLineAntialiasingEnable(state);
- sendMessage(LINE_AA_CHANGED,
+ sendMessage(LINE_AA_CHANGED,
(state ? Boolean.TRUE: Boolean.FALSE));
}
@@ -147,7 +147,7 @@ class LineAttributesRetained extends NodeComponentRetained {
/**
* Sets the pattern mask for this LineAttributes component object.
- * This is used when the linePattern attribute is set to
+ * This is used when the linePattern attribute is set to
* PATTERN_USER_DEFINED.
* @param mask the line pattern mask to be used.
*/
@@ -158,8 +158,8 @@ class LineAttributesRetained extends NodeComponentRetained {
/**
* Sets the pattern mask for this LineAttributes component object
* and sends a message notifying the interested structures of change.
- * This is used when the linePattern attribute is set to
- * PATTERN_USER_DEFINED.
+ * This is used when the linePattern attribute is set to
+ * PATTERN_USER_DEFINED.
* @param mask the line pattern mask to be used.
*/
final void setPatternMask(int mask) {
@@ -176,7 +176,7 @@ class LineAttributesRetained extends NodeComponentRetained {
}
/**
- * Sets the pattern mask scale factor for this LineAttributes
+ * Sets the pattern mask scale factor for this LineAttributes
* component object. This is used when the linePattern attribute
* is set to PATTERN_USER_DEFINED.
* @param scaleFactor the scale factor of mask, clamp to [1, 15]
@@ -191,10 +191,10 @@ class LineAttributesRetained extends NodeComponentRetained {
}
/**
- * Sets the pattern mask scale factor for this LineAttributes
- * component object and sends a message notifying the interested
+ * Sets the pattern mask scale factor for this LineAttributes
+ * component object and sends a message notifying the interested
* structures of change. This is used when the linePattern
- * attribute is set to PATTERN_USER_DEFINED.
+ * attribute is set to PATTERN_USER_DEFINED.
* @param scaleFactor the scale factor of mask, clamp to [1, 15]
*/
final void setPatternScaleFactor(int scaleFactor) {
@@ -203,7 +203,7 @@ class LineAttributesRetained extends NodeComponentRetained {
}
/**
- * Retrieves the pattern scale factor for this LineAttributes
+ * Retrieves the pattern scale factor for this LineAttributes
* component object.
* @return the pattern mask scale factor
*/
@@ -212,7 +212,7 @@ class LineAttributesRetained extends NodeComponentRetained {
}
/**
- * Creates and initializes a mirror object, point the mirror object
+ * Creates and initializes a mirror object, point the mirror object
* to the retained object if the object is not editable
*/
synchronized void createMirrorObject() {
@@ -251,13 +251,13 @@ class LineAttributesRetained extends NodeComponentRetained {
((LineAttributesRetained)mirror).set(this);
}
- /** Update the "component" field of the mirror object with the
+ /** Update the "component" field of the mirror object with the
* given "value"
*/
synchronized void updateMirrorObject(int component, Object value) {
LineAttributesRetained mirrorLa = (LineAttributesRetained) mirror;
-
+
if ((component & LINE_WIDTH_CHANGED) != 0) {
mirrorLa.lineWidth = ((Float)value).floatValue();
}
@@ -266,7 +266,7 @@ class LineAttributesRetained extends NodeComponentRetained {
}
else if ((component & LINE_AA_CHANGED) != 0) {
mirrorLa.lineAntialiasing = ((Boolean)value).booleanValue();
- }
+ }
else if ((component & LINE_PATTERN_MASK_CHANGED) != 0) {
mirrorLa.linePatternMask = ((Integer)value).intValue();
}
@@ -275,7 +275,7 @@ class LineAttributesRetained extends NodeComponentRetained {
mirrorLa.linePatternScaleFactor = ((Integer)value).intValue();
}
}
-
+
boolean equivalent(LineAttributesRetained lr) {
return ((lr != null) &&
@@ -298,7 +298,7 @@ class LineAttributesRetained extends NodeComponentRetained {
final void sendMessage(int attrMask, Object attr) {
ArrayList univList = new ArrayList();
- ArrayList gaList = Shape3DRetained.getGeomAtomsList(mirror.users, univList);
+ ArrayList gaList = Shape3DRetained.getGeomAtomsList(mirror.users, univList);
// Send to rendering attribute structure, regardless of
// whether there are users or not (alternate appearance case ..)
@@ -318,7 +318,7 @@ class LineAttributesRetained extends NodeComponentRetained {
createMessage = new J3dMessage();
createMessage.threads = J3dThread.UPDATE_RENDER;
createMessage.type = J3dMessage.LINEATTRIBUTES_CHANGED;
-
+
createMessage.universe = (VirtualUniverse) univList.get(i);
createMessage.args[0] = this;
createMessage.args[1]= new Integer(attrMask);
@@ -328,7 +328,7 @@ class LineAttributesRetained extends NodeComponentRetained {
GeometryAtom[] gaArr = new GeometryAtom[gL.size()];
gL.toArray(gaArr);
createMessage.args[3] = gaArr;
-
+
VirtualUniverse.mc.processMessage(createMessage);
}
diff --git a/src/classes/share/javax/media/j3d/LineStripArrayRetained.java b/src/classes/share/javax/media/j3d/LineStripArrayRetained.java
index f276084..cdf6d7a 100644
--- a/src/classes/share/javax/media/j3d/LineStripArrayRetained.java
+++ b/src/classes/share/javax/media/j3d/LineStripArrayRetained.java
@@ -65,7 +65,7 @@ class LineStripArrayRetained extends GeometryStripArrayRetained {
case PickShape.PICKRAY:
PickRay pickRay= (PickRay) pickShape;
- while(i < stripVertexCounts.length) {
+ while(i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
vtxIndexArr[0] = j;
@@ -85,13 +85,13 @@ class LineStripArrayRetained extends GeometryStripArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
pnts[0].set(pnts[1]);
@@ -101,11 +101,11 @@ class LineStripArrayRetained extends GeometryStripArrayRetained {
break;
case PickShape.PICKSEGMENT:
PickSegment pickSegment = (PickSegment) pickShape;
- Vector3d dir =
- new Vector3d(pickSegment.end.x - pickSegment.start.x,
+ Vector3d dir =
+ new Vector3d(pickSegment.end.x - pickSegment.start.x,
pickSegment.end.y - pickSegment.start.y,
pickSegment.end.z - pickSegment.start.z);
-
+
while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
@@ -115,7 +115,7 @@ class LineStripArrayRetained extends GeometryStripArrayRetained {
vtxIndexArr[1] = j;
getVertexData(j++, pnts[1]);
if (intersectLineAndRay(pnts[0], pnts[1],
- pickSegment.start,
+ pickSegment.start,
dir, sdist, iPnt) &&
(sdist[0] <= 1.0)) {
if (flags == 0) {
@@ -127,30 +127,30 @@ class LineStripArrayRetained extends GeometryStripArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
- pnts[0].set(pnts[1]);
+ pnts[0].set(pnts[1]);
vtxIndexArr[0] = vtxIndexArr[1];
}
}
break;
case PickShape.PICKBOUNDINGBOX:
- BoundingBox bbox = (BoundingBox)
+ BoundingBox bbox = (BoundingBox)
((PickBounds) pickShape).bounds;
- while (i < stripVertexCounts.length) {
+ while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
vtxIndexArr[0] = j;
getVertexData(j++, pnts[0]);
- while (j < end) {
+ while (j < end) {
vtxIndexArr[1] = j;
getVertexData(j++, pnts[1]);
if (intersectBoundingBox(pnts, bbox, sdist, iPnt)) {
@@ -163,26 +163,26 @@ class LineStripArrayRetained extends GeometryStripArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
- pnts[0].set(pnts[1]);
+ pnts[0].set(pnts[1]);
vtxIndexArr[0] = vtxIndexArr[1];
}
}
break;
case PickShape.PICKBOUNDINGSPHERE:
- BoundingSphere bsphere = (BoundingSphere)
+ BoundingSphere bsphere = (BoundingSphere)
((PickBounds) pickShape).bounds;
- while (i < stripVertexCounts.length) {
+ while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
vtxIndexArr[0] = j;
@@ -200,25 +200,25 @@ class LineStripArrayRetained extends GeometryStripArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
- pnts[0].set(pnts[1]);
+ pnts[0].set(pnts[1]);
vtxIndexArr[0] = vtxIndexArr[1];
}
}
break;
case PickShape.PICKBOUNDINGPOLYTOPE:
- BoundingPolytope bpolytope = (BoundingPolytope)
+ BoundingPolytope bpolytope = (BoundingPolytope)
((PickBounds) pickShape).bounds;
- while (i < stripVertexCounts.length) {
+ while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
vtxIndexArr[0] = j;
@@ -236,16 +236,16 @@ class LineStripArrayRetained extends GeometryStripArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
- pnts[0].set(pnts[1]);
+ pnts[0].set(pnts[1]);
vtxIndexArr[0] = vtxIndexArr[1];
}
}
@@ -253,7 +253,7 @@ class LineStripArrayRetained extends GeometryStripArrayRetained {
case PickShape.PICKCYLINDER:
PickCylinder pickCylinder= (PickCylinder) pickShape;
- while (i < stripVertexCounts.length) {
+ while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
vtxIndexArr[0] = j;
@@ -271,16 +271,16 @@ class LineStripArrayRetained extends GeometryStripArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
- pnts[0].set(pnts[1]);
+ pnts[0].set(pnts[1]);
vtxIndexArr[0] = vtxIndexArr[1];
}
}
@@ -288,7 +288,7 @@ class LineStripArrayRetained extends GeometryStripArrayRetained {
case PickShape.PICKCONE:
PickCone pickCone= (PickCone) pickShape;
- while (i < stripVertexCounts.length) {
+ while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
vtxIndexArr[0] = j;
@@ -306,16 +306,16 @@ class LineStripArrayRetained extends GeometryStripArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
- pnts[0].set(pnts[1]);
+ pnts[0].set(pnts[1]);
vtxIndexArr[0] = vtxIndexArr[1];
}
}
@@ -324,8 +324,8 @@ class LineStripArrayRetained extends GeometryStripArrayRetained {
// Should not happen since API already check for this
throw new IllegalArgumentException(J3dI18N.getString("LineStripArrayRetained0"));
default:
- throw new RuntimeException ("PickShape not supported for intersection");
- }
+ throw new RuntimeException ("PickShape not supported for intersection");
+ }
if (minDist < Double.MAX_VALUE) {
iPnt.x = x;
@@ -333,9 +333,9 @@ class LineStripArrayRetained extends GeometryStripArrayRetained {
iPnt.z = z;
return true;
}
- return false;
+ return false;
}
-
+
boolean intersect(Point3d[] pnts) {
int j, end;
Point3d[] points = new Point3d[2];
@@ -354,9 +354,9 @@ class LineStripArrayRetained extends GeometryStripArrayRetained {
while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
- getVertexData(j++, points[0]);
+ getVertexData(j++, points[0]);
while (j < end) {
- getVertexData(j++, points[1]);
+ getVertexData(j++, points[1]);
if (intersectSegment(pnts, points[0], points[1],
dist, null)) {
return true;
@@ -370,9 +370,9 @@ class LineStripArrayRetained extends GeometryStripArrayRetained {
while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
- getVertexData(j++, points[0]);
+ getVertexData(j++, points[0]);
while (j < end) {
- getVertexData(j++, points[1]);
+ getVertexData(j++, points[1]);
dir.x = points[1].x - points[0].x;
dir.y = points[1].y - points[0].y;
dir.z = points[1].z - points[0].z;
@@ -382,7 +382,7 @@ class LineStripArrayRetained extends GeometryStripArrayRetained {
return true;
}
points[0].set(points[1]);
- }
+ }
}
break;
case 1: // Point
@@ -390,9 +390,9 @@ class LineStripArrayRetained extends GeometryStripArrayRetained {
while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
- getVertexData(j++, points[0]);
+ getVertexData(j++, points[0]);
while (j < end) {
- getVertexData(j++, points[1]);
+ getVertexData(j++, points[1]);
dir.x = points[1].x - points[0].x;
dir.y = points[1].y - points[0].y;
dir.z = points[1].z - points[0].z;
@@ -401,7 +401,7 @@ class LineStripArrayRetained extends GeometryStripArrayRetained {
(dist[0] <= 1.0)) {
return true;
}
- points[0].set(points[1]);
+ points[0].set(points[1]);
}
}
break;
@@ -421,10 +421,10 @@ class LineStripArrayRetained extends GeometryStripArrayRetained {
while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
- getVertexData(j++, pnts[0]);
+ getVertexData(j++, pnts[0]);
thisToOtherVworld.transform(pnts[0]);
while (j < end) {
- getVertexData(j++, pnts[1]);
+ getVertexData(j++, pnts[1]);
thisToOtherVworld.transform(pnts[1]);
if (geom.intersect(pnts)) {
return true;
@@ -452,9 +452,9 @@ class LineStripArrayRetained extends GeometryStripArrayRetained {
while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
- getVertexData(j++, pnts[0]);
+ getVertexData(j++, pnts[0]);
while ( j < end) {
- getVertexData(j++, pnts[1]);
+ getVertexData(j++, pnts[1]);
if (intersectBoundingBox(pnts, box, null, null)) {
return true;
}
@@ -467,9 +467,9 @@ class LineStripArrayRetained extends GeometryStripArrayRetained {
while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
- getVertexData(j++, pnts[0]);
+ getVertexData(j++, pnts[0]);
while ( j < end) {
- getVertexData(j++, pnts[1]);
+ getVertexData(j++, pnts[1]);
if (intersectBoundingSphere(pnts, bsphere, null,
null)) {
return true;
@@ -484,9 +484,9 @@ class LineStripArrayRetained extends GeometryStripArrayRetained {
while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
- getVertexData(j++, pnts[0]);
+ getVertexData(j++, pnts[0]);
while ( j < end) {
- getVertexData(j++, pnts[1]);
+ getVertexData(j++, pnts[1]);
if (intersectBoundingPolytope(pnts, bpolytope,
null, null)) {
return true;
@@ -497,7 +497,7 @@ class LineStripArrayRetained extends GeometryStripArrayRetained {
break;
default:
throw new RuntimeException("Bounds not supported for intersection "
- + targetBound);
+ + targetBound);
}
return false;
@@ -520,7 +520,7 @@ class LineStripArrayRetained extends GeometryStripArrayRetained {
- while (i < stripVertexCounts.length) {
+ while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
getVertexData(j++, pnt0);
diff --git a/src/classes/share/javax/media/j3d/LinearFog.java b/src/classes/share/javax/media/j3d/LinearFog.java
index 6b6cf03..65865b0 100644
--- a/src/classes/share/javax/media/j3d/LinearFog.java
+++ b/src/classes/share/javax/media/j3d/LinearFog.java
@@ -246,7 +246,7 @@ public class LinearFog extends Fog {
* originalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
diff --git a/src/classes/share/javax/media/j3d/LinearFogRetained.java b/src/classes/share/javax/media/j3d/LinearFogRetained.java
index 4205ae7..bc7782e 100644
--- a/src/classes/share/javax/media/j3d/LinearFogRetained.java
+++ b/src/classes/share/javax/media/j3d/LinearFogRetained.java
@@ -113,7 +113,7 @@ class LinearFogRetained extends FogRetained {
double getBackDistance(){
return this.backDistance;
}
- /**
+ /**
* This method and its native counterpart update the native context
* fog values.
*/
@@ -123,11 +123,11 @@ class LinearFogRetained extends FogRetained {
color.x, color.y, color.z, frontDistanceInEc, backDistanceInEc);
}
-
+
void setLive(SetLiveState s) {
GroupRetained group;
-
+
super.setLive(s);
// Initialize the mirror object, this needs to be done, when
@@ -148,7 +148,7 @@ class LinearFogRetained extends FogRetained {
}
Object[] scopeInfo = new Object[2];
scopeInfo[0] = ((scopes.size() > 0) ? Boolean.TRUE:Boolean.FALSE);
- scopeInfo[1] = addScopeList;
+ scopeInfo[1] = addScopeList;
createMessage.args[2] = scopeInfo;
Color3f clr = new Color3f(color);
createMessage.args[3] = clr;
@@ -160,12 +160,12 @@ class LinearFogRetained extends FogRetained {
obj[3] = geometryBackground;
obj[4] = new Double(frontDistance);
obj[5] = new Double(backDistance);
-
+
createMessage.args[4] = obj;
VirtualUniverse.mc.processMessage(createMessage);
}
-
+
// The update Object function.
// Note : if you add any more fields here , you need to update
@@ -175,16 +175,16 @@ class LinearFogRetained extends FogRetained {
int component = ((Integer)objs[1]).intValue();
Transform3D trans;
- if ((component & FRONT_DISTANCE_CHANGED) != 0)
+ if ((component & FRONT_DISTANCE_CHANGED) != 0)
((LinearFogRetained)mirrorFog).frontDistance = ((Double)objs[2]).doubleValue();
- if ((component & BACK_DISTANCE_CHANGED) != 0)
+ if ((component & BACK_DISTANCE_CHANGED) != 0)
((LinearFogRetained)mirrorFog).backDistance = ((Double)objs[2]).doubleValue();
if ((component & INIT_MIRROR) != 0) {
((LinearFogRetained)mirrorFog).frontDistance = ((Double)((Object[])objs[4])[4]).doubleValue();
((LinearFogRetained)mirrorFog).backDistance = ((Double)((Object[])objs[4])[5]).doubleValue();
-
+
}
- ((LinearFogRetained)mirrorFog).setLocalToVworldScale(getLastLocalToVworld().getDistanceScale());
+ ((LinearFogRetained)mirrorFog).setLocalToVworldScale(getLastLocalToVworld().getDistanceScale());
super.updateMirrorObject(objs);
}
diff --git a/src/classes/share/javax/media/j3d/Link.java b/src/classes/share/javax/media/j3d/Link.java
index de3e3d9..b4922c5 100644
--- a/src/classes/share/javax/media/j3d/Link.java
+++ b/src/classes/share/javax/media/j3d/Link.java
@@ -40,14 +40,14 @@ package javax.media.j3d;
public class Link extends Leaf {
/**
- * For Link nodes, specifies that the node allows access to
+ * For Link nodes, specifies that the node allows access to
* its object's SharedGroup information.
*/
public static final int
ALLOW_SHARED_GROUP_READ = CapabilityBits.LINK_ALLOW_SHARED_GROUP_READ;
/**
- * For Link nodes, specifies that the node allows writing
+ * For Link nodes, specifies that the node allows writing
* its object's SharedGroup information.
*/
public static final int
@@ -57,7 +57,7 @@ public class Link extends Leaf {
private static final int[] readCapabilities = {
ALLOW_SHARED_GROUP_READ
};
-
+
/**
* Constructs a Link node object that does not yet point to a
* SharedGroup node.
@@ -145,7 +145,7 @@ public class Link extends Leaf {
* originalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
diff --git a/src/classes/share/javax/media/j3d/LinkRetained.java b/src/classes/share/javax/media/j3d/LinkRetained.java
index 8743b7e..3564a3c 100644
--- a/src/classes/share/javax/media/j3d/LinkRetained.java
+++ b/src/classes/share/javax/media/j3d/LinkRetained.java
@@ -41,7 +41,7 @@ class LinkRetained extends LeafRetained {
* The SharedGroup component of the link node.
*/
SharedGroupRetained sharedGroup;
-
+
static String plus = "+";
// This is used when setLive to check for cycle scene graph
@@ -53,7 +53,7 @@ class LinkRetained extends LeafRetained {
((BoundingBox)localBounds).setLower( 1.0, 1.0, 1.0);
((BoundingBox)localBounds).setUpper(-1.0,-1.0,-1.0);
}
-
+
/**
* Sets the SharedGroup reference.
* @param sharedGroup the SharedGroup node
@@ -63,7 +63,7 @@ class LinkRetained extends LeafRetained {
// in already link to another link and live.
HashKey newKeys[] = null;
boolean abort = false;
-
+
if (source.isLive()) {
// bug 4370407: if sharedGroup is a parent, then don't do anything
if (sharedGroup != null) {
@@ -76,27 +76,27 @@ class LinkRetained extends LeafRetained {
}
}
}
- if (abort)
+ if (abort)
return;
}
-
+
newKeys = getNewKeys(locale.nodeId, localToVworldKeys);
-
+
if (this.sharedGroup != null) {
((GroupRetained) parent).checkClearLive(this.sharedGroup,
newKeys, true, null,
- 0, 0, this);
+ 0, 0, this);
this.sharedGroup.parents.removeElement(this);
- }
+ }
}
-
+
if (sharedGroup != null) {
this.sharedGroup =
(SharedGroupRetained)sharedGroup.retained;
} else {
this.sharedGroup = null;
}
-
+
if (source.isLive() && (sharedGroup != null)) {
this.sharedGroup.parents.addElement(this);
@@ -105,16 +105,16 @@ class LinkRetained extends LeafRetained {
int ci = ((GroupRetained) parent).indexOfChild((Node)this.sharedGroup.source);
((GroupRetained) parent).checkSetLive(this.sharedGroup, ci,
newKeys, true, null,
- 0, this);
+ 0, this);
} catch (SceneGraphCycleException e) {
throw e;
} finally {
visited = false;
}
}
-
+
}
-
+
/**
* Retrieves the SharedGroup reference.
* @return the SharedGroup node
@@ -126,7 +126,7 @@ class LinkRetained extends LeafRetained {
void computeCombineBounds(Bounds bounds) {
- if (boundsAutoCompute) {
+ if (boundsAutoCompute) {
sharedGroup.computeCombineBounds(bounds);
} else {
// Should this be lock too ? ( MT safe ? )
@@ -135,8 +135,8 @@ class LinkRetained extends LeafRetained {
}
}
}
-
-
+
+
/**
* Gets the bounding object of a node.
* @return the node's bounding object
@@ -145,9 +145,9 @@ class LinkRetained extends LeafRetained {
return (boundsAutoCompute ?
(Bounds)sharedGroup.getBounds().clone() :
super.getBounds());
- }
-
-
+ }
+
+
/**
* assign a name to this node when it is made live.
*/
@@ -177,14 +177,14 @@ class LinkRetained extends LeafRetained {
try {
this.sharedGroup.setLive(s);
} catch (SceneGraphCycleException e) {
- throw e;
+ throw e;
} finally {
- visited = false;
+ visited = false;
}
s.inSharedGroup = inSharedGroup;
s.keys = oldKeys;
-
+
localBounds.setWithLock(this.sharedGroup.localBounds);
}
@@ -220,12 +220,12 @@ class LinkRetained extends LeafRetained {
localBounds.setWithLock(sharedGroup.localBounds);
parent.recombineAbove();
}
-
+
/**
* assign a name to this node when it is made live.
*/
void clearLive(SetLiveState s) {
-
+
if (sharedGroup != null) {
HashKey newKeys[] = getNewKeys(s.locale.nodeId, s.keys);
super.clearLive(s);
@@ -325,7 +325,7 @@ class LinkRetained extends LeafRetained {
HashKey[] getNewKeys(String localeNodeId, HashKey oldKeys[]) {
HashKey newKeys[];
-
+
if (!inSharedGroup) {
newKeys = new HashKey[1];
newKeys[0] = new HashKey(localeNodeId);
@@ -334,7 +334,7 @@ class LinkRetained extends LeafRetained {
// Need to append this link node id to all keys passed in.
newKeys = new HashKey[oldKeys.length];
for (int i=oldKeys.length-1; i>=0; i--) {
- newKeys[i] = new HashKey(oldKeys[i].toString()
+ newKeys[i] = new HashKey(oldKeys[i].toString()
+ plus + nodeId);
}
}
diff --git a/src/classes/share/javax/media/j3d/Locale.java b/src/classes/share/javax/media/j3d/Locale.java
index 5407983..ab92bd3 100644
--- a/src/classes/share/javax/media/j3d/Locale.java
+++ b/src/classes/share/javax/media/j3d/Locale.java
@@ -140,7 +140,7 @@ public class Locale extends Object {
* @param y an eight element array specifying the y position
* @param z an eight element array specifying the z position
*/
- public void setHiRes(int[] x, int[] y, int[] z) {
+ public void setHiRes(int[] x, int[] y, int[] z) {
this.hiRes.setHiResCoord(x, y, z);
}
@@ -163,7 +163,7 @@ public class Locale extends Object {
}
/**
- * Add a new branch graph rooted at BranchGroup to
+ * Add a new branch graph rooted at BranchGroup to
* the list of branch graphs.
* @param branchGroup root of the branch graph to be added
* @exception IllegalStateException if this Locale has been
@@ -214,7 +214,7 @@ public class Locale extends Object {
s.currentTransformsIndex[0] = new int[2];
s.currentTransformsIndex[0][0] = 0;
s.currentTransformsIndex[0][1] = 0;
-
+
s.localToVworld = s.currentTransforms;
s.localToVworldIndex = s.currentTransformsIndex;
@@ -238,7 +238,7 @@ public class Locale extends Object {
createMessage.args[2] = s.ogOrderedIdList.toArray();
createMessage.args[3] = s.ogCIOList.toArray();
createMessage.args[4] = s.ogCIOTableList.toArray();
-
+
VirtualUniverse.mc.processMessage(createMessage);
createMessage = new J3dMessage();
@@ -249,8 +249,8 @@ public class Locale extends Object {
createMessage.args[1] = s.changedViewList;
createMessage.args[2] = s.keyList;
VirtualUniverse.mc.processMessage(createMessage);
-
-
+
+
createMessage = new J3dMessage();
createMessage.threads = s.notifyThreads;
createMessage.type = J3dMessage.INSERT_NODES;
@@ -282,7 +282,7 @@ public class Locale extends Object {
}
/**
- * Removes a branch graph rooted at BranchGroup from
+ * Removes a branch graph rooted at BranchGroup from
* the list of branch graphs.
* @param branchGroup root of the branch graph to be removed
* @exception IllegalStateException if this Locale has been
@@ -337,7 +337,7 @@ public class Locale extends Object {
// The method that does the work once the lock is acquired.
- void doRemoveBranchGraph(BranchGroup branchGroup,
+ void doRemoveBranchGraph(BranchGroup branchGroup,
J3dMessage messages[], int startIndex) {
BranchGroupRetained bgr = (BranchGroupRetained)branchGroup.retained;
@@ -411,7 +411,7 @@ public class Locale extends Object {
}
/**
- * Replaces the branch graph rooted at oldGroup in the list of
+ * Replaces the branch graph rooted at oldGroup in the list of
* branch graphs with the branch graph rooted at
* newGroup.
* @param oldGroup root of the branch graph to be replaced.
@@ -455,7 +455,7 @@ public class Locale extends Object {
BranchGroupRetained nbgr = (BranchGroupRetained)newGroup.retained;
J3dMessage createMessage;
J3dMessage destroyMessage;
-
+
branchGroups.removeElement(oldGroup);
obgr.attachedToLocale = false;
@@ -514,7 +514,7 @@ public class Locale extends Object {
universe.setLiveState.switchStates.add(new SwitchState(false));
nbgr.setLive(universe.setLiveState);
-
+
createMessage = new J3dMessage();
createMessage.threads = J3dThread.UPDATE_RENDER| J3dThread.UPDATE_RENDERING_ENVIRONMENT;
@@ -569,7 +569,7 @@ public class Locale extends Object {
public int numBranchGraphs(){
return branchGroups.size();
}
-
+
/**
* Gets an Enumeration object of all branch graphs in this Locale.
* @return an Enumeration object of all branch graphs.
@@ -584,44 +584,44 @@ public class Locale extends Object {
return branchGroups.elements();
}
-
+
void validateModeFlagAndPickShape(int mode, int flags, PickShape pickShape) {
if (universe == null) {
throw new IllegalStateException(J3dI18N.getString("Locale4"));
}
-
+
if((mode != PickInfo.PICK_BOUNDS) && (mode != PickInfo.PICK_GEOMETRY)) {
-
+
throw new IllegalArgumentException(J3dI18N.getString("Locale5"));
}
-
+
if((pickShape instanceof PickPoint) && (mode == PickInfo.PICK_GEOMETRY)) {
throw new IllegalArgumentException(J3dI18N.getString("Locale6"));
}
-
+
if(((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) &&
((flags & PickInfo.ALL_GEOM_INFO) != 0)) {
throw new IllegalArgumentException(J3dI18N.getString("Locale7"));
}
-
- if((mode == PickInfo.PICK_BOUNDS) &&
- (((flags & (PickInfo.CLOSEST_GEOM_INFO |
+
+ if((mode == PickInfo.PICK_BOUNDS) &&
+ (((flags & (PickInfo.CLOSEST_GEOM_INFO |
PickInfo.ALL_GEOM_INFO |
PickInfo.CLOSEST_DISTANCE |
PickInfo.CLOSEST_INTERSECTION_POINT)) != 0))) {
-
+
throw new IllegalArgumentException(J3dI18N.getString("Locale8"));
}
-
- if((pickShape instanceof PickBounds) &&
- (((flags & (PickInfo.CLOSEST_GEOM_INFO |
+
+ if((pickShape instanceof PickBounds) &&
+ (((flags & (PickInfo.CLOSEST_GEOM_INFO |
PickInfo.ALL_GEOM_INFO |
PickInfo.CLOSEST_DISTANCE |
PickInfo.CLOSEST_INTERSECTION_POINT)) != 0))) {
-
+
throw new IllegalArgumentException(J3dI18N.getString("Locale9"));
- }
+ }
}
/**
@@ -643,7 +643,7 @@ public class Locale extends Object {
PickInfo[] pickInfoArr = pickAll( PickInfo.PICK_BOUNDS,
PickInfo.SCENEGRAPHPATH, pickShape);
-
+
if(pickInfoArr == null) {
return null;
}
@@ -653,25 +653,25 @@ public class Locale extends Object {
}
return sgpArr;
-
+
}
/**
- * Returns an array unsorted references to all the PickInfo objects that are pickable
- * below this Locale
that intersect with PickShape.
- * The accuracy of the pick is set by the pick mode. The mode include :
- * PickInfo.PICK_BOUNDS and PickInfo.PICK_GEOMETRY. The amount of information returned
- * is specified via a masked variable, flags, indicating which components are
- * present in each returned PickInfo object.
+ * Returns an array unsorted references to all the PickInfo objects that are pickable
+ * below this Locale
that intersect with PickShape.
+ * The accuracy of the pick is set by the pick mode. The mode include :
+ * PickInfo.PICK_BOUNDS and PickInfo.PICK_GEOMETRY. The amount of information returned
+ * is specified via a masked variable, flags, indicating which components are
+ * present in each returned PickInfo object.
*
* @param mode picking mode, one of PickInfo.PICK_BOUNDS
or PickInfo.PICK_GEOMETRY
.
*
- * @param flags a mask indicating which components are present in each PickInfo object.
- * This is specified as one or more individual bits that are bitwise "OR"ed together to
+ * @param flags a mask indicating which components are present in each PickInfo object.
+ * This is specified as one or more individual bits that are bitwise "OR"ed together to
* describe the PickInfo data. The flags include :
*
- *
PickInfo.SCENEGRAPHPATH
- request for computed SceneGraphPath.
+ * PickInfo.SCENEGRAPHPATH
- request for computed SceneGraphPath.
* PickInfo.NODE
- request for computed intersected Node.
* PickInfo.LOCAL_TO_VWORLD
- request for computed local to virtual world transform.
* PickInfo.CLOSEST_INTERSECTION_POINT
- request for closest intersection point.
@@ -682,20 +682,20 @@ public class Locale extends Object {
*
* @param pickShape the description of this picking volume or area.
*
- * @exception IllegalArgumentException if flags contains both CLOSEST_GEOM_INFO and
+ * @exception IllegalArgumentException if flags contains both CLOSEST_GEOM_INFO and
* ALL_GEOM_INFO.
*
* @exception IllegalArgumentException if pickShape is a PickPoint and pick mode
* is set to PICK_GEOMETRY.
*
- * @exception IllegalArgumentException if pick mode is neither PICK_BOUNDS
+ * @exception IllegalArgumentException if pick mode is neither PICK_BOUNDS
* nor PICK_GEOMETRY.
*
- * @exception IllegalArgumentException if pick mode is PICK_BOUNDS
+ * @exception IllegalArgumentException if pick mode is PICK_BOUNDS
* and flags includes any of CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE,
* CLOSEST_GEOM_INFO or ALL_GEOM_INFO.
*
- * @exception IllegalArgumentException if pickShape is PickBounds
+ * @exception IllegalArgumentException if pickShape is PickBounds
* and flags includes any of CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE,
* CLOSEST_GEOM_INFO or ALL_GEOM_INFO.
*
@@ -706,14 +706,14 @@ public class Locale extends Object {
* PICK_GEOMETRY and the Geometry.ALLOW_INTERSECT capability bit
* is not set in any Geometry objects referred to by any shape
* node whose bounds intersects the PickShape.
- *
+ *
* @exception CapabilityNotSetException if flags contains any of
* CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE, CLOSEST_GEOM_INFO
* or ALL_GEOM_INFO, and the capability bits that control reading of
* coordinate data are not set in any GeometryArray object referred
* to by any shape node that intersects the PickShape.
* The capability bits that must be set to avoid this exception are as follows :
- *
+ *
*
* A spot light contributes to diffuse and specular reflections, which
@@ -147,7 +147,7 @@ public class SpotLight extends PointLight {
*/
public SpotLight(Color3f color,
Point3f position,
- Point3f attenuation,
+ Point3f attenuation,
Vector3f direction,
float spreadAngle,
float concentration) {
@@ -175,7 +175,7 @@ public class SpotLight extends PointLight {
public SpotLight(boolean lightOn,
Color3f color,
Point3f position,
- Point3f attenuation,
+ Point3f attenuation,
Vector3f direction,
float spreadAngle,
float concentration) {
@@ -197,7 +197,7 @@ public class SpotLight extends PointLight {
this.retained = new SpotLightRetained();
this.retained.setSource(this);
}
-
+
/**
* Sets spot light spread angle.
@@ -361,7 +361,7 @@ public class SpotLight extends PointLight {
*/
void duplicateAttributes(Node originalNode, boolean
forceDuplicate) {
-
+
super.duplicateAttributes(originalNode, forceDuplicate);
SpotLightRetained attr = (SpotLightRetained) originalNode.retained;
@@ -372,6 +372,6 @@ public class SpotLight extends PointLight {
Vector3f v = new Vector3f();
attr.getDirection(v);
rt.initDirection(v);
-
+
}
}
diff --git a/src/classes/share/javax/media/j3d/SpotLightRetained.java b/src/classes/share/javax/media/j3d/SpotLightRetained.java
index a618dc9..5f76e19 100644
--- a/src/classes/share/javax/media/j3d/SpotLightRetained.java
+++ b/src/classes/share/javax/media/j3d/SpotLightRetained.java
@@ -171,7 +171,7 @@ class SpotLightRetained extends PointLightRetained {
staticTransform.transform.transform(this.direction, this.direction);
}
}
-
+
/**
* Sets this light's direction from the three values provided.
* @param x the new x direction
@@ -196,7 +196,7 @@ class SpotLightRetained extends PointLightRetained {
}
}
- /**
+ /**
* This update function, and its native counterpart,
* updates a spot light. This includes its color, attenuation,
* transformed position, spread angle, concentration,
@@ -215,7 +215,7 @@ class SpotLightRetained extends PointLightRetained {
}
- /**
+ /**
* This update function, and its native counterpart,
* updates a directional light. This includes its
* color and its transformed direction.
@@ -234,7 +234,7 @@ class SpotLightRetained extends PointLightRetained {
if (mLgts[i].nodeType == NodeRetained.SPOTLIGHT) {
SpotLightRetained ml = (SpotLightRetained)mLgts[i];
ml.direction = (Vector3f)objs[4];
- ml.getLastLocalToVworld().transform(ml.direction,
+ ml.getLastLocalToVworld().transform(ml.direction,
ml.xformDirection);
ml.xformDirection.normalize();
}
@@ -247,10 +247,10 @@ class SpotLightRetained extends PointLightRetained {
ml.spreadAngle = ((Float)objs[4]).floatValue();
}
}
-
+
}
else if ((component & CONCENTRATION_CHANGED) != 0) {
-
+
for (i = 0; i < numLgts; i++) {
if (mLgts[i].nodeType == NodeRetained.SPOTLIGHT) {
SpotLightRetained ml = (SpotLightRetained)mLgts[i];
@@ -265,7 +265,7 @@ class SpotLightRetained extends PointLightRetained {
ml.spreadAngle = ((Float)((Object[])objs[4])[9]).floatValue();
ml.concentration = ((Float)((Object[])objs[4])[10]).floatValue();
ml.direction = (Vector3f)((Object[])objs[4])[11];
- ml.getLastLocalToVworld().transform(ml.direction,
+ ml.getLastLocalToVworld().transform(ml.direction,
ml.xformDirection);
ml.xformDirection.normalize();
}
@@ -283,7 +283,7 @@ class SpotLightRetained extends PointLightRetained {
sr.direction = new Vector3f(direction);
sr.xformDirection = new Vector3f();
return sr;
- }
+ }
diff --git a/src/classes/share/javax/media/j3d/StructureUpdateThread.java b/src/classes/share/javax/media/j3d/StructureUpdateThread.java
index 1e09f35..5aeed1c 100644
--- a/src/classes/share/javax/media/j3d/StructureUpdateThread.java
+++ b/src/classes/share/javax/media/j3d/StructureUpdateThread.java
@@ -40,13 +40,13 @@ class StructureUpdateThread extends J3dThread {
* The structure that this thread works for
*/
J3dStructure structure;
-
+
/**
* Some variables used to name threads correctly
*/
private static int numInstances[] = new int[7];
private int instanceNum[] = new int[7];
-
+
private synchronized int newInstanceNum(int idx) {
return (++numInstances[idx]);
}
@@ -90,12 +90,12 @@ class StructureUpdateThread extends J3dThread {
case J3dThread.UPDATE_TRANSFORM:
setName("J3D-TransformStructureUpdateThread-"+ getInstanceNum(5));
break;
- case J3dThread.SOUND_SCHEDULER:
+ case J3dThread.SOUND_SCHEDULER:
setName("J3D-SoundSchedulerUpdateThread-"+ getInstanceNum(6));
break;
}
-
+
}
void doWork(long referenceTime) {
diff --git a/src/classes/share/javax/media/j3d/Switch.java b/src/classes/share/javax/media/j3d/Switch.java
index b84d54e..8532364 100644
--- a/src/classes/share/javax/media/j3d/Switch.java
+++ b/src/classes/share/javax/media/j3d/Switch.java
@@ -45,7 +45,7 @@ import java.util.BitSet;
*/
public class Switch extends Group {
-
+
/**
* Specifies that this node allows reading its child selection
* and mask values and its current child.
@@ -87,7 +87,7 @@ public class Switch extends Group {
private static final int[] readCapabilities = {
ALLOW_SWITCH_READ
};
-
+
/**
* Constructs a Switch node with default parameters.
* The default values are as follows:
@@ -98,7 +98,7 @@ public class Switch extends Group {
*/
public Switch() {
// set default read capabilities
- setDefaultReadCapabilities(readCapabilities);
+ setDefaultReadCapabilities(readCapabilities);
}
/**
@@ -108,7 +108,7 @@ public class Switch extends Group {
*/
public Switch(int whichChild) {
// set default read capabilities
- setDefaultReadCapabilities(readCapabilities);
+ setDefaultReadCapabilities(readCapabilities);
((SwitchRetained)this.retained).setWhichChild(whichChild, true);
}
@@ -121,7 +121,7 @@ public class Switch extends Group {
*/
public Switch(int whichChild, BitSet childMask){
// set default read capabilities
- setDefaultReadCapabilities(readCapabilities);
+ setDefaultReadCapabilities(readCapabilities);
((SwitchRetained)this.retained).setWhichChild(whichChild, true);
((SwitchRetained)this.retained).setChildMask(childMask);
diff --git a/src/classes/share/javax/media/j3d/SwitchRetained.java b/src/classes/share/javax/media/j3d/SwitchRetained.java
index c180f04..0bbd8d4 100644
--- a/src/classes/share/javax/media/j3d/SwitchRetained.java
+++ b/src/classes/share/javax/media/j3d/SwitchRetained.java
@@ -52,7 +52,7 @@ class SwitchRetained extends GroupRetained implements TargetsInterface
int whichChild = Switch.CHILD_NONE;
/**
- * The BitSet specifying which children are to be selected for
+ * The BitSet specifying which children are to be selected for
* rendering. This is used ONLY if whichChild is set to CHILD_MASK.
*/
BitSet childMask = new BitSet();
@@ -84,11 +84,11 @@ class SwitchRetained extends GroupRetained implements TargetsInterface
}
/**
- * Sets which child should be drawn.
+ * Sets which child should be drawn.
* @param whichChild the child to choose during a render operation
*/
// synchronized with clearLive
- synchronized void setWhichChild(int whichChild, boolean updateAlways) {
+ synchronized void setWhichChild(int whichChild, boolean updateAlways) {
int i, nchildren;
@@ -156,12 +156,12 @@ class SwitchRetained extends GroupRetained implements TargetsInterface
* Returns the index of the current child.
* @return the default child's index
*/
- int getWhichChild() {
+ int getWhichChild() {
return this.whichChild;
}
/**
- * Sets current childMask.
+ * Sets current childMask.
* @param childMask a BitSet to select the children for rendering
*/
// synchronized with clearLive
@@ -182,7 +182,7 @@ class SwitchRetained extends GroupRetained implements TargetsInterface
}
}
this.isDirty = true;
- if (source != null && source.isLive() &&
+ if (source != null && source.isLive() &&
whichChild == Switch.CHILD_MASK) {
updateTargets = new UpdateTargets();
ArrayList updateList = new ArrayList(1);
@@ -262,7 +262,7 @@ class SwitchRetained extends GroupRetained implements TargetsInterface
/**
* Returns the current childMask.
- * @return the current childMask
+ * @return the current childMask
*/
final BitSet getChildMask() {
return (BitSet)this.childMask.clone();
@@ -322,7 +322,7 @@ class SwitchRetained extends GroupRetained implements TargetsInterface
}
}
// Note that s.childSwitchLinks is updated in super.setLive
- s.parentSwitchLink = this;
+ s.parentSwitchLink = this;
if (!inSharedGroup) {
setAuxData(s, 0, 0);
@@ -332,7 +332,7 @@ class SwitchRetained extends GroupRetained implements TargetsInterface
s.hashkeyIndex = new int[s.keys.length];
for(j=0; jPickInfo.PICK_BOUNDS
or PickInfo.PICK_GEOMETRY
.
*
- * @param flags a mask indicating which components are present in each PickInfo object.
- * This is specified as one or more individual bits that are bitwise "OR"ed together to
+ * @param flags a mask indicating which components are present in each PickInfo object.
+ * This is specified as one or more individual bits that are bitwise "OR"ed together to
* describe the PickInfo data. The flags include :
*
- *
PickInfo.SCENEGRAPHPATH
- request for computed SceneGraphPath.
+ * PickInfo.SCENEGRAPHPATH
- request for computed SceneGraphPath.
* PickInfo.NODE
- request for computed intersected Node.
* PickInfo.LOCAL_TO_VWORLD
- request for computed local to virtual world transform.
* PickInfo.CLOSEST_INTERSECTION_POINT
- request for closest intersection point.
@@ -799,20 +799,20 @@ public class Locale extends Object {
*
* @param pickShape the description of this picking volume or area.
*
- * @exception IllegalArgumentException if flags contains both CLOSEST_GEOM_INFO and
+ * @exception IllegalArgumentException if flags contains both CLOSEST_GEOM_INFO and
* ALL_GEOM_INFO.
*
* @exception IllegalArgumentException if pickShape is a PickPoint and pick mode
* is set to PICK_GEOMETRY.
*
- * @exception IllegalArgumentException if pick mode is neither PICK_BOUNDS
+ * @exception IllegalArgumentException if pick mode is neither PICK_BOUNDS
* nor PICK_GEOMETRY.
*
- * @exception IllegalArgumentException if pick mode is PICK_BOUNDS
+ * @exception IllegalArgumentException if pick mode is PICK_BOUNDS
* and flags includes any of CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE,
* CLOSEST_GEOM_INFO or ALL_GEOM_INFO.
*
- * @exception IllegalArgumentException if pickShape is PickBounds
+ * @exception IllegalArgumentException if pickShape is PickBounds
* and flags includes any of CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE,
* CLOSEST_GEOM_INFO or ALL_GEOM_INFO.
*
@@ -823,14 +823,14 @@ public class Locale extends Object {
* PICK_GEOMETRY and the Geometry.ALLOW_INTERSECT capability bit
* is not set in any Geometry objects referred to by any shape
* node whose bounds intersects the PickShape.
- *
+ *
* @exception CapabilityNotSetException if flags contains any of
* CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE, CLOSEST_GEOM_INFO
* or ALL_GEOM_INFO, and the capability bits that control reading of
* coordinate data are not set in any GeometryArray object referred
* to by any shape node that intersects the PickShape.
* The capability bits that must be set to avoid this exception are as follows :
- *
+ *
@@ -424,7 +424,7 @@ public class RenderingAttributes extends NodeComponent {
public static final int NOT_EQUAL = 3;
/**
- * Specifies that pixels are drawn if the source/reference value is less
+ * Specifies that pixels are drawn if the source/reference value is less
* than the destination/test value.
* Can be used to specify the alpha test function, the depth test function,
* or the stencil function.
@@ -436,7 +436,7 @@ public class RenderingAttributes extends NodeComponent {
public static final int LESS = 4;
/**
- * Specifies that pixels are drawn if the source/reference value is less
+ * Specifies that pixels are drawn if the source/reference value is less
* than or equal to the destination/test value.
* Can be used to specify the alpha test function, the depth test function,
* or the stencil function.
@@ -448,7 +448,7 @@ public class RenderingAttributes extends NodeComponent {
public static final int LESS_OR_EQUAL = 5;
/**
- * Specifies that pixels are drawn if the source/reference value is greater
+ * Specifies that pixels are drawn if the source/reference value is greater
* than the destination/test value.
* Can be used to specify the alpha test function, the depth test function,
* or the stencil function.
@@ -460,7 +460,7 @@ public class RenderingAttributes extends NodeComponent {
public static final int GREATER = 6;
/**
- * Specifies that pixels are drawn if the source/reference value is greater
+ * Specifies that pixels are drawn if the source/reference value is greater
* than or equal to the destination/test value.
* Can be used to specify the alpha test function, the depth test function,
* or the stencil function.
@@ -515,7 +515,7 @@ public class RenderingAttributes extends NodeComponent {
* @since Java 3D 1.4
*/
public static final int ROP_AND_INVERTED = 0x4;
-
+
/**
* Raster operation:
*
* pickShape
.
- * The accuracy of the pick is set by the pick mode. The mode include :
- * PickInfo.PICK_BOUNDS and PickInfo.PICK_GEOMETRY. The amount of information returned
- * is specified via a masked variable, flags, indicating which components are
- * present in each returned PickInfo object.
+ * The accuracy of the pick is set by the pick mode. The mode include :
+ * PickInfo.PICK_BOUNDS and PickInfo.PICK_GEOMETRY. The amount of information returned
+ * is specified via a masked variable, flags, indicating which components are
+ * present in each returned PickInfo object.
*
* @param mode picking mode, one of PickInfo.PICK_BOUNDS
or PickInfo.PICK_GEOMETRY
.
*
- * @param flags a mask indicating which components are present in each PickInfo object.
- * This is specified as one or more individual bits that are bitwise "OR"ed together to
+ * @param flags a mask indicating which components are present in each PickInfo object.
+ * This is specified as one or more individual bits that are bitwise "OR"ed together to
* describe the PickInfo data. The flags include :
*
- *
PickInfo.SCENEGRAPHPATH
- request for computed SceneGraphPath.
+ * PickInfo.SCENEGRAPHPATH
- request for computed SceneGraphPath.
* PickInfo.NODE
- request for computed intersected Node.
* PickInfo.LOCAL_TO_VWORLD
- request for computed local to virtual world transform.
* PickInfo.CLOSEST_INTERSECTION_POINT
- request for closest intersection point.
@@ -923,20 +923,20 @@ public class Locale extends Object {
*
* @param pickShape the description of this picking volume or area.
*
- * @exception IllegalArgumentException if flags contains both CLOSEST_GEOM_INFO and
+ * @exception IllegalArgumentException if flags contains both CLOSEST_GEOM_INFO and
* ALL_GEOM_INFO.
*
* @exception IllegalArgumentException if pickShape is a PickPoint and pick mode
* is set to PICK_GEOMETRY.
*
- * @exception IllegalArgumentException if pick mode is neither PICK_BOUNDS
+ * @exception IllegalArgumentException if pick mode is neither PICK_BOUNDS
* nor PICK_GEOMETRY.
*
- * @exception IllegalArgumentException if pick mode is PICK_BOUNDS
+ * @exception IllegalArgumentException if pick mode is PICK_BOUNDS
* and flags includes any of CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE,
* CLOSEST_GEOM_INFO or ALL_GEOM_INFO.
*
- * @exception IllegalArgumentException if pickShape is PickBounds
+ * @exception IllegalArgumentException if pickShape is PickBounds
* and flags includes any of CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE,
* CLOSEST_GEOM_INFO or ALL_GEOM_INFO.
*
@@ -947,14 +947,14 @@ public class Locale extends Object {
* PICK_GEOMETRY and the Geometry.ALLOW_INTERSECT capability bit
* is not set in any Geometry objects referred to by any shape
* node whose bounds intersects the PickShape.
- *
+ *
* @exception CapabilityNotSetException if flags contains any of
* CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE, CLOSEST_GEOM_INFO
* or ALL_GEOM_INFO, and the capability bits that control reading of
* coordinate data are not set in any GeometryArray object referred
* to by any shape node that intersects the PickShape.
* The capability bits that must be set to avoid this exception are as follows :
- *
+ *
@@ -105,7 +105,7 @@ package javax.media.j3d;
* This value is compared to the alpha value of each rendered pixel.
* The alpha test value is set with the
*
@@ -87,16 +87,16 @@ package javax.media.j3d;
*
* pickShape
.
- * The accuracy of the pick is set by the pick mode. The mode include :
- * PickInfo.PICK_BOUNDS and PickInfo.PICK_GEOMETRY. The amount of information returned
- * is specified via a masked variable, flags, indicating which components are
- * present in each returned PickInfo object.
+ * The accuracy of the pick is set by the pick mode. The mode include :
+ * PickInfo.PICK_BOUNDS and PickInfo.PICK_GEOMETRY. The amount of information returned
+ * is specified via a masked variable, flags, indicating which components are
+ * present in each returned PickInfo object.
*
* @param mode picking mode, one of PickInfo.PICK_BOUNDS
or PickInfo.PICK_GEOMETRY
.
*
- * @param flags a mask indicating which components are present in each PickInfo object.
- * This is specified as one or more individual bits that are bitwise "OR"ed together to
+ * @param flags a mask indicating which components are present in each PickInfo object.
+ * This is specified as one or more individual bits that are bitwise "OR"ed together to
* describe the PickInfo data. The flags include :
*
- *
* PickInfo.SCENEGRAPHPATH
- request for computed SceneGraphPath.
+ * PickInfo.SCENEGRAPHPATH
- request for computed SceneGraphPath.
* PickInfo.NODE
- request for computed intersected Node.
* PickInfo.LOCAL_TO_VWORLD
- request for computed local to virtual world transform.
* PickInfo.CLOSEST_INTERSECTION_POINT
- request for closest intersection point.
@@ -1032,20 +1032,20 @@ public class Locale extends Object {
*
* @param pickShape the description of this picking volume or area.
*
- * @exception IllegalArgumentException if flags contains both CLOSEST_GEOM_INFO and
+ * @exception IllegalArgumentException if flags contains both CLOSEST_GEOM_INFO and
* ALL_GEOM_INFO.
*
* @exception IllegalArgumentException if pickShape is a PickPoint and pick mode
* is set to PICK_GEOMETRY.
*
- * @exception IllegalArgumentException if pick mode is neither PICK_BOUNDS
+ * @exception IllegalArgumentException if pick mode is neither PICK_BOUNDS
* nor PICK_GEOMETRY.
*
- * @exception IllegalArgumentException if pick mode is PICK_BOUNDS
+ * @exception IllegalArgumentException if pick mode is PICK_BOUNDS
* and flags includes any of CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE,
* CLOSEST_GEOM_INFO or ALL_GEOM_INFO.
*
- * @exception IllegalArgumentException if pickShape is PickBounds
+ * @exception IllegalArgumentException if pickShape is PickBounds
* and flags includes any of CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE,
* CLOSEST_GEOM_INFO or ALL_GEOM_INFO.
*
@@ -1056,14 +1056,14 @@ public class Locale extends Object {
* PICK_GEOMETRY and the Geometry.ALLOW_INTERSECT capability bit
* is not set in any Geometry objects referred to by any shape
* node whose bounds intersects the PickShape.
- *
+ *
* @exception CapabilityNotSetException if flags contains any of
* CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE, CLOSEST_GEOM_INFO
* or ALL_GEOM_INFO, and the capability bits that control reading of
* coordinate data are not set in any GeometryArray object referred
* to by any shape node that intersects the PickShape.
* The capability bits that must be set to avoid this exception are as follows :
- *
+ *
*/
@@ -140,7 +140,7 @@ public class PointSound extends Sound {
// set default read capabilities
setDefaultReadCapabilities(readCapabilities);
- }
+ }
/**
* Constructs a PointSound node object using only the provided parameter
@@ -150,7 +150,7 @@ public class PointSound extends Sound {
* @param soundData sound data associated with this sound source node
* @param initialGain amplitude scale factor applied to sound source
* @param position 3D location of source
- */
+ */
public PointSound(MediaContainer soundData,
float initialGain,
Point3f position) {
@@ -160,7 +160,7 @@ public class PointSound extends Sound {
setDefaultReadCapabilities(readCapabilities);
((PointSoundRetained)this.retained).setPosition(position);
- }
+ }
/**
* Constructs a PointSound node object using only the provided parameter
@@ -172,7 +172,7 @@ public class PointSound extends Sound {
* @param posX x coordinate of location of source
* @param posY y coordinate of location of source
* @param posZ z coordinate of location of source
- */
+ */
public PointSound(MediaContainer soundData,
float initialGain,
float posX, float posY, float posZ ) {
@@ -182,7 +182,7 @@ public class PointSound extends Sound {
setDefaultReadCapabilities(readCapabilities);
((PointSoundRetained)this.retained).setPosition(posX,posY,posZ);
- }
+ }
// The next four constructors fill all this classes fields with the provided
// arguments values.
@@ -191,7 +191,7 @@ public class PointSound extends Sound {
/**
* Construct a PointSound object accepting Point3f as input for the position
- * and accepting an array of Point2f for the distance attenuation values
+ * and accepting an array of Point2f for the distance attenuation values
* where each pair in the array contains a distance and a gain scale factor.
* @param soundData sound data associated with this sound source node
* @param initialGain amplitude scale factor applied to sound source
@@ -203,7 +203,7 @@ public class PointSound extends Sound {
* @param priority playback ranking value
* @param position 3D location of source
* @param distanceGain array of (distance,gain) pairs controling attenuation
- */
+ */
public PointSound(MediaContainer soundData,
float initialGain,
int loopCount,
@@ -212,10 +212,10 @@ public class PointSound extends Sound {
boolean enable,
Bounds region,
float priority,
- Point3f position,
+ Point3f position,
Point2f[] distanceGain) {
- super(soundData, initialGain, loopCount, release, continuous,
+ super(soundData, initialGain, loopCount, release, continuous,
enable, region, priority );
// set default read capabilities
@@ -223,13 +223,13 @@ public class PointSound extends Sound {
((PointSoundRetained)this.retained).setPosition(position);
((PointSoundRetained)this.retained).setDistanceGain(distanceGain);
- }
+ }
/**
- * Construct a PointSound object accepting individual float parameters for
+ * Construct a PointSound object accepting individual float parameters for
* the elements of the position point, and accepting an array of Point2f for
- * the distance attenuation values where each pair in the array contains a
- * distance and a gain scale factor.
+ * the distance attenuation values where each pair in the array contains a
+ * distance and a gain scale factor.
* @param soundData sound data associated with this sound source node
* @param initialGain amplitude scale factor applied to sound source
* @param loopCount number of times loop is looped
@@ -242,7 +242,7 @@ public class PointSound extends Sound {
* @param posY y coordinate of location of source
* @param posZ z coordinate of location of source
* @param distanceGain array of (distance,gain) pairs controling attenuation
- */
+ */
public PointSound(MediaContainer soundData,
float initialGain,
int loopCount,
@@ -251,7 +251,7 @@ public class PointSound extends Sound {
boolean enable,
Bounds region,
float priority,
- float posX, float posY, float posZ,
+ float posX, float posY, float posZ,
Point2f[] distanceGain) {
super(soundData, initialGain, loopCount, release,
@@ -262,12 +262,12 @@ public class PointSound extends Sound {
((PointSoundRetained)this.retained).setPosition(posX,posY,posZ);
((PointSoundRetained)this.retained).setDistanceGain(distanceGain);
- }
+ }
/**
* Construct a PointSound object accepting points as input for the position.
- * and accepting separate arrays for the distance and gain scale factors
- * components of distance attenuation.
+ * and accepting separate arrays for the distance and gain scale factors
+ * components of distance attenuation.
* @param soundData sound data associated with this sound source node
* @param initialGain amplitude scale factor applied to sound source
* @param loopCount number of times loop is looped
@@ -279,7 +279,7 @@ public class PointSound extends Sound {
* @param position 3D location of source
* @param attenuationDistance array of distance values used for attenuation
* @param attenuationGain array of gain scale factors used for attenuation
- */
+ */
public PointSound(MediaContainer soundData,
float initialGain,
int loopCount,
@@ -288,11 +288,11 @@ public class PointSound extends Sound {
boolean enable,
Bounds region,
float priority,
- Point3f position,
+ Point3f position,
float[] attenuationDistance,
float[] attenuationGain) {
- super(soundData, initialGain, loopCount, release, continuous,
+ super(soundData, initialGain, loopCount, release, continuous,
enable, region, priority );
// set default read capabilities
@@ -301,12 +301,12 @@ public class PointSound extends Sound {
((PointSoundRetained)this.retained).setPosition(position);
((PointSoundRetained)this.retained).setDistanceGain(
attenuationDistance, attenuationGain);
- }
+ }
/**
- * Construct a PointSound object accepting individual float parameters for
- * the elements of the position points, and accepting separate arrays for
- * the distance and gain scale factors components of distance attenuation.
+ * Construct a PointSound object accepting individual float parameters for
+ * the elements of the position points, and accepting separate arrays for
+ * the distance and gain scale factors components of distance attenuation.
* @param soundData sound data associated with this sound source node
* @param initialGain amplitude scale factor applied to sound source
* @param loopCount number of times loop is looped
@@ -320,7 +320,7 @@ public class PointSound extends Sound {
* @param posZ z coordinate of location of source
* @param attenuationDistance array of distance values used for attenuation
* @param attenuationGain array of gain scale factors used for attenuation
- */
+ */
public PointSound(MediaContainer soundData,
float initialGain,
int loopCount,
@@ -329,7 +329,7 @@ public class PointSound extends Sound {
boolean enable,
Bounds region,
float priority,
- float posX, float posY, float posZ,
+ float posX, float posY, float posZ,
float[] attenuationDistance,
float[] attenuationGain) {
@@ -342,7 +342,7 @@ public class PointSound extends Sound {
((PointSoundRetained)this.retained).setPosition(posX,posY,posZ);
((PointSoundRetained)this.retained).setDistanceGain(
attenuationDistance, attenuationGain);
- }
+ }
/**
* Creates the retained mode PointSoundRetained object that this
@@ -363,7 +363,7 @@ public class PointSound extends Sound {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_POSITION_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("PointSound0"));
-
+
((PointSoundRetained)this.retained).setPosition(position);
}
@@ -379,7 +379,7 @@ public class PointSound extends Sound {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_POSITION_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("PointSound0"));
-
+
((PointSoundRetained)this.retained).setPosition(x,y,z);
}
@@ -394,7 +394,7 @@ public class PointSound extends Sound {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_POSITION_READ))
throw new CapabilityNotSetException(J3dI18N.getString("PointSound2"));
-
+
((PointSoundRetained)this.retained).getPosition(position);
}
@@ -402,25 +402,25 @@ public class PointSound extends Sound {
* Sets this sound's distance gain attenuation - where gain scale factor
* is applied to sound based on distance listener is from sound source.
* This form of setDistanceGain takes these pairs of values as an array of
- * Point2f.
+ * Point2f.
* @param attenuation defined by pairs of (distance,gain-scale-factor)
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public void setDistanceGain(Point2f[] attenuation) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_DISTANCE_GAIN_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("PointSound3"));
-
+
((PointSoundRetained)this.retained).setDistanceGain(attenuation);
}
/**
* Sets this sound's distance gain attenuation as an array of Point2fs.
* This form of setDistanceGain accepts two separate arrays for these values.
- * The distance and gainScale arrays should be of the same length. If the
- * gainScale array length is greater than the distance array length, the
- * gainScale array elements beyond the length of the distance array are
+ * The distance and gainScale arrays should be of the same length. If the
+ * gainScale array length is greater than the distance array length, the
+ * gainScale array elements beyond the length of the distance array are
* ignored. If the gainScale array is shorter than the distance array, the
* last gainScale array value is repeated to fill an array of length equal
* to distance array.
@@ -428,12 +428,12 @@ public class PointSound extends Sound {
* @param gain array of non-negative scale factors
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public void setDistanceGain(float[] distance, float[] gain) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_DISTANCE_GAIN_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("PointSound3"));
-
+
((PointSoundRetained)this.retained).setDistanceGain(distance, gain);
}
@@ -442,7 +442,7 @@ public class PointSound extends Sound {
* @return distance gain attenuation array length
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public int getDistanceGainLength() {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_DISTANCE_GAIN_READ))
@@ -454,17 +454,17 @@ public class PointSound extends Sound {
/**
* Gets this sound's distance attenuation. The distance attenuation
* pairs are copied into the specified array.
- * The array must be large enough to hold all of the points.
+ * The array must be large enough to hold all of the points.
* The individual array elements must be allocated by the caller.
* @param attenuation arrays containing distance attenuation pairs
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
- public void getDistanceGain(Point2f[] attenuation) {
+ */
+ public void getDistanceGain(Point2f[] attenuation) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_DISTANCE_GAIN_READ))
throw new CapabilityNotSetException(J3dI18N.getString("PointSound4"));
-
+
((PointSoundRetained)this.retained).getDistanceGain(attenuation);
}
@@ -472,15 +472,15 @@ public class PointSound extends Sound {
* Gets this sound's distance gain attenuation values in separate arrays.
* The arrays must be large enough to hold all of the values.
* @param distance array of float distance from sound source
- * @param gain array of non-negative scale factors associated with
+ * @param gain array of non-negative scale factors associated with
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
- public void getDistanceGain(float[] distance, float[] gain) {
+ */
+ public void getDistanceGain(float[] distance, float[] gain) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_DISTANCE_GAIN_READ))
throw new CapabilityNotSetException(J3dI18N.getString("PointSound4"));
-
+
((PointSoundRetained)this.retained).getDistanceGain(distance,gain);
}
@@ -528,7 +528,7 @@ public class PointSound extends Sound {
*
*
- */
+ */
public MediaContainer() {
// Just use default values
// set default read capabilities
@@ -106,7 +106,7 @@ public class MediaContainer extends NodeComponent {
* parameters.
* @param path string of URL path containing sound data
* @exception SoundException if the URL is not valid or cannot be opened
- */
+ */
public MediaContainer(String path) {
// set default read capabilities
setDefaultReadCapabilities(readCapabilities);
@@ -119,7 +119,7 @@ public class MediaContainer extends NodeComponent {
* parameters.
* @param url URL path containing sound data
* @exception SoundException if the URL is not valid or cannot be opened
- */
+ */
public MediaContainer(URL url) {
// set default read capabilities
setDefaultReadCapabilities(readCapabilities);
@@ -133,7 +133,7 @@ public class MediaContainer extends NodeComponent {
* @param stream input stream containing sound data
*
* @since Java 3D 1.2
- */
+ */
public MediaContainer(InputStream stream) {
// set default read capabilities
setDefaultReadCapabilities(readCapabilities);
@@ -144,7 +144,7 @@ public class MediaContainer extends NodeComponent {
/**
* Creates the retained mode MediaContainerRetained object that this
* component object will point to.
- */
+ */
void createRetained() {
this.retained = new MediaContainerRetained();
this.retained.setSource(this);
@@ -154,29 +154,29 @@ public class MediaContainer extends NodeComponent {
* Set Cache Enable state flag.
* Allows the writing of sound data explicitly into the MediaContainer
* rather than just referencing a JavaMedia container.
- * @param flag boolean denoting if sound data is cached in this instance
- * @exception CapabilityNotSetException if appropriate capability is
+ * @param flag boolean denoting if sound data is cached in this instance
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public void setCacheEnable(boolean flag) {
if (isLiveOrCompiled())
- if(!this.getCapability(ALLOW_CACHE_WRITE))
- throw new CapabilityNotSetException(J3dI18N.getString("MediaContainer1"));
-
+ if(!this.getCapability(ALLOW_CACHE_WRITE))
+ throw new CapabilityNotSetException(J3dI18N.getString("MediaContainer1"));
+
((MediaContainerRetained)this.retained).setCacheEnable(flag);
}
/**
* Retrieve Cache Enable state flag.
* @return flag denoting is sound data is non-cached or cached
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public boolean getCacheEnable() {
if (isLiveOrCompiled())
- if(!this.getCapability(ALLOW_CACHE_READ))
- throw new CapabilityNotSetException(J3dI18N.getString("MediaContainer2"));
-
+ if(!this.getCapability(ALLOW_CACHE_READ))
+ throw new CapabilityNotSetException(J3dI18N.getString("MediaContainer2"));
+
return ((MediaContainerRetained)this.retained).getCacheEnable();
}
@@ -186,27 +186,27 @@ public class MediaContainer extends NodeComponent {
*/
public void setURL(String path) {
if (isLiveOrCompiled()) {
- if(!this.getCapability(ALLOW_URL_WRITE))
- throw new CapabilityNotSetException(J3dI18N.getString("MediaContainer3"));
+ if(!this.getCapability(ALLOW_URL_WRITE))
+ throw new CapabilityNotSetException(J3dI18N.getString("MediaContainer3"));
}
((MediaContainerRetained)this.retained).setURLString(path);
}
/**
- * @deprecated As of Java 3D version 1.2, replaced by
+ * @deprecated As of Java 3D version 1.2, replaced by
* duplicateNode
method. This routine does
* the actual duplication of all "local data" (any data defined in
- * this object).
+ * this object).
*
* @param originalNodeComponent the original node to duplicate.
* @param forceDuplicate when set to true
, causes the
@@ -692,16 +692,16 @@ public class Material extends NodeComponent {
* @see NodeComponent#setDuplicateOnCloneTree
*/
void duplicateAttributes(NodeComponent originalNodeComponent,
- boolean forceDuplicate) {
- super.duplicateAttributes(originalNodeComponent,
+ boolean forceDuplicate) {
+ super.duplicateAttributes(originalNodeComponent,
forceDuplicate);
-
+
MaterialRetained mat = (MaterialRetained)
originalNodeComponent.retained;
- MaterialRetained rt = (MaterialRetained) retained;
-
+ MaterialRetained rt = (MaterialRetained) retained;
+
Color3f c = new Color3f();
- mat.getAmbientColor(c);
+ mat.getAmbientColor(c);
rt.initAmbientColor(c);
mat.getEmissiveColor(c);
diff --git a/src/classes/share/javax/media/j3d/MaterialRetained.java b/src/classes/share/javax/media/j3d/MaterialRetained.java
index f8e184e..4c36a79 100644
--- a/src/classes/share/javax/media/j3d/MaterialRetained.java
+++ b/src/classes/share/javax/media/j3d/MaterialRetained.java
@@ -115,7 +115,7 @@ class MaterialRetained extends NodeComponentRetained {
}
/**
- * Sets this material's ambient color
+ * Sets this material's ambient color
* @param r the new ambient color's red component
* @param g the new ambient color's green component
* @param b the new ambient color's blue component
@@ -253,7 +253,7 @@ class MaterialRetained extends NodeComponentRetained {
}
/**
- * Sets this material's diffuse color plus alpha and sends
+ * Sets this material's diffuse color plus alpha and sends
* a message notifying the interested structures of the change.
* This is the color of the material when illuminated by a light source.
* @param r the new diffuse color's red component
@@ -355,7 +355,7 @@ class MaterialRetained extends NodeComponentRetained {
*/
final void setShininess(float shininess) {
initShininess(shininess);
- sendMessage(SHININESS_CHANGED, new Float(this.shininess));
+ sendMessage(SHININESS_CHANGED, new Float(this.shininess));
}
/**
@@ -382,7 +382,7 @@ class MaterialRetained extends NodeComponentRetained {
*/
void setLightingEnable(boolean state) {
initLightingEnable(state);
- sendMessage(ENABLE_CHANGED,
+ sendMessage(ENABLE_CHANGED,
(state ? Boolean.TRUE: Boolean.FALSE));
}
@@ -420,7 +420,7 @@ class MaterialRetained extends NodeComponentRetained {
mirror = mirrorMat;
}
} else {
- ((MaterialRetained) mirror).set(this);
+ ((MaterialRetained) mirror).set(this);
}
}
@@ -431,11 +431,11 @@ class MaterialRetained extends NodeComponentRetained {
void updateNative(Context ctx,
float red, float green, float blue, float alpha,
boolean enableLighting) {
- Pipeline.getPipeline().updateMaterial(ctx, red, green, blue, alpha,
+ Pipeline.getPipeline().updateMaterial(ctx, red, green, blue, alpha,
ambientColor.x, ambientColor.y, ambientColor.z,
- emissiveColor.x, emissiveColor.y, emissiveColor.z,
- diffuseColor.x, diffuseColor.y, diffuseColor.z,
- specularColor.x, specularColor.y, specularColor.z,
+ emissiveColor.x, emissiveColor.y, emissiveColor.z,
+ diffuseColor.x, diffuseColor.y, diffuseColor.z,
+ specularColor.x, specularColor.y, specularColor.z,
shininess, colorTarget, enableLighting);
}
@@ -450,7 +450,7 @@ class MaterialRetained extends NodeComponentRetained {
}
/**
- * Update the "component" field of the mirror object with the
+ * Update the "component" field of the mirror object with the
* given "value"
*/
synchronized void updateMirrorObject(int component, Object value) {
@@ -475,8 +475,8 @@ class MaterialRetained extends NodeComponentRetained {
}
else if ((component & COLORTARGET_CHANGED) != 0) {
mirrorMaterial.colorTarget = ((Integer)value).intValue();
- }
-
+ }
+
}
@@ -484,14 +484,14 @@ class MaterialRetained extends NodeComponentRetained {
return ((m != null) &&
lightingEnable == m.lightingEnable &&
diffuseColor.equals(m.diffuseColor) &&
- emissiveColor.equals(m.emissiveColor) &&
+ emissiveColor.equals(m.emissiveColor) &&
specularColor.equals(m.specularColor) &&
- ambientColor.equals(m.ambientColor) &&
+ ambientColor.equals(m.ambientColor) &&
colorTarget == m.colorTarget &&
- shininess == m.shininess);
+ shininess == m.shininess);
}
-
-
+
+
// This functions clones the retained side only and is used
// internally
protected Object clone() {
@@ -517,7 +517,7 @@ class MaterialRetained extends NodeComponentRetained {
lightingEnable = mat.lightingEnable;
colorTarget = mat.colorTarget;
}
-
+
final void sendMessage(int attrMask, Object attr) {
ArrayList univList = new ArrayList();
@@ -539,7 +539,7 @@ class MaterialRetained extends NodeComponentRetained {
createMessage = new J3dMessage();
createMessage.threads = J3dThread.UPDATE_RENDER;
createMessage.type = J3dMessage.MATERIAL_CHANGED;
-
+
createMessage.universe = (VirtualUniverse) univList.get(i);
createMessage.args[0] = this;
createMessage.args[1]= new Integer(attrMask);
diff --git a/src/classes/share/javax/media/j3d/MediaContainer.java b/src/classes/share/javax/media/j3d/MediaContainer.java
index b5c68c4..0f71376 100644
--- a/src/classes/share/javax/media/j3d/MediaContainer.java
+++ b/src/classes/share/javax/media/j3d/MediaContainer.java
@@ -35,10 +35,10 @@ import java.net.URL;
import java.io.InputStream;
/**
- * The MediaContainer object defines all sound data: cached state flag, and
- * associated sound media. Currently this references the sound media in
+ * The MediaContainer object defines all sound data: cached state flag, and
+ * associated sound media. Currently this references the sound media in
* one of three forms: URL String, URL object, or InputStream object.
- * In future releases media data will include references to Java Media
+ * In future releases media data will include references to Java Media
* Player objects.
* Only one type of sound media data specified using
* setURLString
, setURLObject
,
@@ -84,7 +84,7 @@ public class MediaContainer extends NodeComponent {
ALLOW_CACHE_READ,
ALLOW_URL_READ
};
-
+
/**
* Constructs a MediaContainer object with default parameters.
* The default values are as follows:
@@ -94,7 +94,7 @@ public class MediaContainer extends NodeComponent {
* InputStream data : null
* cache enable : true
* setURLObject
*/
public void setURL(URL url) {
if (isLiveOrCompiled())
- if(!this.getCapability(ALLOW_URL_WRITE))
- throw new CapabilityNotSetException(J3dI18N.getString("MediaContainer3"));
+ if(!this.getCapability(ALLOW_URL_WRITE))
+ throw new CapabilityNotSetException(J3dI18N.getString("MediaContainer3"));
((MediaContainerRetained)this.retained).setURLObject(url);
}
/**
* Set URL String.
* @param path string of URL containing sound data
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
* @exception SoundException if the URL is not valid or cannot be opened
* @exception IllegalArgumentException if the specified sound data is
@@ -215,8 +215,8 @@ public class MediaContainer extends NodeComponent {
*/
public void setURLString(String path) {
if (isLiveOrCompiled()) {
- if(!this.getCapability(ALLOW_URL_WRITE))
- throw new CapabilityNotSetException(J3dI18N.getString("MediaContainer3"));
+ if(!this.getCapability(ALLOW_URL_WRITE))
+ throw new CapabilityNotSetException(J3dI18N.getString("MediaContainer3"));
}
((MediaContainerRetained)this.retained).setURLString(path);
}
@@ -224,7 +224,7 @@ public class MediaContainer extends NodeComponent {
/**
* Set URL Object.
* @param url URL object containing sound data
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
* @exception SoundException if the URL is not valid or cannot be opened
* @exception IllegalArgumentException if the specified sound data is
@@ -233,15 +233,15 @@ public class MediaContainer extends NodeComponent {
*/
public void setURLObject(URL url) {
if (isLiveOrCompiled())
- if(!this.getCapability(ALLOW_URL_WRITE))
- throw new CapabilityNotSetException(J3dI18N.getString("MediaContainer3"));
+ if(!this.getCapability(ALLOW_URL_WRITE))
+ throw new CapabilityNotSetException(J3dI18N.getString("MediaContainer3"));
((MediaContainerRetained)this.retained).setURLObject(url);
}
/**
* Set Input Stream.
* @param stream input stream object containing sound data
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
* @exception SoundException if InputStream is bad
* @exception IllegalArgumentException if the specified sound data is
@@ -250,66 +250,66 @@ public class MediaContainer extends NodeComponent {
*/
public void setInputStream(InputStream stream) {
if (isLiveOrCompiled())
- if(!this.getCapability(ALLOW_URL_WRITE))
- throw new CapabilityNotSetException(J3dI18N.getString("MediaContainer3"));
+ if(!this.getCapability(ALLOW_URL_WRITE))
+ throw new CapabilityNotSetException(J3dI18N.getString("MediaContainer3"));
((MediaContainerRetained)this.retained).setInputStream(stream);
}
/**
- * @deprecated As of Java 3D version 1.2, replaced by
+ * @deprecated As of Java 3D version 1.2, replaced by
* getURLString
*/
public String getURL() {
if (isLiveOrCompiled())
- if(!this.getCapability(ALLOW_URL_READ))
- throw new CapabilityNotSetException(J3dI18N.getString("MediaContainer4"));
+ if(!this.getCapability(ALLOW_URL_READ))
+ throw new CapabilityNotSetException(J3dI18N.getString("MediaContainer4"));
return ((MediaContainerRetained)this.retained).getURLString();
}
/**
* Retrieve URL String.
* @return string of URL containing sound data
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
* @since Java 3D 1.2
*/
public String getURLString() {
if (isLiveOrCompiled())
- if(!this.getCapability(ALLOW_URL_READ))
- throw new CapabilityNotSetException(J3dI18N.getString("MediaContainer4"));
+ if(!this.getCapability(ALLOW_URL_READ))
+ throw new CapabilityNotSetException(J3dI18N.getString("MediaContainer4"));
return ((MediaContainerRetained)this.retained).getURLString();
}
/**
* Retrieve URL Object.
* @return URL containing sound data
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
* @since Java 3D 1.2
*/
public URL getURLObject() {
if (isLiveOrCompiled())
- if(!this.getCapability(ALLOW_URL_READ))
- throw new CapabilityNotSetException(J3dI18N.getString("MediaContainer4"));
+ if(!this.getCapability(ALLOW_URL_READ))
+ throw new CapabilityNotSetException(J3dI18N.getString("MediaContainer4"));
return ((MediaContainerRetained)this.retained).getURLObject();
}
/**
* Retrieve Input Stream.
* @return reference to input stream containing sound data
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
* @since Java 3D 1.2
*/
public InputStream getInputStream() {
if (isLiveOrCompiled())
- if(!this.getCapability(ALLOW_URL_READ))
- throw new CapabilityNotSetException(J3dI18N.getString("MediaContainer4"));
+ if(!this.getCapability(ALLOW_URL_READ))
+ throw new CapabilityNotSetException(J3dI18N.getString("MediaContainer4"));
return ((MediaContainerRetained)this.retained).getInputStream();
}
/**
- * @deprecated As of Java 3D version 1.2, replaced with
+ * @deprecated As of Java 3D version 1.2, replaced with
* cloneNodeComponent(boolean forceDuplicate)
*/
public NodeComponent cloneNodeComponent() {
@@ -325,7 +325,7 @@ public class MediaContainer extends NodeComponent {
* the current node. This method is called from the
* cloneNodeComponent
method and duplicateNodeComponent
* method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
@@ -343,9 +343,9 @@ public class MediaContainer extends NodeComponent {
void duplicateAttributes(NodeComponent originalNodeComponent,
boolean forceDuplicate) {
- super.duplicateAttributes(originalNodeComponent, forceDuplicate);
-
- MediaContainerRetained mc = (MediaContainerRetained)
+ super.duplicateAttributes(originalNodeComponent, forceDuplicate);
+
+ MediaContainerRetained mc = (MediaContainerRetained)
originalNodeComponent.retained;
MediaContainerRetained rt = (MediaContainerRetained) retained;
rt.setCacheEnable(mc.getCacheEnable());
diff --git a/src/classes/share/javax/media/j3d/MediaContainerRetained.java b/src/classes/share/javax/media/j3d/MediaContainerRetained.java
index 97df6ca..dfc816b 100644
--- a/src/classes/share/javax/media/j3d/MediaContainerRetained.java
+++ b/src/classes/share/javax/media/j3d/MediaContainerRetained.java
@@ -31,7 +31,7 @@
package javax.media.j3d;
-import java.net.URL;
+import java.net.URL;
import java.io.InputStream;
/**
@@ -43,7 +43,7 @@ class MediaContainerRetained extends NodeComponentRetained {
* Gain Scale Factor applied to source with this attribute
*/
boolean cached = true;
-
+
/**
* URL string that references the sound data
*/
@@ -89,13 +89,13 @@ class MediaContainerRetained extends NodeComponentRetained {
if (urlString != null || inputStream != null)
throw new IllegalArgumentException(J3dI18N.getString("MediaContainer5"));
// Test if url object is valid by openning it
- try {
- InputStream stream;
- stream = url.openStream();
- stream.close();
+ try {
+ InputStream stream;
+ stream = url.openStream();
+ stream.close();
}
- catch (Exception e) {
- throw new SoundException(javax.media.j3d.J3dI18N.getString("MediaContainer0"));
+ catch (Exception e) {
+ throw new SoundException(javax.media.j3d.J3dI18N.getString("MediaContainer0"));
}
}
this.url = url;
@@ -132,7 +132,7 @@ class MediaContainerRetained extends NodeComponentRetained {
stream.close();
}
catch (Exception e) {
- throw new SoundException(javax.media.j3d.J3dI18N.getString("MediaContainer0"));
+ throw new SoundException(javax.media.j3d.J3dI18N.getString("MediaContainer0"));
}
}
this.urlString = path;
@@ -193,9 +193,9 @@ class MediaContainerRetained extends NodeComponentRetained {
return this.inputStream;
}
- /**
+ /**
* Dispatch a message about a media container change
- */
+ */
void dispatchMessage() {
// Send message including a integer argumentD
J3dMessage createMessage = new J3dMessage();
diff --git a/src/classes/share/javax/media/j3d/MemoryFreeList.java b/src/classes/share/javax/media/j3d/MemoryFreeList.java
index 2012064..28deb98 100644
--- a/src/classes/share/javax/media/j3d/MemoryFreeList.java
+++ b/src/classes/share/javax/media/j3d/MemoryFreeList.java
@@ -51,7 +51,7 @@ class MemoryFreeList {
int minBlockSize = 0;
boolean justShrunk = false;
int initcap = 10;
-
+
// the minimum size since the last shrink
int minSize = 0;
@@ -73,7 +73,7 @@ class MemoryFreeList {
catch (Exception e) {
System.err.println(e);
}
-
+
initcap = initialCapacity;
currBlockSize = initialCapacity;
minBlockSize = currBlockSize;
@@ -86,25 +86,25 @@ class MemoryFreeList {
}
/*
- MemoryFreeList(String className, Collection collection) {
- try {
- c = Class.forName(className);
- }
- catch (Exception e) {
+ MemoryFreeList(String className, Collection collection) {
+ try {
+ c = Class.forName(className);
+ }
+ catch (Exception e) {
// System.err.println(e);
- }
-
- size = collection.size();
- initcap = size;
- currBlockSize = size;
- minBlockSize = currBlockSize;
- elementData = new ArrayList();
- currBlock = new Object[currBlockSize];
- collection.toArray(currBlock);
- elementData.add(currBlock);
- numBlocks++;
- capacity += currBlockSize;
- spaceUsed = size;
+ }
+
+ size = collection.size();
+ initcap = size;
+ currBlockSize = size;
+ minBlockSize = currBlockSize;
+ elementData = new ArrayList();
+ currBlock = new Object[currBlockSize];
+ collection.toArray(currBlock);
+ elementData.add(currBlock);
+ numBlocks++;
+ capacity += currBlockSize;
+ spaceUsed = size;
}
*/
@@ -142,7 +142,7 @@ class MemoryFreeList {
int index = spaceUsed++;
currBlock[index] = o;
size++;
-
+
return true;
}
}
@@ -179,13 +179,13 @@ class MemoryFreeList {
// minSize);
if ((minSize > minBlockSize) && (numBlocks > 1)) {
justShrunk = true;
-
+
// System.err.println("removing a block");
// Runtime r = Runtime.getRuntime();
// r.gc();
// System.err.println("numBlocks = " + numBlocks + " size = " + size);
// System.err.println("free memory before shrink: " + r.freeMemory());
-
+
// remove the last block
Object[] block = (Object[])elementData.remove(numBlocks-1);
numBlocks--;
@@ -201,9 +201,9 @@ class MemoryFreeList {
currBlockSize = currBlock.length;
spaceUsed = currBlockSize;
-
+
}
-
+
// r.gc();
// System.err.println("free memory after shrink: " + r.freeMemory());
// System.err.println("numBlocks = " + numBlocks + " size = " + size);
@@ -219,7 +219,7 @@ class MemoryFreeList {
// elementData.length);
// System.err.println("minCapacity = " + minCapacity + " capacity = "
// + capacity);
-
+
if (minCapacity > capacity) {
// System.err.println("adding a block: numBlocks = " + numBlocks);
int lastBlockSize =
@@ -278,6 +278,6 @@ class MemoryFreeList {
}
}
}
-
+
}
diff --git a/src/classes/share/javax/media/j3d/ModelClip.java b/src/classes/share/javax/media/j3d/ModelClip.java
index dc42122..e63bad7 100644
--- a/src/classes/share/javax/media/j3d/ModelClip.java
+++ b/src/classes/share/javax/media/j3d/ModelClip.java
@@ -135,7 +135,7 @@ public class ModelClip extends Leaf {
ALLOW_INFLUENCING_BOUNDS_READ,
ALLOW_PLANE_READ
};
-
+
/**
* Constructs a ModelClip node with default parameters. The default
* values are as follows:
@@ -156,7 +156,7 @@ public class ModelClip extends Leaf {
// Just use the defaults
// set default read capabilities
setDefaultReadCapabilities(readCapabilities);
-
+
}
@@ -183,7 +183,7 @@ public class ModelClip extends Leaf {
public ModelClip(Vector4d[] planes, boolean[] enables) {
// set default read capabilities
setDefaultReadCapabilities(readCapabilities);
-
+
((ModelClipRetained)this.retained).initPlanes(planes);
((ModelClipRetained)this.retained).initEnables(enables);
}
@@ -196,7 +196,7 @@ public class ModelClip extends Leaf {
* region.
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public void setInfluencingBounds(Bounds region) {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_INFLUENCING_BOUNDS_WRITE))
@@ -209,12 +209,12 @@ public class ModelClip extends Leaf {
}
- /**
+ /**
* Retrieves the ModelClip node's influencing bounds.
* @return this node's influencing bounds information
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public Bounds getInfluencingBounds() {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_INFLUENCING_BOUNDS_READ))
@@ -233,7 +233,7 @@ public class ModelClip extends Leaf {
* new influencing region.
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public void setInfluencingBoundingLeaf(BoundingLeaf region) {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_INFLUENCING_BOUNDS_WRITE))
@@ -246,12 +246,12 @@ public class ModelClip extends Leaf {
}
- /**
+ /**
* Retrieves the ModelClip node's influencing bounding leaf.
* @return this node's influencing bounding leaf information
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public BoundingLeaf getInfluencingBoundingLeaf() {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_INFLUENCING_BOUNDS_READ))
@@ -349,7 +349,7 @@ public class ModelClip extends Leaf {
else
((ModelClipRetained)this.retained).initRemoveScope(index);
}
-
+
/**
* Returns an enumeration of this ModelClip node's list of scopes.
@@ -389,7 +389,7 @@ public class ModelClip extends Leaf {
((ModelClipRetained)this.retained).initAddScope(scope);
}
-
+
/**
* Returns the number of nodes in this ModelClip node's list of scopes.
* If this number is 0, then the list of scopes is empty and this
@@ -614,7 +614,7 @@ public class ModelClip extends Leaf {
}
/**
- * Creates the retained mode ModelClipRetained object that
+ * Creates the retained mode ModelClipRetained object that
* this ModelClip node will point to.
*/
void createRetained() {
@@ -693,7 +693,7 @@ public class ModelClip extends Leaf {
* originalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
@@ -712,10 +712,10 @@ public class ModelClip extends Leaf {
void duplicateAttributes(Node originalNode, boolean forceDuplicate) {
super.duplicateAttributes(originalNode, forceDuplicate);
- ModelClipRetained attr = (ModelClipRetained)
+ ModelClipRetained attr = (ModelClipRetained)
originalNode.retained;
ModelClipRetained rt = (ModelClipRetained) retained;
-
+
Vector4d plane = new Vector4d();
for (int i=5; i >=0; i--) {
diff --git a/src/classes/share/javax/media/j3d/ModelClipRetained.java b/src/classes/share/javax/media/j3d/ModelClipRetained.java
index e565459..ff2e3e3 100644
--- a/src/classes/share/javax/media/j3d/ModelClipRetained.java
+++ b/src/classes/share/javax/media/j3d/ModelClipRetained.java
@@ -96,7 +96,7 @@ class ModelClipRetained extends LeafRetained {
boolean inImmCtx = false;
// The mirror copy of this modelClip
- ModelClipRetained mirrorModelClip = null;
+ ModelClipRetained mirrorModelClip = null;
// A reference to the scene graph model clip
ModelClipRetained sgModelClip = null;
@@ -118,7 +118,7 @@ class ModelClipRetained extends LeafRetained {
/**
* Constructs and initializes model clip planes
- */
+ */
ModelClipRetained() {
// planes contains the negate default values
@@ -191,8 +191,8 @@ class ModelClipRetained extends LeafRetained {
*/
void setPlane(int planeNum, Vector4d plane) {
initPlane(planeNum, plane);
- sendMessage(PLANE_CHANGED,
- new Integer(planeNum),
+ sendMessage(PLANE_CHANGED,
+ new Integer(planeNum),
new Vector4d(this.xformPlanes[planeNum]));
}
@@ -233,7 +233,7 @@ class ModelClipRetained extends LeafRetained {
void setEnables(boolean[] enables) {
Boolean[] en = new Boolean[6];
- initEnables(enables);
+ initEnables(enables);
en[0] = (enables[0] ? Boolean.TRUE: Boolean.FALSE);
en[1] = (enables[1] ? Boolean.TRUE: Boolean.FALSE);
en[2] = (enables[2] ? Boolean.TRUE: Boolean.FALSE);
@@ -258,7 +258,7 @@ class ModelClipRetained extends LeafRetained {
*/
void setEnable(int planeNum, boolean enable) {
initEnable(planeNum, enable);
- sendMessage(ENABLE_CHANGED,
+ sendMessage(ENABLE_CHANGED,
new Integer(planeNum),
(enable ? Boolean.TRUE: Boolean.FALSE));
}
@@ -300,7 +300,7 @@ class ModelClipRetained extends LeafRetained {
/**
* Set the Model Clip's region of influencing and send message
- */
+ */
void setInfluencingBounds(Bounds region) {
initInfluencingBounds(region);
sendMessage(BOUNDS_CHANGED,
@@ -308,9 +308,9 @@ class ModelClipRetained extends LeafRetained {
null);
}
- /**
+ /**
* Get the Model Clip's region of influencing.
- */
+ */
Bounds getInfluencingBounds() {
Bounds b = null;
@@ -326,7 +326,7 @@ class ModelClipRetained extends LeafRetained {
/**
* Set the Model Clip's region of influencing to the specified Leaf node.
- */
+ */
void initInfluencingBoundingLeaf(BoundingLeaf region) {
if (region != null) {
boundingLeaf = (BoundingLeafRetained)region.retained;
@@ -337,7 +337,7 @@ class ModelClipRetained extends LeafRetained {
/**
* Set the Model Clip's region of influencing to the specified Leaf node.
- */
+ */
void setInfluencingBoundingLeaf(BoundingLeaf region) {
if (boundingLeaf != null)
boundingLeaf.mirrorBoundingLeaf.removeUser(mirrorModelClip);
@@ -348,16 +348,16 @@ class ModelClipRetained extends LeafRetained {
boundingLeaf = null;
}
- sendMessage(BOUNDINGLEAF_CHANGED,
+ sendMessage(BOUNDINGLEAF_CHANGED,
(boundingLeaf != null ?
- boundingLeaf.mirrorBoundingLeaf : null),
+ boundingLeaf.mirrorBoundingLeaf : null),
null);
}
- /**
+ /**
* Get the Model Clip's region of influencing.
- */
+ */
BoundingLeaf getInfluencingBoundingLeaf() {
return (boundingLeaf != null ?
(BoundingLeaf)boundingLeaf.source : null);
@@ -565,7 +565,7 @@ class ModelClipRetained extends LeafRetained {
}
/**
- * Returns the index of the specified Group node within the ModelClip's list of scoped
+ * Returns the index of the specified Group node within the ModelClip's list of scoped
* Group nodes
* @param Group node whose index is desired
* @return index of this node
@@ -592,12 +592,12 @@ class ModelClipRetained extends LeafRetained {
}
- /**
+ /**
* This method and its native counterpart update the native context
* model clip planes.
*/
void update(Canvas3D cv, int enableMask) {
- cv.setModelViewMatrix(cv.ctx,
+ cv.setModelViewMatrix(cv.ctx,
cv.vworldToEc.mat,
getLastLocalToVworld());
update(cv.ctx, enableMask, getLastLocalToVworld());
@@ -606,8 +606,8 @@ class ModelClipRetained extends LeafRetained {
void update(Context ctx, int enableMask, Transform3D trans) {
if (!VirtualUniverse.mc.isD3D()) {
for (int i = 0; i < 6; i ++) {
- Pipeline.getPipeline().updateModelClip(ctx, i, ((enableMask & (1 << i)) != 0),
- xformPlanes[i].x, xformPlanes[i].y,
+ Pipeline.getPipeline().updateModelClip(ctx, i, ((enableMask & (1 << i)) != 0),
+ xformPlanes[i].x, xformPlanes[i].y,
xformPlanes[i].z, xformPlanes[i].w);
}
return;
@@ -624,8 +624,8 @@ class ModelClipRetained extends LeafRetained {
for (int i=0; i < 6; i++) {
if ((enableMask & (1 << i)) != 0) {
-
- Vector4d vec = new Vector4d(xformPlanes[i].x, xformPlanes[i].y,
+
+ Vector4d vec = new Vector4d(xformPlanes[i].x, xformPlanes[i].y,
xformPlanes[i].z, xformPlanes[i].w);
vec.normalize();
invtrans.transform(vec);
@@ -658,7 +658,7 @@ class ModelClipRetained extends LeafRetained {
mirrorModelClip.boundingLeaf = null;
mirrorModelClip.region = null;
}
-
+
if (bnds != null) {
mirrorModelClip.regionOfInfluence = bnds;
if (mirrorModelClip.region == null) {
@@ -696,7 +696,7 @@ class ModelClipRetained extends LeafRetained {
}
else if ((component & PLANE_CHANGED) != 0) {
int planeNum = ((Integer)objs[2]).intValue();
-
+
mirrorModelClip.xformPlanes[planeNum].set((Vector4d)objs[3]);
}
else if ((component & INIT_MIRROR) != 0) {
@@ -716,12 +716,12 @@ class ModelClipRetained extends LeafRetained {
if ((component & BOUNDINGLEAF_CHANGED) != 0) {
mirrorModelClip.boundingLeaf = (BoundingLeafRetained)objs[2];
if (objs[2] != null) {
- mirrorModelClip.region =
+ mirrorModelClip.region =
(Bounds)mirrorModelClip.boundingLeaf.transformedRegion;
}
else {
if (mirrorModelClip.regionOfInfluence != null) {
- mirrorModelClip.region =
+ mirrorModelClip.region =
((Bounds)mirrorModelClip.regionOfInfluence).copy(mirrorModelClip.region);
mirrorModelClip.region.transform(mirrorModelClip.regionOfInfluence,
getCurrentLocalToVworld());
@@ -729,17 +729,17 @@ class ModelClipRetained extends LeafRetained {
else {
mirrorModelClip.region = null;
}
-
+
}
- }
+ }
if ((component & BOUNDS_CHANGED) != 0) {
mirrorModelClip.regionOfInfluence = (Bounds) objs[2];
if (mirrorModelClip.boundingLeaf == null) {
if (objs[2] != null) {
- mirrorModelClip.region =
+ mirrorModelClip.region =
((Bounds)mirrorModelClip.regionOfInfluence).copy(mirrorModelClip.region);
-
+
mirrorModelClip.region.transform(mirrorModelClip.regionOfInfluence,
getCurrentLocalToVworld());
}
@@ -747,7 +747,7 @@ class ModelClipRetained extends LeafRetained {
mirrorModelClip.region = null;
}
}
- }
+ }
if ((component & SCOPE_CHANGED) != 0) {
Object[] scopeList = (Object[])objs[2];
@@ -797,7 +797,7 @@ class ModelClipRetained extends LeafRetained {
mirrorModelClip.enables[3] |
mirrorModelClip.enables[4] |
mirrorModelClip.enables[5] ;
- }
+ }
}
@@ -885,7 +885,7 @@ class ModelClipRetained extends LeafRetained {
}
Object[] scopeInfo = new Object[2];
scopeInfo[0] = ((scopes.size() > 0) ? Boolean.TRUE:Boolean.FALSE);
- scopeInfo[1] = addScopeList;
+ scopeInfo[1] = addScopeList;
createMessage.args[2] = scopeInfo;
createMessage.args[3] = xformPlanes.clone();
@@ -896,7 +896,7 @@ class ModelClipRetained extends LeafRetained {
createMessage.args[4] = obj;
VirtualUniverse.mc.processMessage(createMessage);
-
+
}
@@ -952,16 +952,16 @@ class ModelClipRetained extends LeafRetained {
Shape3DRetained shape;
ArrayList shapeList = (ArrayList)args[2];
ArrayList removeScopeList = new ArrayList();
-
+
for (int i = 0; i < shapeList.size(); i++) {
shape = ((GeometryAtom)shapeList.get(i)).source;
shape.removeModelClip(mirrorModelClip);
}
- mirrorModelClip.isScoped = false;
+ mirrorModelClip.isScoped = false;
}
-
+
// Clone the retained side only, internal use only
protected Object clone() {
@@ -982,7 +982,7 @@ class ModelClipRetained extends LeafRetained {
mc.enables[2] |
mc.enables[3] |
mc.enables[4] |
- mc.enables[5] );
+ mc.enables[5] );
mc.inImmCtx = false;
mc.region = null;
@@ -1012,13 +1012,13 @@ class ModelClipRetained extends LeafRetained {
}
- void printPlane(int index, String string)
+ void printPlane(int index, String string)
{
- System.err.println(string + " : < " + planes[index].toString()
+ System.err.println(string + " : < " + planes[index].toString()
+ " > " + enables[index]);
- }
+ }
- void printPlanes(String string, Vector4d[] planes)
+ void printPlanes(String string, Vector4d[] planes)
{
System.err.println(string);
printPlane(0, "[0]");
@@ -1030,7 +1030,7 @@ class ModelClipRetained extends LeafRetained {
}
- void printEnables(String string, boolean[] enables)
+ void printEnables(String string, boolean[] enables)
{
System.err.println(string);
System.err.println("[0] : < " + enables[0] + " >");
diff --git a/src/classes/share/javax/media/j3d/Morph.java b/src/classes/share/javax/media/j3d/Morph.java
index e79c5c8..53d5790 100644
--- a/src/classes/share/javax/media/j3d/Morph.java
+++ b/src/classes/share/javax/media/j3d/Morph.java
@@ -174,15 +174,15 @@ public class Morph extends Leaf {
private static final int[] readCapabilities = {
ALLOW_GEOMETRY_ARRAY_READ,
ALLOW_APPEARANCE_READ,
- ALLOW_WEIGHTS_READ,
+ ALLOW_WEIGHTS_READ,
ALLOW_COLLISION_BOUNDS_READ,
ALLOW_APPEARANCE_OVERRIDE_READ
};
-
+
// non public default constructor
Morph() {
// set default read capabilities
- setDefaultReadCapabilities(readCapabilities);
+ setDefaultReadCapabilities(readCapabilities);
}
/**
@@ -227,7 +227,7 @@ public class Morph extends Leaf {
public Morph(GeometryArray geometryArrays[]) {
// set default read capabilities
setDefaultReadCapabilities(readCapabilities);
-
+
((MorphRetained)retained).setGeometryArrays(geometryArrays);
}
@@ -290,7 +290,7 @@ public class Morph extends Leaf {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_COLLISION_BOUNDS_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("Morph0"));
-
+
((MorphRetained)this.retained).setCollisionBounds(bounds);
}
@@ -305,11 +305,11 @@ public class Morph extends Leaf {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_COLLISION_BOUNDS_READ))
throw new CapabilityNotSetException(J3dI18N.getString("Morph1"));
-
+
return ((MorphRetained)this.retained).getCollisionBounds();
}
-
+
/**
* Sets the geometryArrays component of the Morph node.
*
@@ -361,7 +361,7 @@ public class Morph extends Leaf {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_GEOMETRY_ARRAY_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("Morph2"));
-
+
((MorphRetained)this.retained).setGeometryArrays(geometryArrays);
}
@@ -377,7 +377,7 @@ public class Morph extends Leaf {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_GEOMETRY_ARRAY_READ))
throw new CapabilityNotSetException(J3dI18N.getString("Morph3"));
-
+
return ((MorphRetained)this.retained).getGeometryArray(index);
}
@@ -394,7 +394,7 @@ public class Morph extends Leaf {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_APPEARANCE_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("Morph4"));
-
+
((MorphRetained)this.retained).setAppearance(appearance);
}
@@ -409,7 +409,7 @@ public class Morph extends Leaf {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_APPEARANCE_READ))
throw new CapabilityNotSetException(J3dI18N.getString("Morph5"));
-
+
return ((MorphRetained)this.retained).getAppearance();
}
@@ -505,7 +505,7 @@ public class Morph extends Leaf {
/**
* Sets this Morph node's morph weight vector. The Morph node "weights"
- * the corresponding GeometryArray by the amount specified.
+ * the corresponding GeometryArray by the amount specified.
* The weights apply a morph weight vector component that creates
* the desired morphing effect.
* The length
@@ -519,14 +519,14 @@ public class Morph extends Leaf {
*
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- * @exception IllegalArgumentException if sum of all 'weights' is
+ * @exception IllegalArgumentException if sum of all 'weights' is
* NOT 1.0 or number of weights is NOT exqual to number of GeometryArrays.
*/
public void setWeights(double weights[]) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_WEIGHTS_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("Morph8"));
-
+
((MorphRetained)this.retained).setWeights(weights);
}
@@ -540,10 +540,10 @@ public class Morph extends Leaf {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_WEIGHTS_READ))
throw new CapabilityNotSetException(J3dI18N.getString("Morph9"));
-
+
return ((MorphRetained)this.retained).getWeights();
}
-
+
/**
* Sets a flag that indicates whether this node's appearance can
* be overridden. If the flag is true, this node's
@@ -553,7 +553,7 @@ public class Morph extends Leaf {
* The default value is false.
*
* @param flag the apperance override enable flag
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @see AlternateAppearance
@@ -572,7 +572,7 @@ public class Morph extends Leaf {
* Retrieves the appearanceOverrideEnable flag for this node.
* @return true if the appearance can be overridden; false
* otherwise.
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @since Java 3D 1.2
@@ -629,7 +629,7 @@ public class Morph extends Leaf {
* false
, the value of each node's
* duplicateOnCloneTree
variable determines whether
* NodeComponent data is duplicated or copied.
- * @exception ClassCastException if originalNode is not an instance of
+ * @exception ClassCastException if originalNode is not an instance of
* Morph
*
* @see Node#cloneTree
@@ -645,7 +645,7 @@ public class Morph extends Leaf {
* originalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
@@ -663,7 +663,7 @@ public class Morph extends Leaf {
*/
void duplicateAttributes(Node originalNode, boolean forceDuplicate) {
super.duplicateAttributes(originalNode, forceDuplicate);
-
+
MorphRetained attr = (MorphRetained) originalNode.retained;
MorphRetained rt = (MorphRetained) retained;
@@ -688,7 +688,7 @@ public class Morph extends Leaf {
rt.setGeometryArrays(ga);
rt.setWeights(weights);
}
-
+
// Method to check whether all geometries have allow intersect
// capability bit set; it will throw an exception if any don't
// have the bit set.
diff --git a/src/classes/share/javax/media/j3d/MorphRetained.java b/src/classes/share/javax/media/j3d/MorphRetained.java
index 8dbb517..ac6ebe7 100644
--- a/src/classes/share/javax/media/j3d/MorphRetained.java
+++ b/src/classes/share/javax/media/j3d/MorphRetained.java
@@ -59,12 +59,12 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
* a SharedGroup, only index 0 is valid.
*/
ArrayList mirrorShape3D = new ArrayList();
-
-
+
+
// Target threads to be notified when morph changes
final static int targetThreads = (J3dThread.UPDATE_RENDER |
- J3dThread.UPDATE_GEOMETRY);
-
+ J3dThread.UPDATE_GEOMETRY);
+
/**
* The appearance component of the morph node.
*/
@@ -89,12 +89,12 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
BranchGroupRetained branchGroupPath[];
- // cache value for picking in mirror shape.
+ // cache value for picking in mirror shape.
// True if all the node of the path from this to root are all pickable
boolean isPickable = true;
- // cache value for collidable in mirror shape.
+ // cache value for collidable in mirror shape.
// True if all the node of the path from this to root are all collidable
boolean isCollidable = true;
@@ -105,9 +105,9 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
// the child index from the closest switch parent
int closestSwitchIndex = -1;
- // Is this Morph visible ? The default is true.
+ // Is this Morph visible ? The default is true.
boolean visible = true;
-
+
// geometry Bounds in local coordinate
Bounds bounds = null;
@@ -120,9 +120,9 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
// collision Bounds in virtual world coordinate
Bounds collisionVwcBound = null;
-
+
GeometryArray morphedGeometryArray = null;
-
+
// Morph data
float[] Mcoord = null;
float[] Mcolor = null;
@@ -130,13 +130,13 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
// First dimension is the coordSet, second dimenension is the vertex index
// each vertex has 2 or 3floats
float[][]MtexCoord = null;
-
+
// Whether the normal appearance is overrided by the alternate app
boolean appearanceOverrideEnable = false;
int changedFrequent = 0;
-
+
MorphRetained() {
this.nodeType = NodeRetained.MORPH;
localBounds = new BoundingBox();
@@ -164,7 +164,7 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
message.args[1] = collisionBound;
VirtualUniverse.mc.processMessage(message);
}
- }
+ }
/**
* Sets the geometric bounds of a node.
@@ -172,7 +172,7 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
*/
void setBounds(Bounds bounds) {
super.setBounds(bounds);
- if (source.isLive() && !boundsAutoCompute) {
+ if (source.isLive() && !boundsAutoCompute) {
J3dMessage message = new J3dMessage();
message.type = J3dMessage.REGION_BOUND_CHANGED;
message.threads = J3dThread.UPDATE_TRANSFORM |
@@ -190,8 +190,8 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
*/
Bounds getCollisionBounds() {
return (collisionBound == null? null : (Bounds)collisionBound.clone());
- }
-
+ }
+
/**
* Sets the geometryArrays component of the Morph node.
* @param geometryArrays the new vector of geometryArrays for the morph node
@@ -201,7 +201,7 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
if ((geometryArrays == null || geometryArrays.length == 0) && numGeometryArrays == 0)
return;
-
+
GeometryArrayRetained geo, prevGeo;
if (numGeometryArrays != 0 && (geometryArrays == null || numGeometryArrays != geometryArrays.length))
@@ -235,7 +235,7 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
this.geometryArrays = new GeometryArrayRetained[geometryArrays.length];
numGeometryArrays = geometryArrays.length;
}
-
+
for (i=0;i < numGeometryArrays;i++) {
geo = (GeometryArrayRetained)geometryArrays[i].retained;
if (((Morph)this.source).isLive()) {
@@ -248,7 +248,7 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
geo.addMorphUser(this);
}
}
-
+
this.geometryArrays[i] = geo;
}
if (this.geometryArrays[0] == null)
@@ -265,14 +265,14 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
int texCoordSetCount = this.geometryArrays[0].getTexCoordSetCount();
if (this.geometryArrays[0] instanceof IndexedGeometryArrayRetained) {
Mcoord = new float[this.geometryArrays[0].getNumCoordCount()* 3];
-
+
if ((vFormat & GeometryArray.COLOR_4) == GeometryArray.COLOR_3)
Mcolor = new float[this.geometryArrays[0].getNumColorCount()* 3];
else if ((vFormat & GeometryArray.COLOR_4) == GeometryArray.COLOR_4)
Mcolor = new float[this.geometryArrays[0].getNumColorCount()* 4];
MtexCoord = new float[texCoordSetCount][];
- if ((vFormat & GeometryArray.NORMALS) != 0)
+ if ((vFormat & GeometryArray.NORMALS) != 0)
Mnormal = new float[this.geometryArrays[0].getNumNormalCount() *3];
for (int k = 0; k < texCoordSetCount; k++) {
if ((vFormat & GeometryArray.TEXTURE_COORDINATE_2) != 0)
@@ -285,7 +285,7 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
}
else {
Mcoord = new float[this.geometryArrays[0].validVertexCount* 3];
-
+
if ((vFormat & GeometryArray.COLOR_4) == GeometryArray.COLOR_3) {
Mcolor = new float[this.geometryArrays[0].validVertexCount* 3];
} else if ((vFormat & GeometryArray.COLOR_4) == GeometryArray.COLOR_4) {
@@ -305,8 +305,8 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
}
}
}
-
- // create a new morphedGeometryArray
+
+ // create a new morphedGeometryArray
initMorphedGeometry();
if (source.isLive()) {
@@ -331,17 +331,17 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
VirtualUniverse.mc.processMessage(mChangeMessage);
if (boundsAutoCompute) {
- GeometryArrayRetained mga = (GeometryArrayRetained)morphedGeometryArray.retained;
+ GeometryArrayRetained mga = (GeometryArrayRetained)morphedGeometryArray.retained;
// Compute the bounds once
mga.incrComputeGeoBounds();// This compute the bbox if dirty
mga.decrComputeGeoBounds();
}
}
-
+
}
-
+
/**
* Retrieves the geometryArrays component of this Morph node.
* @param index the index of GeometryArray to be returned
@@ -350,7 +350,7 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
GeometryArray getGeometryArray(int index) {
return (GeometryArray)this.geometryArrays[index].source;
}
-
+
/**
* Sets the appearance component of this Morph node.
* @param appearance the new apearance component for this morph node
@@ -359,15 +359,15 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
boolean visibleIsDirty = false;
if (((Morph)this.source).isLive()) {
-
+
if (appearance != null) {
this.appearance.clearLive(refCount);
for (int i=mirrorShape3D.size()-1; i>=0; i--) {
this.appearance.removeAMirrorUser(
(Shape3DRetained)mirrorShape3D.get(i));
- }
+ }
}
-
+
if (newAppearance != null) {
((AppearanceRetained)newAppearance.retained).setLive(inBackgroundGroup, refCount);
appearance = ((AppearanceRetained)newAppearance.retained);
@@ -385,17 +385,17 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
if(visible == false) {
visible = true;
visibleIsDirty = true;
- }
+ }
}
// Send a message
int size = 0;
-
+
if (visibleIsDirty)
size = 2;
else
size = 1;
- J3dMessage[] createMessage = new J3dMessage[size];
+ J3dMessage[] createMessage = new J3dMessage[size];
createMessage[0] = new J3dMessage();
createMessage[0].threads = J3dThread.UPDATE_RENDERING_ENVIRONMENT |
J3dThread.UPDATE_RENDER;
@@ -418,7 +418,7 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
createMessage[0].args[4] = Shape3DRetained.getGeomAtomsArray(mirrorShape3D);
if(visibleIsDirty) {
createMessage[1] = new J3dMessage();
- createMessage[1].threads = J3dThread.UPDATE_GEOMETRY;
+ createMessage[1].threads = J3dThread.UPDATE_GEOMETRY;
createMessage[1].type = J3dMessage.SHAPE3D_CHANGED;
createMessage[1].universe = universe;
createMessage[1].args[0] = this;
@@ -436,7 +436,7 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
}
}
}
-
+
/**
* Retrieves the morph node's appearance component.
* @return the morph node's appearance
@@ -445,10 +445,10 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
return (appearance == null ? null :
(Appearance) this.appearance.source);
}
-
+
void setAppearanceOverrideEnable(boolean flag) {
if (((Morph)this.source).isLive()) {
-
+
// Send a message
J3dMessage createMessage = new J3dMessage();
createMessage.threads = J3dThread.UPDATE_RENDERING_ENVIRONMENT |
@@ -478,7 +478,7 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
boolean getAppearanceOverrideEnable() {
return appearanceOverrideEnable;
}
-
+
boolean intersect(PickInfo pickInfo, PickShape pickShape, int flags ) {
Transform3D localToVworld = pickInfo.getLocalToVWorldRef();
@@ -492,7 +492,7 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
if (geo.mirrorGeometry != null) {
geo = geo.mirrorGeometry;
}
-
+
if (((flags & PickInfo.CLOSEST_INTERSECTION_POINT) == 0) &&
((flags & PickInfo.CLOSEST_DISTANCE) == 0) &&
((flags & PickInfo.CLOSEST_GEOM_INFO) == 0) &&
@@ -504,11 +504,11 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
Point3d iPntVW = new Point3d();
if (geo.intersect(newPS, pickInfo, flags, iPnt, geo, 0)) {
-
+
iPntVW.set(iPnt);
localToVworld.transform(iPntVW);
double distance = pickShape.distance(iPntVW);
-
+
if ((flags & PickInfo.CLOSEST_DISTANCE) != 0) {
pickInfo.setClosestDistance(distance);
}
@@ -520,8 +520,8 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
}
return false;
}
-
-
+
+
/**
* Check if the geometry component of this shape node under path
* intersects with the pickShape.
@@ -531,17 +531,17 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
*/
boolean intersect(SceneGraphPath path,
PickShape pickShape, double[] dist) {
-
+
// This method will not do bound intersect check, as it assume caller
// has already done that. ( For performance and code simplification
// reasons. )
int flags;
PickInfo pickInfo = new PickInfo();
-
+
Transform3D localToVworld = path.getTransform();
if (localToVworld == null) {
- throw new RuntimeException(J3dI18N.getString("MorphRetained5"));
+ throw new RuntimeException(J3dI18N.getString("MorphRetained5"));
}
pickInfo.setLocalToVWorldRef( localToVworld);
@@ -550,17 +550,17 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
//System.err.println(" no dist request ....");
return intersect(pickInfo, pickShape, 0);
}
-
+
flags = PickInfo.CLOSEST_DISTANCE;
if (intersect(pickInfo, pickShape, flags)) {
dist[0] = pickInfo.getClosestDistance();
return true;
}
-
+
return false;
-
- }
-
+
+ }
+
/**
* Sets the Morph node's weight vector
* @param wieghts the new vector of weights for the morph node
@@ -580,9 +580,9 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
throw new IllegalArgumentException(J3dI18N.getString("MorphRetained8"));
// Weights array is ALWAYS malloced in setGeometryArrays method
- for (i=numGeometryArrays-1; i>=0; i--)
+ for (i=numGeometryArrays-1; i>=0; i--)
this.weights[i] = weights[i];
-
+
if (source.isLive()) {
((GeometryArrayRetained)morphedGeometryArray.retained).updateData(this);
@@ -592,7 +592,7 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
mChangeMessage.threads = (J3dThread.UPDATE_GEOMETRY |
J3dThread.UPDATE_TRANSFORM);
// If its a indexed geometry array, unindexify in renderBin
- if (this.geometryArrays[0] instanceof IndexedGeometryArrayRetained)
+ if (this.geometryArrays[0] instanceof IndexedGeometryArrayRetained)
mChangeMessage.threads |= J3dThread.UPDATE_RENDERING_ATTRIBUTES;
mChangeMessage.args[0] = this;
mChangeMessage.args[1]= new Integer(GEOMETRY_CHANGED);
@@ -602,7 +602,7 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
}
}
-
+
/**
* Retrieves the Morph node's weight vector
* @return the morph node's weight vector.
@@ -645,7 +645,7 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
* Compute the combine bounds of bounds and its localBounds.
*/
void computeCombineBounds(Bounds bounds) {
-
+
if(boundsAutoCompute) {
GeometryArrayRetained mga =
(GeometryArrayRetained)morphedGeometryArray.retained;
@@ -660,7 +660,7 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
bounds.combine((Bounds) localBounds);
}
}
- }
+ }
// Return the number of geometry arrays in this MorphRetained object.
int getNumGeometryArrays() {
@@ -680,15 +680,15 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
if (numGeometryArrays > 1) {
doErrorCheck(geo, geometryArrays[1]);
}
-
+
}
}
-
+
((GeometryArrayRetained)morphedGeometryArray.retained).updateData(this);
// Compute the bounds once
if (boundsAutoCompute && coordinatesChanged) {
- GeometryArrayRetained mga = (GeometryArrayRetained)morphedGeometryArray.retained;
+ GeometryArrayRetained mga = (GeometryArrayRetained)morphedGeometryArray.retained;
mga.incrComputeGeoBounds(); // This compute the bbox if dirty
mga.decrComputeGeoBounds();
}
@@ -700,11 +700,11 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
*/
public void updateData(Geometry mga) {
- int i,j,k, vFormat, geoType, stripVCount[];
+ int i,j,k, vFormat, geoType, stripVCount[];
int iCount = 0;
int numStrips = 0;
int texCoordSetCount = 0;
- float coord[] = new float[3], color[] = new float[4],
+ float coord[] = new float[3], color[] = new float[4],
normal[] = new float[3], texCoord[] = new float[3];
vFormat = geometryArrays[0].vertexFormat;
@@ -720,11 +720,11 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
} else {
count = geometryArrays[0].validVertexCount;
}
-
+
for (i=0; i < count; i++) {
Mcoord[vc++] = Mcoord[vc++] = Mcoord[vc++] = 0.0f;
}
-
+
if ((vFormat & GeometryArray.COLOR) != 0) {
if (geometryArrays[0] instanceof IndexedGeometryArrayRetained){
@@ -735,12 +735,12 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
for (i=0; i < count; i++) {
if ((vFormat & GeometryArray.COLOR_4) == GeometryArray.COLOR_3)
Mcolor[cc++] = Mcolor[cc++] = Mcolor[cc++] = 0.0f;
-
+
else if ((vFormat & GeometryArray.COLOR_4) == GeometryArray.COLOR_4)
Mcolor[cc++] = Mcolor[cc++] = Mcolor[cc++] = Mcolor[cc++] = 0.0f;
}
}
-
+
if ((vFormat & GeometryArray.NORMALS) != 0) {
if (geometryArrays[0] instanceof IndexedGeometryArrayRetained){
@@ -752,9 +752,9 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
Mnormal[nc++] = Mnormal[nc++] = Mnormal[nc++] = 0.0f;
}
}
-
+
if ((vFormat & GeometryArray.TEXTURE_COORDINATE) != 0) {
- for (k = 0; k < texCoordSetCount; k++) {
+ for (k = 0; k < texCoordSetCount; k++) {
if (geometryArrays[0] instanceof IndexedGeometryArrayRetained){
count = geometryArrays[0].getNumTexCoordCount(k);
} else {
@@ -822,7 +822,7 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
Mnormal[nc++] += normal[2]*w;
}
}
-
+
if ((vFormat & GeometryArray.TEXTURE_COORDINATE) != 0) {
for (k = 0; k < texCoordSetCount; k++) {
int tcount = 0;
@@ -873,7 +873,7 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
int noffset = geometryArrays[0].normalOffset();
int voffset = geometryArrays[0].coordinateOffset();
int offset = 0;
-
+
int initialVertex = 0;
for (j=0;j < numGeometryArrays;j++) {
double w = weights[j];
@@ -954,7 +954,7 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
Mcoord[vc++] += vdata[offset]*w;
Mcoord[vc++] += vdata[offset+1]*w;
Mcoord[vc++] += vdata[offset+2]*w;
-
+
}
}
}
@@ -1103,7 +1103,7 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
Mcolor[cc++] += (c4b[cIndex].w & 0xff) * val;
}
break;
-
+
}
}
if ((vFormat & GeometryArray.NORMALS) != 0) {
@@ -1126,7 +1126,7 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
Mnormal[nc++] += nf[nIndex++]*w;
}
break;
- case GeometryArrayRetained.N3F:
+ case GeometryArrayRetained.N3F:
Vector3f[] n3f = geometryArrays[j].getNormalRef3f();
for (i=0; i< count; i++, nIndex++) {
Mnormal[nc++] += n3f[nIndex].x*w;
@@ -1181,27 +1181,27 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
Mcoord[vc++] += (float)p3d[vIndex].z*w;
}
break;
-
+
}
-
- }
+
+ }
}
}
}
-
+
GeometryArrayRetained mgaR =
(GeometryArrayRetained)mga.retained;
mgaR.setCoordRefFloat(Mcoord);
-
+
if ((vFormat & GeometryArray.COLOR) != 0)
mgaR.setColorRefFloat(Mcolor);
-
+
// *******Need to normalize normals
if ((vFormat & GeometryArray.NORMALS) != 0)
mgaR.setNormalRefFloat(Mnormal);
-
- if ((vFormat & GeometryArray.TEXTURE_COORDINATE) != 0) {
+
+ if ((vFormat & GeometryArray.TEXTURE_COORDINATE) != 0) {
for (k = 0; k < texCoordSetCount; k++) {
mgaR.setTexCoordRefFloat(k, MtexCoord[k]);
}
@@ -1210,7 +1210,7 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
void updateImmediateMirrorObject(Object[] objs) {
int i;
-
+
int component = ((Integer)objs[1]).intValue();
Shape3DRetained[] msArr = (Shape3DRetained[]) objs[2];
if ((component & APPEARANCE_CHANGED) != 0) {
@@ -1231,7 +1231,7 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
}
}
}
-
+
/**
* assign a name to this node when it is made live.
*/
@@ -1241,10 +1241,10 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
ArrayList msList = new ArrayList();
GeometryAtom ga;
int oldrefCount = refCount;
-
+
super.doSetLive(s);
nodeId = universe.getNodeId();
-
+
for (i = 0; i < numGeometryArrays; i++) {
synchronized(geometryArrays[i].liveStateLock) {
@@ -1263,14 +1263,14 @@ class MorphRetained extends LeafRetained implements GeometryUpdater {
((GeometryArrayRetained)(morphedGeometryArray.retained)).setLive(inBackgroundGroup, s.refCount);
if (boundsAutoCompute) {
- GeometryArrayRetained mga = (GeometryArrayRetained)morphedGeometryArray.retained;
+ GeometryArrayRetained mga = (GeometryArrayRetained)morphedGeometryArray.retained;
// Compute the bounds once
mga.incrComputeGeoBounds(); // This compute the bbox if dirty
mga.decrComputeGeoBounds();
localBounds.setWithLock(mga.geoBounds);
}
-
+
if (inSharedGroup) {
for (i=0; icloneTree
to duplicate the current node.
+ * by cloneTree
to duplicate the current node.
* cloneNode
should be overridden by any user subclassed
* objects. All subclasses must have their cloneNode
* method consist of the following lines:
@@ -740,8 +740,8 @@ public abstract class Node extends SceneGraphObject {
if (originalNode.nodeHashtable != null) {
duplicateAttributes(originalNode, forceDuplicate);
} else {
- // user call cloneNode() or duplicateNode() directly
- // instead of via cloneTree()
+ // user call cloneNode() or duplicateNode() directly
+ // instead of via cloneTree()
originalNode.nodeHashtable = new Hashtable();
duplicateAttributes(originalNode, forceDuplicate);
originalNode.nodeHashtable = null;
@@ -754,7 +754,7 @@ public abstract class Node extends SceneGraphObject {
* originalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
@@ -825,5 +825,5 @@ public abstract class Node extends SceneGraphObject {
}
visited = false;
}
-
+
}
diff --git a/src/classes/share/javax/media/j3d/NodeComponent.java b/src/classes/share/javax/media/j3d/NodeComponent.java
index f74ea55..5f5e27b 100644
--- a/src/classes/share/javax/media/j3d/NodeComponent.java
+++ b/src/classes/share/javax/media/j3d/NodeComponent.java
@@ -43,7 +43,7 @@ import java.util.Hashtable;
public abstract class NodeComponent extends SceneGraphObject {
// This is use for cloneTree only, set to false after the operation
- boolean forceDuplicate = false;
+ boolean forceDuplicate = false;
/**
* Constructs a NodeComponent object with default parameters.
* The default values are as follows:
@@ -106,7 +106,7 @@ public abstract class NodeComponent extends SceneGraphObject {
* originalNodeComponent, boolean forceDuplicate)
*/
public void duplicateNodeComponent(NodeComponent originalNodeComponent) {
- duplicateAttributes(originalNodeComponent,
+ duplicateAttributes(originalNodeComponent,
originalNodeComponent.forceDuplicate);
}
@@ -114,7 +114,7 @@ public abstract class NodeComponent extends SceneGraphObject {
* Copies all node information from originalNodeComponent
into
* the current node component. This method is called from subclass of
* duplicateNodeComponent
method which is, in turn, called by the
- * cloneNodeComponent
method.
+ * cloneNodeComponent
method.
*
* For any NodeComponent objects
* contained by the object being duplicated, each NodeComponent
@@ -134,10 +134,10 @@ public abstract class NodeComponent extends SceneGraphObject {
duplicateAttributes(originalNodeComponent,
originalNodeComponent.forceDuplicate);
} else {
- // user call cloneNodeComponent() or duplicateNodeComponent()
+ // user call cloneNodeComponent() or duplicateNodeComponent()
// directly instead of via cloneTree()
originalNodeComponent.nodeHashtable = new Hashtable();
- duplicateAttributes(originalNodeComponent,
+ duplicateAttributes(originalNodeComponent,
originalNodeComponent.forceDuplicate);
originalNodeComponent.nodeHashtable = null;
}
@@ -182,9 +182,9 @@ public abstract class NodeComponent extends SceneGraphObject {
/**
* Used to create a new instance of a NodeComponent object. This
- * routine is called by cloneNode
to duplicate the
+ * routine is called by cloneNode
to duplicate the
* current node.
- *
+ *
* cloneNodeComponent
should be overridden by any user
* subclassed NodeComponent objects. All subclasses must have their
* cloneNodeComponent
@@ -202,7 +202,7 @@ public abstract class NodeComponent extends SceneGraphObject {
* false
, the value of each node's
* duplicateOnCloneTree
variable determines whether
* NodeComponent data is duplicated or copied.
- *
+ *
* @exception RestrictedAccessException if forceDuplicate is set and
* this object is part of a compiled scenegraph
*
@@ -216,12 +216,12 @@ public abstract class NodeComponent extends SceneGraphObject {
// For backward compatibility !
//
// If user did not overwrite this procedure, it will fall back
- // to call cloneNodeComponent()
- // So for core API,
+ // to call cloneNodeComponent()
+ // So for core API,
// don't implement cloneNodeComponent(boolean forceDuplicate)
// otherwise this prcedure will not call and the user
// cloneNodeComponent() will not invoke.
- NodeComponent nc;
+ NodeComponent nc;
this.forceDuplicate = forceDuplicate;
try {
nc = cloneNodeComponent();
@@ -239,7 +239,7 @@ public abstract class NodeComponent extends SceneGraphObject {
* originalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
@@ -274,17 +274,17 @@ public abstract class NodeComponent extends SceneGraphObject {
this.retained.setSource(this);
}
- /**
+ /**
* This function is called from getNodeComponent() to see if any of
- * the sub-NodeComponents duplicateOnCloneTree flag is true.
- * If it is the case, current NodeComponent needs to
- * duplicate also even though current duplicateOnCloneTree flag is false.
+ * the sub-NodeComponents duplicateOnCloneTree flag is true.
+ * If it is the case, current NodeComponent needs to
+ * duplicate also even though current duplicateOnCloneTree flag is false.
* This should be overwrite by NodeComponent which contains sub-NodeComponent.
*/
boolean duplicateChild() {
return getDuplicateOnCloneTree();
}
-
+
/*
* @exception IllegalSharingException if this NodeComponent is live and
* the specified image is being used by a Canvas3D as an off-screen buffer.
@@ -307,6 +307,6 @@ public abstract class NodeComponent extends SceneGraphObject {
}
}
}
- }
-
+ }
+
}
diff --git a/src/classes/share/javax/media/j3d/NodeComponentRetained.java b/src/classes/share/javax/media/j3d/NodeComponentRetained.java
index 0c848e2..1a8c403 100644
--- a/src/classes/share/javax/media/j3d/NodeComponentRetained.java
+++ b/src/classes/share/javax/media/j3d/NodeComponentRetained.java
@@ -62,7 +62,7 @@ class NodeComponentRetained extends SceneGraphObjectRetained {
// In the case of Appearance, its a bitmask of all components
int changedFrequent = 0;
int compChanged = 0;
-
+
// Increment the refcount. If this is the first, mark it as live.
void doSetLive(boolean inBackgroundGroup, int refCount) {
int oldRefCount = this.refCount;
@@ -85,7 +85,7 @@ class NodeComponentRetained extends SceneGraphObjectRetained {
}
}
-
+
// Decrement the refcount. If this is the last, mark it as not live.
void clearLive(int refCount) {
@@ -176,7 +176,7 @@ class NodeComponentRetained extends SceneGraphObjectRetained {
void setInImmCtx(boolean inCtx) {
inImmCtx = inCtx;
}
-
+
/**
* This gets the immedate mode context flag
*/
diff --git a/src/classes/share/javax/media/j3d/NodeComponentUpdate.java b/src/classes/share/javax/media/j3d/NodeComponentUpdate.java
index 1f5502d..ad6408b 100644
--- a/src/classes/share/javax/media/j3d/NodeComponentUpdate.java
+++ b/src/classes/share/javax/media/j3d/NodeComponentUpdate.java
@@ -32,7 +32,7 @@
package javax.media.j3d;
/**
- * A Node Component Update interface. Any object that can be put in the
+ * A Node Component Update interface. Any object that can be put in the
* node component updateCheck list must implement this interface.
*/
diff --git a/src/classes/share/javax/media/j3d/NodeReferenceTable.java b/src/classes/share/javax/media/j3d/NodeReferenceTable.java
index a36370a..01ab7f4 100644
--- a/src/classes/share/javax/media/j3d/NodeReferenceTable.java
+++ b/src/classes/share/javax/media/j3d/NodeReferenceTable.java
@@ -49,11 +49,11 @@ import java.util.Hashtable;
* getNewObjectReference
method from this object to get updated
* references to objects that have been duplicated in the new cloneTree
* sub-graph. If a match is found, a
- * reference to the corresponding SceneGraphObject in the newly cloned sub-graph
+ * reference to the corresponding SceneGraphObject in the newly cloned sub-graph
* is returned. If no corresponding reference is found, either a
* DanglingReferenceException is thrown by the cloneTree
* method or a reference to the original
- * SceneGraphObject is returned depending on the value of the
+ * SceneGraphObject is returned depending on the value of the
* allowDanglingReferences
parameter passed in the
* cloneTree
call.
* @see SceneGraphObject#updateNodeReferences
diff --git a/src/classes/share/javax/media/j3d/NodeRetained.java b/src/classes/share/javax/media/j3d/NodeRetained.java
index 56847c4..cd4bbcf 100644
--- a/src/classes/share/javax/media/j3d/NodeRetained.java
+++ b/src/classes/share/javax/media/j3d/NodeRetained.java
@@ -78,19 +78,19 @@ abstract class NodeRetained extends SceneGraphObjectRetained implements NnuId {
// traverse flags
static final int CONTAINS_VIEWPLATFORM = 0x1;
-
+
/**
* The universe that we are in
- */
+ */
VirtualUniverse universe = null;
- /**
+ /**
* The locale that this node is attatched to. This is only non-null
* if this instance is directly linked into a locale.
*/
Locale locale = null;
-
+
/**
* The node's parent.
*/
@@ -102,7 +102,7 @@ abstract class NodeRetained extends SceneGraphObjectRetained implements NnuId {
String nodeId = null;
/**
- * An int that represents the nodes type. Used for quick if tests
+ * An int that represents the nodes type. Used for quick if tests
* in the traverser.
*/
int nodeType;
@@ -138,17 +138,17 @@ abstract class NodeRetained extends SceneGraphObjectRetained implements NnuId {
// TransformGroupRetained
Transform3D localToVworld[][] = null;
int localToVworldIndex[][] = null;
-
+
static final int LAST_LOCAL_TO_VWORLD = 0;
static final int CURRENT_LOCAL_TO_VWORLD = 1;
- // A parallel array to localToVworld. This is the keys for
+ // A parallel array to localToVworld. This is the keys for
// localToVworld transforms in shared groups.
HashKey localToVworldKeys[] = null;
/**
- * This boolean is true when the geometric bounds for the node is
- * automatically updated
+ * This boolean is true when the geometric bounds for the node is
+ * automatically updated
*/
boolean boundsAutoCompute = true;
@@ -158,7 +158,7 @@ abstract class NodeRetained extends SceneGraphObjectRetained implements NnuId {
// Bounds set by the API
Bounds apiBounds;
-
+
protected Bounds cachedBounds=null; // Cached auto compute bounds, could we use localBounds ?
protected boolean validCachedBounds = false; // Fix to Issue 514
/**
@@ -167,13 +167,13 @@ abstract class NodeRetained extends SceneGraphObjectRetained implements NnuId {
* For BranchGroup under a non-shared group this size of
* branchGroupPaths is always 1. Otherwise, the size is equal to
* the number of possible paths to reach this node.
- * This variable is used to cached BranchGroup for fast picking.
+ * This variable is used to cached BranchGroup for fast picking.
* For non BranchGroupRetained class this is a reference to
* the previous BranchGroupRetained branchGroupPaths.
*/
ArrayList branchGroupPaths = new ArrayList(1);
- // background node whose geometry branch contains this node
+ // background node whose geometry branch contains this node
BackgroundRetained geometryBackground = null;
// closest parent which is a TransformGroupRetained or sharedGroupRetained
@@ -190,11 +190,11 @@ abstract class NodeRetained extends SceneGraphObjectRetained implements NnuId {
// Id use for quick search.
int nnuId;
-
+
NodeRetained() {
// Get a not necessary unique Id.
nnuId = NnuIdManager.getId();
-
+
localBounds = new BoundingBox();
((BoundingBox)localBounds).setUpper(-1.0, -1.0, -1.0);
((BoundingBox)localBounds).setLower( 1.0, 1.0, 1.0);
@@ -221,7 +221,7 @@ abstract class NodeRetained extends SceneGraphObjectRetained implements NnuId {
Bounds getLocalBounds(Bounds bounds) {
return (Bounds)bounds.clone();
}
-
+
/**
* Sets the geometric bounds of a node.
* @param bounds the bounding object for the node
@@ -236,7 +236,7 @@ abstract class NodeRetained extends SceneGraphObjectRetained implements NnuId {
localBounds.transform(staticTransform.transform);
}
} else {
- if(localBounds != null) {
+ if(localBounds != null) {
localBounds.set((Bounds)null);
}
else {
@@ -251,7 +251,7 @@ abstract class NodeRetained extends SceneGraphObjectRetained implements NnuId {
localBounds.transform(staticTransform.transform);
}
} else {
- if(localBounds != null) {
+ if(localBounds != null) {
localBounds.set((Bounds)null);
}
else {
@@ -260,7 +260,7 @@ abstract class NodeRetained extends SceneGraphObjectRetained implements NnuId {
}
}
}
-
+
/**
* Gets the bounding object of a node.
* @return the node's bounding object
@@ -275,43 +275,43 @@ abstract class NodeRetained extends SceneGraphObjectRetained implements NnuId {
}
}
return b;
- }
-
+ }
+
Bounds getBounds() {
return apiBounds;
}
-
+
/**
* ONLY needed for SHAPE, MORPH, and LINK node type.
* Compute the combine bounds of bounds and its localBounds.
*/
void computeCombineBounds(Bounds bounds) {
// Do nothing except for Group, Shape3D, Morph, and Link node.
- }
-
-
+ }
+
+
/**
* Sets the automatic calcuation of geometric bounds of a node.
- * @param autoCompute is a boolean value indicating if automatic calcuation
- * of bounds
+ * @param autoCompute is a boolean value indicating if automatic calcuation
+ * of bounds
*/
void setBoundsAutoCompute(boolean autoCompute) {
if (this.boundsAutoCompute==autoCompute) {
return;
}
-
+
this.boundsAutoCompute = autoCompute;
dirtyBoundsCache();
- }
-
+ }
+
/**
* Gets the auto Compute flag for the geometric bounds.
* @return the node's auto Compute flag for the geometric bounding object
*/
boolean getBoundsAutoCompute() {
return boundsAutoCompute;
- }
-
+ }
+
/**
* Replaces the specified parent by a new parent.
* @param parent the new parent
@@ -319,7 +319,7 @@ abstract class NodeRetained extends SceneGraphObjectRetained implements NnuId {
void setParent(NodeRetained parent) {
this.parent = parent;
}
-
+
/**
* Returns the parent of the node.
* @return the parent.
@@ -339,39 +339,39 @@ abstract class NodeRetained extends SceneGraphObjectRetained implements NnuId {
}
}
-
- // Note : key will get modified in this method.
+
+ // Note : key will get modified in this method.
private void computeLocalToVworld( NodeRetained caller, NodeRetained nodeR,
HashKey key, Transform3D l2Vw) {
int i;
-
+
// To handle localToVworld under a SG.
- if(nodeR instanceof SharedGroupRetained) {
+ if(nodeR instanceof SharedGroupRetained) {
// Get the immediate parent's id and remove last id from key.
String nodeId = key.getLastNodeId();
-
+
SharedGroupRetained sgRetained = (SharedGroupRetained) nodeR;
-
+
// Search for the right parent.
for(i=0; ifalse
, the value of each node's
* duplicateOnCloneTree
variable determines whether
* NodeComponent data is duplicated or copied.
- * @exception ClassCastException if originalNode is not an instance of
+ * @exception ClassCastException if originalNode is not an instance of
* Shape3D
*
* @see Node#cloneTree
@@ -648,7 +648,7 @@ public class OrientedShape3D extends Shape3D {
* @see NodeComponent#setDuplicateOnCloneTree
*/
public void duplicateNode(Node originalNode, boolean forceDuplicate) {
- checkDuplicateNode(originalNode, forceDuplicate);
+ checkDuplicateNode(originalNode, forceDuplicate);
}
@@ -675,9 +675,9 @@ public class OrientedShape3D extends Shape3D {
* @see NodeComponent#setDuplicateOnCloneTree
*/
void duplicateAttributes(Node originalNode, boolean forceDuplicate) {
-
+
super.duplicateAttributes(originalNode, forceDuplicate);
- OrientedShape3DRetained attr = (OrientedShape3DRetained)
+ OrientedShape3DRetained attr = (OrientedShape3DRetained)
originalNode.retained;
OrientedShape3DRetained rt = (OrientedShape3DRetained) retained;
diff --git a/src/classes/share/javax/media/j3d/OrientedShape3DRenderMethod.java b/src/classes/share/javax/media/j3d/OrientedShape3DRenderMethod.java
index f64a763..4772d02 100644
--- a/src/classes/share/javax/media/j3d/OrientedShape3DRenderMethod.java
+++ b/src/classes/share/javax/media/j3d/OrientedShape3DRenderMethod.java
@@ -40,25 +40,25 @@ package javax.media.j3d;
class OrientedShape3DRenderMethod implements RenderMethod {
- public boolean render(RenderMolecule rm, Canvas3D cv,
+ public boolean render(RenderMolecule rm, Canvas3D cv,
RenderAtomListInfo ra, int dirtyBits) {
boolean useAlpha;
boolean isNonUniformScale;
Transform3D trans=null;
-
+
useAlpha = rm.useAlpha;
-
+
GeometryArrayRetained geo = (GeometryArrayRetained)ra.geometry();
- geo.setVertexFormat((rm.useAlpha &&
- ((geo.vertexFormat & GeometryArray.COLOR) != 0)),
+ geo.setVertexFormat((rm.useAlpha &&
+ ((geo.vertexFormat & GeometryArray.COLOR) != 0)),
rm.textureBin.attributeBin.ignoreVertexColors, cv.ctx);
-
+
if (rm.doInfinite) {
cv.updateState(dirtyBits);
while (ra != null) {
trans = ra.infLocalToVworld;
isNonUniformScale = !trans.isCongruent();
-
+
cv.setModelViewMatrix(cv.ctx, cv.vworldToEc.mat, trans);
ra.geometry().execute(cv, ra.renderAtom, isNonUniformScale,
(useAlpha && ra.geometry().noAlpha),
@@ -69,8 +69,8 @@ class OrientedShape3DRenderMethod implements RenderMethod {
}
return true;
}
-
- boolean isVisible = false; // True if any of the RAs is visible.
+
+ boolean isVisible = false; // True if any of the RAs is visible.
while (ra != null) {
if (cv.ra == ra.renderAtom) {
if (cv.raIsVisible) {
@@ -95,7 +95,7 @@ class OrientedShape3DRenderMethod implements RenderMethod {
cv.raIsVisible = true;
trans = ra.localToVworld;
isNonUniformScale = !trans.isCongruent();
-
+
cv.setModelViewMatrix(cv.ctx, cv.vworldToEc.mat, trans);
ra.geometry().execute(cv, ra.renderAtom, isNonUniformScale,
(useAlpha && ra.geometry().noAlpha),
@@ -109,16 +109,16 @@ class OrientedShape3DRenderMethod implements RenderMethod {
cv.raIsVisible = false;
}
cv.ra = ra.renderAtom;
-
+
}
ra = ra.next;
-
+
}
-
- geo.disableGlobalAlpha(cv.ctx,
- (rm.useAlpha &&
- ((geo.vertexFormat & GeometryArray.COLOR) != 0)),
+
+ geo.disableGlobalAlpha(cv.ctx,
+ (rm.useAlpha &&
+ ((geo.vertexFormat & GeometryArray.COLOR) != 0)),
rm.textureBin.attributeBin.ignoreVertexColors);
return isVisible;
}
diff --git a/src/classes/share/javax/media/j3d/OrientedShape3DRetained.java b/src/classes/share/javax/media/j3d/OrientedShape3DRetained.java
index 1e338ba..8d7b7c9 100644
--- a/src/classes/share/javax/media/j3d/OrientedShape3DRetained.java
+++ b/src/classes/share/javax/media/j3d/OrientedShape3DRetained.java
@@ -71,10 +71,10 @@ class OrientedShape3DRetained extends Shape3DRetained {
// Frequently used variables for scale invariant computation
// Left and right Vworld to Clip coordinates transforms
- private Transform3D left_xform = new Transform3D();
- private Transform3D right_xform = new Transform3D();
+ private Transform3D left_xform = new Transform3D();
+ private Transform3D right_xform = new Transform3D();
- // Transform for scaling the OrientedShape3D to correct for
+ // Transform for scaling the OrientedShape3D to correct for
// perspective foreshortening
Transform3D scaleXform = new Transform3D();
@@ -254,7 +254,7 @@ class OrientedShape3DRetained extends Shape3DRetained {
changeMessage.args[0] = getGeomAtomsArray(mirrorShape3D);
changeMessage.args[1] = new Integer(component);
changeMessage.args[2] = attr;
- OrientedShape3DRetained[] o3dArr =
+ OrientedShape3DRetained[] o3dArr =
new OrientedShape3DRetained[mirrorShape3D.size()];
mirrorShape3D.toArray(o3dArr);
changeMessage.args[3] = o3dArr;
@@ -264,7 +264,7 @@ class OrientedShape3DRetained extends Shape3DRetained {
void updateImmediateMirrorObject(Object[] args) {
int component = ((Integer)args[1]).intValue();
- if ((component & (ALIGNMENT_CHANGED |
+ if ((component & (ALIGNMENT_CHANGED |
AXIS_CHANGED |
ROTATION_CHANGED |
CONSTANT_SCALE_CHANGED |
@@ -317,7 +317,7 @@ class OrientedShape3DRetained extends Shape3DRetained {
newList[i] = orientedTransforms[i];
}
newList[viewIndex] = xform;
- orientedTransforms = newList;
+ orientedTransforms = newList;
}
else {
if (orientedTransforms[viewIndex] == null) {
@@ -335,7 +335,7 @@ class OrientedShape3DRetained extends Shape3DRetained {
double angle = 0.0;
double sign;
boolean status;
-
+
Transform3D orientedxform = getOrientedTransform(viewIndex);
// get viewplatforms's location in virutal world
if (mode == OrientedShape3D.ROTATE_ABOUT_AXIS) { // rotate about axis
@@ -367,16 +367,16 @@ class OrientedShape3DRetained extends Shape3DRetained {
}
if (status) {
- // compute the sign of the angle by checking if the cross product
+ // compute the sign of the angle by checking if the cross product
// of the two vectors is in the same direction as the normal axis
- vector.cross(eyeVec, zAxis);
+ vector.cross(eyeVec, zAxis);
if (vector.dot(nAxis) > 0.0) {
sign = 1.0;
- } else {
+ } else {
sign = -1.0;
}
-
- // compute the angle between the projected eye vector and the
+
+ // compute the angle between the projected eye vector and the
// projected z
double dot = eyeVec.dot(zAxis);
@@ -387,10 +387,10 @@ class OrientedShape3DRetained extends Shape3DRetained {
}
angle = sign*Math.acos(dot);
-
+
// use -angle because xform is to *undo* rotation by angle
- aa.x = nAxis.x;
- aa.y = nAxis.y;
+ aa.x = nAxis.x;
+ aa.y = nAxis.y;
aa.z = nAxis.z;
aa.angle = -angle;
orientedxform.set(aa);
@@ -400,10 +400,10 @@ class OrientedShape3DRetained extends Shape3DRetained {
}
} else if(mode == OrientedShape3D.ROTATE_ABOUT_POINT ){ // rotate about point
- // Need to rotate Z axis to point to eye, and Y axis to be
- // parallel to view platform Y axis, rotating around rotation pt
+ // Need to rotate Z axis to point to eye, and Y axis to be
+ // parallel to view platform Y axis, rotating around rotation pt
- // get the eye point
+ // get the eye point
canvas.getCenterEyeInImagePlate(viewPosition);
// derive the yUp point
@@ -441,7 +441,7 @@ class OrientedShape3DRetained extends Shape3DRetained {
// rotation axis is cross product of eyeVec and zAxis
vector.cross(eyeVec, zAxis); // vector is cross product
- // if cross product is non-zero, vector is rotation axis and
+ // if cross product is non-zero, vector is rotation axis and
// rotation angle is acos(eyeVec.dot(zAxis)));
double length = vector.length();
if (length > 0.0001) {
@@ -468,12 +468,12 @@ class OrientedShape3DRetained extends Shape3DRetained {
yAxis.z = 0.0;
zRotate.transform(yAxis);
- // project the yAxis onto the plane perp to the eyeVec
+ // project the yAxis onto the plane perp to the eyeVec
status = projectToPlane(yAxis, eyeVec);
if (status) {
- // project the yUp onto the plane perp to the eyeVec
+ // project the yUp onto the plane perp to the eyeVec
status = projectToPlane(yUp, eyeVec);
}
@@ -490,11 +490,11 @@ class OrientedShape3DRetained extends Shape3DRetained {
angle = Math.acos(dot);
- // check the sign by looking a the cross product vs the eyeVec
+ // check the sign by looking a the cross product vs the eyeVec
vector.cross(yUp, yAxis); // vector is cross product
if (eyeVec.dot(vector) < 0) {
angle *= -1;
- }
+ }
aa.x = eyeVec.x;
aa.y = eyeVec.y;
aa.z = eyeVec.z;
@@ -509,13 +509,13 @@ class OrientedShape3DRetained extends Shape3DRetained {
orientedxform.mul(xform); // yRotate
orientedxform.mul(zRotate); // zRotate
vector.scale(-1.0); // vector to translate back
- xform.set(vector); // xform to translate back
+ xform.set(vector); // xform to translate back
orientedxform.mul(xform); // translate back
}
else {
orientedxform.setIdentity();
}
-
+
}
//Scale invariant computation
if(constantScale) {
diff --git a/src/classes/share/javax/media/j3d/PathInterpolator.java b/src/classes/share/javax/media/j3d/PathInterpolator.java
index f857076..33b5447 100644
--- a/src/classes/share/javax/media/j3d/PathInterpolator.java
+++ b/src/classes/share/javax/media/j3d/PathInterpolator.java
@@ -42,14 +42,14 @@ import java.util.Enumeration;
* the currentInterpolationValue.
* The currentInterpolationValue is calculated
* by linearly interpolating among a series of predefined knots
- * (using the value generated by the specified Alpha object).
+ * (using the value generated by the specified Alpha object).
* The first knot must have a value of 0.0 and the last knot must have a
* value of 1.0. An intermediate knot with index k must have a value
* strictly greater than any knot with index less than k.
*/
public abstract class PathInterpolator extends TransformInterpolator {
-
+
// Array of knots
private float knots[];
@@ -65,7 +65,7 @@ public abstract class PathInterpolator extends TransformInterpolator {
* value which can be used in further calculations by the subclass.
*/
protected float currentInterpolationValue;
-
+
/**
* This value is the index of the current base knot value, as
* determined by the alpha function. A subclass wishing to
@@ -104,7 +104,7 @@ public abstract class PathInterpolator extends TransformInterpolator {
public PathInterpolator(Alpha alpha, float[] knots) {
this(alpha, null, knots);
}
-
+
/**
* Constructs a new PathInterpolator object that interpolates
* between the knot values in the knots array. The array of knots
@@ -117,7 +117,7 @@ public abstract class PathInterpolator extends TransformInterpolator {
* @since Java 3D 1.3
*/
- public PathInterpolator(Alpha alpha,TransformGroup target,
+ public PathInterpolator(Alpha alpha,TransformGroup target,
float[] knots) {
super(alpha, target);
setKnots(knots);
@@ -231,7 +231,7 @@ public abstract class PathInterpolator extends TransformInterpolator {
protected void computePathInterpolation(float alphaValue ) {
int i;
-
+
for (i = 0; i < knots.length; i++) {
if ((i == 0 && alphaValue <= knots[i]) ||
(i > 0 && alphaValue >= knots[i-1] && alphaValue <= knots[i])) {
@@ -246,7 +246,7 @@ public abstract class PathInterpolator extends TransformInterpolator {
currentKnotIndex = i - 1;
}
break;
- }
+ }
}
}
@@ -256,7 +256,7 @@ public abstract class PathInterpolator extends TransformInterpolator {
*/
protected void computePathInterpolation() {
float value = this.alpha.value();
- computePathInterpolation(value);
+ computePathInterpolation(value);
}
@@ -265,7 +265,7 @@ public abstract class PathInterpolator extends TransformInterpolator {
* originalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
diff --git a/src/classes/share/javax/media/j3d/PhysicalBody.java b/src/classes/share/javax/media/j3d/PhysicalBody.java
index 6fbd097..b23ee4d 100644
--- a/src/classes/share/javax/media/j3d/PhysicalBody.java
+++ b/src/classes/share/javax/media/j3d/PhysicalBody.java
@@ -108,7 +108,7 @@ public class PhysicalBody extends Object {
| View.PB_EAR_POSITION_DIRTY
| View.PB_NOMINAL_EYE_HEIGHT_FROM_GROUND_DIRTY
| View.PB_NOMINAL_EYE_OFFSET_FROM_NOMINAL_SCREEN_DIRTY);
-
+
/**
* Constructs a PhysicalBody object with default parameters.
* The default values are as follows:
@@ -203,7 +203,7 @@ public class PhysicalBody extends Object {
/**
* Retrieves the user head object's left eye position and places
* that value in the specified object.
- * @param position the object that will receive the left-eye's position
+ * @param position the object that will receive the left-eye's position
* in head coordinates
*/
public void getLeftEyePosition(Point3d position) {
@@ -223,9 +223,9 @@ public class PhysicalBody extends Object {
}
/**
- * Retrieves the user head object's right eye position and places
+ * Retrieves the user head object's right eye position and places
* that value in the specified object.
- * @param position the object that will receive the right-eye's position
+ * @param position the object that will receive the right-eye's position
* in head coordinates
*/
public void getRightEyePosition(Point3d position) {
@@ -247,7 +247,7 @@ public class PhysicalBody extends Object {
/**
* Retrieves the user head object's left ear position and places
* that value in the specified object.
- * @param position the object that will receive the left-ear's position
+ * @param position the object that will receive the left-ear's position
* in head coordinates
*/
public void getLeftEarPosition(Point3d position) {
@@ -267,9 +267,9 @@ public class PhysicalBody extends Object {
}
/**
- * Retrieves the user head object's right ear position and places
+ * Retrieves the user head object's right ear position and places
* that value in the specified object.
- * @param position the object that will receive the right-ear's position
+ * @param position the object that will receive the right-ear's position
* in head coordinates
*/
public void getRightEarPosition(Point3d position) {
diff --git a/src/classes/share/javax/media/j3d/PhysicalEnvironment.java b/src/classes/share/javax/media/j3d/PhysicalEnvironment.java
index 234218c..62125db 100644
--- a/src/classes/share/javax/media/j3d/PhysicalEnvironment.java
+++ b/src/classes/share/javax/media/j3d/PhysicalEnvironment.java
@@ -95,7 +95,7 @@ public class PhysicalEnvironment extends Object {
| View.PE_TRACKING_AVAILABLE_DIRTY
| View.PE_COE_CENTER_IN_PWORLD_POLICY_DIRTY);
-
+
//// /**
//// * The offset in the user's dominant-hand-tracker coordinates
//// * to that hand's hot spot. This value is a calibration constant.
@@ -118,10 +118,10 @@ public class PhysicalEnvironment extends Object {
//
Sensor[] sensors;
- // Audio device associated with this PhysicalEnvironment
+ // Audio device associated with this PhysicalEnvironment
AudioDevice audioDevice = null;
- boolean sensorListChanged = false;
+ boolean sensorListChanged = false;
Sensor[] sensorList = null;
@@ -199,7 +199,7 @@ public class PhysicalEnvironment extends Object {
}
}
-
+
/**
* Returns copy of Sensor references. Returns null for zero
@@ -220,18 +220,18 @@ public class PhysicalEnvironment extends Object {
}
}
-
- /**
+
+ /**
* Sets the specified AudioDevice object as the device through
* which audio rendering for this PhysicalEnvironment will be
* performed.
- * @param device audio device object to be associated with this
+ * @param device audio device object to be associated with this
* PhysicalEnvironment
*/
public void setAudioDevice(AudioDevice device) {
audioDevice = device;
}
-
+
/**
* Gets the audioDevice for this PhysicalEnvironment.
* @return audio device object associated with this PhysicalEnvironment
@@ -243,14 +243,14 @@ public class PhysicalEnvironment extends Object {
/**
* Create an enumerator that produces all input devices.
* @return an enumerator of all available devices
- */
+ */
public Enumeration getAllInputDevices() {
return devices.elements();
}
/**
- * Add an input device to the list of input devices. User is
- * responsible for initializing the device and setting the
+ * Add an input device to the list of input devices. User is
+ * responsible for initializing the device and setting the
* processing mode (streaming or polling).
* @param device the device to be added to the list of input devices
* @exception IllegalArgumentException if InputDevice.getProcessingMode()
@@ -260,7 +260,7 @@ public class PhysicalEnvironment extends Object {
int driver_type = device.getProcessingMode();
- if ((driver_type == InputDevice.BLOCKING) ||
+ if ((driver_type == InputDevice.BLOCKING) ||
(driver_type == InputDevice.NON_BLOCKING) ||
(driver_type == InputDevice.DEMAND_DRIVEN)) {
synchronized (devices) {
@@ -380,7 +380,7 @@ public class PhysicalEnvironment extends Object {
/**
* Set the sensor specified by the index to sensor provided; sensors are
- * indexed starting at 0. All sensors must be registered via this
+ * indexed starting at 0. All sensors must be registered via this
* method.
* @param index the sensor's index
* @param sensor the new sensor
@@ -404,8 +404,8 @@ public class PhysicalEnvironment extends Object {
* @param index the sensor's index
*/
public Sensor getSensor(int index){
- // not synchronized, since the only way to write to sensors is
- // via a public API call, and user shouldn't call Sensor with
+ // not synchronized, since the only way to write to sensors is
+ // via a public API call, and user shouldn't call Sensor with
// two threads
return sensors[index];
}
@@ -427,7 +427,7 @@ public class PhysicalEnvironment extends Object {
coexistenceToTrackerBase.setWithLock(t);
peDirtyMask |= View.PE_COE_TO_TRACKER_BASE_DIRTY;
}
-
+
notifyUsers();
}
@@ -465,7 +465,7 @@ public class PhysicalEnvironment extends Object {
case View.NOMINAL_HEAD:
case View.NOMINAL_FEET:
break;
-
+
default:
throw new IllegalArgumentException(J3dI18N.getString("PhysicalEnvironment2"));
}
@@ -476,7 +476,7 @@ public class PhysicalEnvironment extends Object {
}
notifyUsers();
}
-
+
/**
* Returns the current coexistence center in physical world policy.
* @return one of: View.NOMINAL_SCREEN, View.NOMINAL_HEAD, or
@@ -496,7 +496,7 @@ public class PhysicalEnvironment extends Object {
/**
* Set the number of sensor objects per PhysicalEnvironmnet. This is a
- * calibration parameter that should be set before setting any sensors
+ * calibration parameter that should be set before setting any sensors
* in the PhysicalEnvironment object. This call associates 'count'
* Sensors with this object, and they are indexed from 0 to count-1.
* @param count the new sensor count
@@ -517,7 +517,7 @@ public class PhysicalEnvironment extends Object {
sensorCount = count;
sensorListChanged = true;
sensors = tmp;
- }
+ }
notifyUsers();
}
diff --git a/src/classes/share/javax/media/j3d/PickBounds.java b/src/classes/share/javax/media/j3d/PickBounds.java
index 267385b..ff0f4e6 100644
--- a/src/classes/share/javax/media/j3d/PickBounds.java
+++ b/src/classes/share/javax/media/j3d/PickBounds.java
@@ -41,7 +41,7 @@ import javax.vecmath.*;
* @see Locale#pickAll
*/
public final class PickBounds extends PickShape {
-
+
Bounds bounds;
/**
@@ -50,7 +50,7 @@ public final class PickBounds extends PickShape {
public PickBounds() {
bounds = null;
}
-
+
/**
* Constructs a PickBounds from the specified bounds object.
* @param boundsObject the bounds of this PickBounds.
@@ -58,8 +58,8 @@ public final class PickBounds extends PickShape {
public PickBounds(Bounds boundsObject) {
bounds = boundsObject;
}
-
-
+
+
/**
* Sets the bounds object of this PickBounds to the specified object.
* @param boundsObject the new bounds of this PickBounds.
@@ -67,7 +67,7 @@ public final class PickBounds extends PickShape {
public void set(Bounds boundsObject) {
bounds = boundsObject;
}
-
+
/**
* Gets the bounds object from this PickBounds.
* @return the bounds.
@@ -83,26 +83,26 @@ public final class PickBounds extends PickShape {
final boolean intersect(Bounds bounds, Point4d pickPos) {
return bounds.intersect(this.bounds, pickPos);
}
-
+
// Only use within J3D.
- // Return a new PickBounds that is the transformed (t3d) of this pickBounds.
+ // Return a new PickBounds that is the transformed (t3d) of this pickBounds.
PickShape transform(Transform3D t3d) {
// If the bounds is a BoundingBox, then the transformed bounds will
// get bigger. So this is a potential bug, and we'll have to deal with
- // if there is a complain.
+ // if there is a complain.
Bounds newBds = (Bounds)bounds.clone();
newBds.transform(t3d);
PickBounds newPB = new PickBounds(newBds);
-
+
return newPB;
}
Point3d getStartPoint() {
return bounds.getCenter();
- }
+ }
int getPickType() {
- return (bounds != null ? bounds.getPickType() :
+ return (bounds != null ? bounds.getPickType() :
PickShape.PICKUNKNOWN);
}
}
diff --git a/src/classes/share/javax/media/j3d/PickCone.java b/src/classes/share/javax/media/j3d/PickCone.java
index 3668260..c51d5aa 100644
--- a/src/classes/share/javax/media/j3d/PickCone.java
+++ b/src/classes/share/javax/media/j3d/PickCone.java
@@ -63,7 +63,7 @@ public abstract class PickCone extends PickShape {
public void getOrigin(Point3d origin) {
origin.set(this.origin);
}
-
+
/**
* Gets the direction of this PickCone.
* @param direction the Vector3d object into which the direction
@@ -84,7 +84,7 @@ public abstract class PickCone extends PickShape {
/**
* Gets the radius of this PickCone at the specified distance.
- * @param distance the distance from the origin at which we want
+ * @param distance the distance from the origin at which we want
* the radius of the cone
* @return the radius at the specified distance
*/
diff --git a/src/classes/share/javax/media/j3d/PickConeRay.java b/src/classes/share/javax/media/j3d/PickConeRay.java
index 0846a65..e49239e 100644
--- a/src/classes/share/javax/media/j3d/PickConeRay.java
+++ b/src/classes/share/javax/media/j3d/PickConeRay.java
@@ -100,7 +100,7 @@ public final class PickConeRay extends PickCone {
if (bounds instanceof BoundingSphere) {
Point3d sphCenter = ((BoundingSphere)bounds).getCenter();
double sphRadius = ((BoundingSphere)bounds).getRadius();
- double sqDist =
+ double sqDist =
Distance.pointToRay (sphCenter, origin, direction, rayPt, null);
vector.sub (rayPt, origin);
distance = vector.length();
@@ -109,7 +109,7 @@ public final class PickConeRay extends PickCone {
return true;
}
return false; // we are too far to intersect
- }
+ }
//
// ================ BOUNDING BOX ================
//
@@ -119,9 +119,9 @@ public final class PickConeRay extends PickCone {
((BoundingBox)bounds).getLower (lower);
Point3d center = ((BoundingBox)bounds).getCenter ();
-
+
// First, see if cone is too far away from BoundingBox
- double sqDist =
+ double sqDist =
Distance.pointToRay (center, origin, direction, rayPt, null);
vector.sub (rayPt, origin);
@@ -133,7 +133,7 @@ public final class PickConeRay extends PickCone {
temp = (center.y - lower.y + radius);
boxRadiusSquared += temp*temp;
temp = (center.z - lower.z + radius);
- boxRadiusSquared += temp*temp;
+ boxRadiusSquared += temp*temp;
if (sqDist > boxRadiusSquared) {
@@ -151,7 +151,7 @@ public final class PickConeRay extends PickCone {
// Ray does not intersect, test for distance with each edge
Point3d upper = new Point3d();
((BoundingBox)bounds).getUpper (upper);
-
+
Point3d[][] edges = {
// Top horizontal 4
{upper, new Point3d (lower.x, upper.y, upper.z)},
@@ -172,8 +172,8 @@ public final class PickConeRay extends PickCone {
for (int i=0;i
*
* If antialiasing is disabled (the default), fractional point sizes
@@ -45,11 +45,11 @@ package javax.media.j3d;
* of pixels is drawn.duplicateNode
method. This routine does
* the actual duplication of all "local data" (any data defined in
- * this object).
+ * this object).
*
* @param originalNodeComponent the original node to duplicate.
* @param forceDuplicate when set to true
, causes the
@@ -223,11 +223,11 @@ public class PointAttributes extends NodeComponent {
* @see Node#cloneTree
* @see NodeComponent#setDuplicateOnCloneTree
*/
- void duplicateAttributes(NodeComponent originalNodeComponent,
- boolean forceDuplicate) {
+ void duplicateAttributes(NodeComponent originalNodeComponent,
+ boolean forceDuplicate) {
super.duplicateAttributes(originalNodeComponent, forceDuplicate);
- PointAttributesRetained attr = (PointAttributesRetained)
+ PointAttributesRetained attr = (PointAttributesRetained)
originalNodeComponent.retained;
PointAttributesRetained rt = (PointAttributesRetained) retained;
diff --git a/src/classes/share/javax/media/j3d/PointAttributesRetained.java b/src/classes/share/javax/media/j3d/PointAttributesRetained.java
index 5837cbf..7dcc1ad 100644
--- a/src/classes/share/javax/media/j3d/PointAttributesRetained.java
+++ b/src/classes/share/javax/media/j3d/PointAttributesRetained.java
@@ -59,7 +59,7 @@ class PointAttributesRetained extends NodeComponentRetained {
}
/**
- * Sets the point size for this appearance component object and sends a
+ * Sets the point size for this appearance component object and sends a
* message notifying the interested structures of the change.
* @param pointSize the size, in pixels, of point primitives
*/
@@ -87,13 +87,13 @@ class PointAttributesRetained extends NodeComponentRetained {
/**
* Enables or disables point antialiasing
- * for this appearance component object and sends a
+ * for this appearance component object and sends a
* message notifying the interested structures of the change.
* @param state true or false to enable or disable point antialiasing
*/
final void setPointAntialiasingEnable(boolean state) {
initPointAntialiasingEnable(state);
- sendMessage(POINT_AA_CHANGED,
+ sendMessage(POINT_AA_CHANGED,
(state ? Boolean.TRUE: Boolean.FALSE));
}
@@ -107,7 +107,7 @@ class PointAttributesRetained extends NodeComponentRetained {
}
/**
- * Creates and initializes a mirror object, point the mirror object
+ * Creates and initializes a mirror object, point the mirror object
* to the retained object if the object is not editable
*/
synchronized void createMirrorObject() {
@@ -146,7 +146,7 @@ class PointAttributesRetained extends NodeComponentRetained {
/**
- * Update the "component" field of the mirror object with the
+ * Update the "component" field of the mirror object with the
* given "value"
*/
synchronized void updateMirrorObject(int component, Object value) {
@@ -163,7 +163,7 @@ class PointAttributesRetained extends NodeComponentRetained {
boolean equivalent(PointAttributesRetained pr) {
return ((pr != null) &&
- (pr.pointSize == pointSize) &&
+ (pr.pointSize == pointSize) &&
(pr.pointAntialiasing == pointAntialiasing));
}
@@ -174,10 +174,10 @@ class PointAttributesRetained extends NodeComponentRetained {
pointAntialiasing = pr.pointAntialiasing;
}
-
+
final void sendMessage(int attrMask, Object attr) {
ArrayList univList = new ArrayList();
- ArrayList gaList = Shape3DRetained.getGeomAtomsList(mirror.users, univList);
+ ArrayList gaList = Shape3DRetained.getGeomAtomsList(mirror.users, univList);
// Send to rendering attribute structure, regardless of
// whether there are users or not (alternate appearance case ..)
@@ -197,7 +197,7 @@ class PointAttributesRetained extends NodeComponentRetained {
createMessage = new J3dMessage();
createMessage.threads = J3dThread.UPDATE_RENDER;
createMessage.type = J3dMessage.POINTATTRIBUTES_CHANGED;
-
+
createMessage.universe = (VirtualUniverse) univList.get(i);
createMessage.args[0] = this;
createMessage.args[1]= new Integer(attrMask);
@@ -207,7 +207,7 @@ class PointAttributesRetained extends NodeComponentRetained {
GeometryAtom[] gaArr = new GeometryAtom[gL.size()];
gL.toArray(gaArr);
createMessage.args[3] = gaArr;
-
+
VirtualUniverse.mc.processMessage(createMessage);
}
@@ -218,5 +218,5 @@ class PointAttributesRetained extends NodeComponentRetained {
setFrequencyChangeMask(bit, 0x1);
}
}
-
+
}
diff --git a/src/classes/share/javax/media/j3d/PointLight.java b/src/classes/share/javax/media/j3d/PointLight.java
index 52e7b71..212ca6a 100644
--- a/src/classes/share/javax/media/j3d/PointLight.java
+++ b/src/classes/share/javax/media/j3d/PointLight.java
@@ -126,7 +126,7 @@ public class PointLight extends Light {
*/
public PointLight(Color3f color,
Point3f position,
- Point3f attenuation) {
+ Point3f attenuation) {
super(color);
// set default read capabilities
@@ -146,7 +146,7 @@ public class PointLight extends Light {
public PointLight(boolean lightOn,
Color3f color,
Point3f position,
- Point3f attenuation) {
+ Point3f attenuation) {
super(lightOn, color);
// set default read capabilities
@@ -164,7 +164,7 @@ public class PointLight extends Light {
this.retained = new PointLightRetained();
this.retained.setSource(this);
}
-
+
/**
* Set light position.
@@ -235,9 +235,9 @@ public class PointLight extends Light {
/**
* Sets this Light's current attenuation values and places it in the parameter specified.
- * @param constant the light's constant attenuation
- * @param linear the light's linear attenuation
- * @param quadratic the light's quadratic attenuation
+ * @param constant the light's constant attenuation
+ * @param linear the light's linear attenuation
+ * @param quadratic the light's quadratic attenuation
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
@@ -267,7 +267,7 @@ public class PointLight extends Light {
}
-
+
/**
* Used to create a new instance of the node. This routine is called
@@ -295,7 +295,7 @@ public class PointLight extends Light {
* originalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
@@ -320,7 +320,7 @@ public class PointLight extends Light {
Point3f p = new Point3f();
attr.getPosition(p);
rt.initPosition(p);
-
+
attr.getAttenuation(p);
rt.initAttenuation(p);
}
diff --git a/src/classes/share/javax/media/j3d/PointLightRetained.java b/src/classes/share/javax/media/j3d/PointLightRetained.java
index ef29eb9..d9acad7 100644
--- a/src/classes/share/javax/media/j3d/PointLightRetained.java
+++ b/src/classes/share/javax/media/j3d/PointLightRetained.java
@@ -42,10 +42,10 @@ class PointLightRetained extends LightRetained {
static final int LAST_POINTLIGHT_DEFINED_BIT = ATTENUATION_CHANGED;
/**
- * The attenuation vector consisting of
+ * The attenuation vector consisting of
* constant, linear, and quadratic coefficients.
*/
- Point3f attenuation = new Point3f(1.0f, 0.0f, 0.0f);
+ Point3f attenuation = new Point3f(1.0f, 0.0f, 0.0f);
// The position at which this light source exists.
Point3f position = new Point3f();
@@ -187,7 +187,7 @@ class PointLightRetained extends LightRetained {
attenuation.set(this.attenuation);
}
- /**
+ /**
* This update function, and its native counterpart,
* updates a point light. This includes its color, attenuation,
* and its transformed position.
@@ -226,7 +226,7 @@ class PointLightRetained extends LightRetained {
objs[8] = new Point3f(attenuation);
return createMessage;
}
-
+
// Note : if you add any more fields here , you need to update
// updateLight() in RenderingEnvironmentStructure
@@ -245,9 +245,9 @@ class PointLightRetained extends LightRetained {
PointLightRetained ml = (PointLightRetained)mLgts[i];
mlLastLocalToVworld = ml.getLastLocalToVworld();
ml.position = (Point3f) objs[4];
- mlLastLocalToVworld.transform(ml.position,
+ mlLastLocalToVworld.transform(ml.position,
ml.xformPosition);
- ml.localToVworldScale =
+ ml.localToVworldScale =
mlLastLocalToVworld.getDistanceScale();
}
}
@@ -267,9 +267,9 @@ class PointLightRetained extends LightRetained {
ml.position = (Point3f)((Object[]) objs[4])[7];
ml.attenuation.set((Point3f)((Object[]) objs[4])[8]);
mlLastLocalToVworld = ml.getLastLocalToVworld();
- mlLastLocalToVworld.transform(ml.position,
+ mlLastLocalToVworld.transform(ml.position,
ml.xformPosition);
- ml.localToVworldScale =
+ ml.localToVworldScale =
mlLastLocalToVworld.getDistanceScale();
}
}
@@ -281,14 +281,14 @@ class PointLightRetained extends LightRetained {
void validateAttenuationInEc(double vworldToCoexistenceScale) {
double localToEcScale = localToVworldScale * vworldToCoexistenceScale;
-
+
linearAttenuationInEc = (float)(attenuation.y / localToEcScale);
quadraticAttenuationInEc =
(float)(attenuation.z / (localToEcScale * localToEcScale));
}
-
+
// Clones only the retained side, internal use only
protected Object clone() {
PointLightRetained pr =
@@ -298,7 +298,7 @@ class PointLightRetained extends LightRetained {
pr.position = new Point3f(position);
pr.xformPosition = new Point3f();
return pr;
- }
+ }
// Called on the mirror object
diff --git a/src/classes/share/javax/media/j3d/PointSound.java b/src/classes/share/javax/media/j3d/PointSound.java
index af1ab29..d0be959 100644
--- a/src/classes/share/javax/media/j3d/PointSound.java
+++ b/src/classes/share/javax/media/j3d/PointSound.java
@@ -36,8 +36,8 @@ import javax.vecmath.Point3f;
/**
- * The PointSound node (a sub-class of the Sound node) defines a spatially
- * located sound source whose waves radiate uniformly in all directions from
+ * The PointSound node (a sub-class of the Sound node) defines a spatially
+ * located sound source whose waves radiate uniformly in all directions from
* a given location in space. It has the same attributes as a Sound object
* with the addition of a location and the specification of distance-based
* gain attenuation for listener positions between an array of distances.
@@ -45,7 +45,7 @@ import javax.vecmath.Point3f;
* A sound's amplitude is attenuated based on the distance between the listener
* and the sound source position. A piecewise linear curve (defined in terms of
* pairs of distance and gain scale factor) specifies the gain scale factor slope.
- *
+ *
* The PointSound's location and attenuation distances are defined in the local
* coordinate system of the node.
*false
, the value of each node's
* duplicateOnCloneTree
variable determines whether
* NodeComponent data is duplicated or copied.
- * @exception ClassCastException if originalNode is not an instance of
+ * @exception ClassCastException if originalNode is not an instance of
* PointSound
*
* @see Node#cloneTree
@@ -536,7 +536,7 @@ public class PointSound extends Sound {
* @see NodeComponent#setDuplicateOnCloneTree
*/
public void duplicateNode(Node originalNode, boolean forceDuplicate) {
- checkDuplicateNode(originalNode, forceDuplicate);
+ checkDuplicateNode(originalNode, forceDuplicate);
}
@@ -545,7 +545,7 @@ public class PointSound extends Sound {
* originalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
@@ -577,5 +577,5 @@ public class PointSound extends Sound {
orgRetained.getDistanceGain(distance, gain);
thisRetained.setDistanceGain(distance, gain);
}
-
+
}
diff --git a/src/classes/share/javax/media/j3d/PointSoundRetained.java b/src/classes/share/javax/media/j3d/PointSoundRetained.java
index 6bf7124..3d7a657 100644
--- a/src/classes/share/javax/media/j3d/PointSoundRetained.java
+++ b/src/classes/share/javax/media/j3d/PointSoundRetained.java
@@ -32,14 +32,14 @@
package javax.media.j3d;
import java.lang.Math;
-import java.net.URL;
+import java.net.URL;
import javax.vecmath.Point3f;
import javax.vecmath.Point3d;
import javax.vecmath.Point2f;
/**
* The PointSoundRetained node (a sub-class of the SoundRetained node) defines
- * a spatially-located sound source whose waves radiate uniformly in all
+ * a spatially-located sound source whose waves radiate uniformly in all
* directions from a given location in space.
*/
@@ -59,7 +59,7 @@ class PointSoundRetained extends SoundRetained {
// gain attenuation between each pair.
float[] attenuationDistance;
float[] attenuationGain;
-
+
PointSoundRetained() {
this.nodeType = NodeRetained.POINTSOUND;
}
@@ -72,7 +72,7 @@ class PointSoundRetained extends SoundRetained {
if (staticTransform != null) {
staticTransform.transform.transform(position, this.position);
} else {
- this.position.set(position);
+ this.position.set(position);
}
getLastLocalToVworld().transform(position, xformPosition);
@@ -126,15 +126,15 @@ class PointSoundRetained extends SoundRetained {
* Sets this sound's distance gain attenuation - where gain scale factor
* is applied to sound based on distance listener is from sound source.
* @param distance attenuation pairs of (distance,gain-scale-factor)
- */
- void setDistanceGain(Point2f[] attenuation) {
+ */
+ void setDistanceGain(Point2f[] attenuation) {
// if attenuation array null set both attenuation components to null
if (attenuation == null) {
this.attenuationDistance = null;
this.attenuationGain = null;
// QUESTION: is this needed so that dispatch***() doesn't
// fail with null?
- return;
+ return;
}
int attenuationLength = attenuation.length;
@@ -155,17 +155,17 @@ class PointSoundRetained extends SoundRetained {
* applied to sound based on distance listener is from sound source.
* @param distance array of monotonically-increasing floats.
* @param gain array of amplitude scale factors associated with distances.
- */
- void setDistanceGain(float[] distance, float[] gain) {
- // if distance or gain arrays are null then treat both as null
+ */
+ void setDistanceGain(float[] distance, float[] gain) {
+ // if distance or gain arrays are null then treat both as null
if (distance == null) {
- this.attenuationDistance = null;
- this.attenuationGain = null;
+ this.attenuationDistance = null;
+ this.attenuationGain = null;
// QUESTION: is this needed so that dispatch***() doesn't
// fail with null?
return;
}
-
+
int gainLength = gain.length;
int distanceLength = distance.length;
this.attenuationDistance = new float[distanceLength];
@@ -195,23 +195,23 @@ class PointSoundRetained extends SoundRetained {
}
}
- /**
- * Gets this sound's distance attenuation array length
+ /**
+ * Gets this sound's distance attenuation array length
* @return distance gain attenuation array length
- */
- int getDistanceGainLength() {
- if (attenuationDistance == null)
+ */
+ int getDistanceGainLength() {
+ if (attenuationDistance == null)
return 0;
else
return this.attenuationDistance.length;
- }
-
+ }
+
/**
* Retieves sound's distance attenuation
* Put the contents of the two separate distance and gain arrays into
* an array of Point2f.
* @param attenuation containing distance attenuation pairs
- */
+ */
void getDistanceGain(Point2f[] attenuation) {
// write into arrays passed in, don't do a new
if (attenuation == null)
@@ -231,12 +231,12 @@ class PointSoundRetained extends SoundRetained {
}
/**
- * Retieves this sound's attenuation distance and gain arrays, returned in
+ * Retieves this sound's attenuation distance and gain arrays, returned in
* separate arrays.
* @param distance array of monotonically-increasing floats.
* @param gain array of amplitude scale factors associated with distances.
- */
- void getDistanceGain(float[] distance, float[] gain) {
+ */
+ void getDistanceGain(float[] distance, float[] gain) {
// write into arrays passed in, don't do a new
if (distance == null || gain == null)
return;
@@ -246,20 +246,20 @@ class PointSoundRetained extends SoundRetained {
int attenuationLength = this.attenuationDistance.length;
int distanceLength = distance.length;
if (distanceLength > attenuationLength)
- distanceLength = attenuationLength;
+ distanceLength = attenuationLength;
System.arraycopy(this.attenuationDistance, 0, distance, 0, distanceLength);
attenuationLength = this.attenuationDistance.length;
int gainLength = gain.length;
if (gainLength > attenuationLength)
- gainLength = attenuationLength;
+ gainLength = attenuationLength;
System.arraycopy(this.attenuationGain, 0, gain, 0, gainLength);
}
- /**
+ /**
* This updates the positional fields of point sound.
*
* Distance gain attenuation field not maintained in mirror object.
- */
+ */
void updateMirrorObject(Object[] objs) {
if (debugFlag)
debugPrint("PointSoundRetained:updateMirrorObj()");
@@ -297,7 +297,7 @@ class PointSoundRetained extends SoundRetained {
void updateTransformChange() {
super.updateTransformChange();
getLastLocalToVworld().transform(position, xformPosition);
- // set flag looked at by Scheduler to denote Transform change
+ // set flag looked at by Scheduler to denote Transform change
// this flag will force resneding transformed position to AudioDevice
if (debugFlag)
debugPrint("PointSoundRetained xformPosition is (" + xformPosition.x +
diff --git a/src/classes/share/javax/media/j3d/PolygonAttributes.java b/src/classes/share/javax/media/j3d/PolygonAttributes.java
index 44baf9d..d5a5e71 100644
--- a/src/classes/share/javax/media/j3d/PolygonAttributes.java
+++ b/src/classes/share/javax/media/j3d/PolygonAttributes.java
@@ -58,14 +58,14 @@ package javax.media.j3d;
*
- *
- *
+ *
* @see Appearance
*/
public class PolygonAttributes extends NodeComponent {
@@ -172,7 +172,7 @@ public class PolygonAttributes extends NodeComponent {
ALLOW_NORMAL_FLIP_READ,
ALLOW_OFFSET_READ
};
-
+
/**
* Constructs a PolygonAttributes object with default parameters.
* The default values are as follows:
@@ -240,14 +240,14 @@ public class PolygonAttributes extends NodeComponent {
float polygonOffsetFactor) {
if (polygonMode < POLYGON_POINT || polygonMode > POLYGON_FILL)
- throw new IllegalArgumentException(J3dI18N.getString("PolygonAttributes0"));
+ throw new IllegalArgumentException(J3dI18N.getString("PolygonAttributes0"));
if (cullFace < CULL_NONE || cullFace > CULL_FRONT)
- throw new IllegalArgumentException(J3dI18N.getString("PolygonAttributes12"));
+ throw new IllegalArgumentException(J3dI18N.getString("PolygonAttributes12"));
// set default read capabilities
setDefaultReadCapabilities(readCapabilities);
-
+
((PolygonAttributesRetained)this.retained).initPolygonMode(polygonMode);
((PolygonAttributesRetained)this.retained).initCullFace(cullFace);
((PolygonAttributesRetained)this.retained).initPolygonOffset(polygonOffset);
@@ -269,8 +269,8 @@ public class PolygonAttributes extends NodeComponent {
throw new CapabilityNotSetException(J3dI18N.getString("PolygonAttributes2"));
if (cullFace < CULL_NONE || cullFace > CULL_FRONT)
- throw new IllegalArgumentException(J3dI18N.getString("PolygonAttributes3"));
- if (isLive())
+ throw new IllegalArgumentException(J3dI18N.getString("PolygonAttributes3"));
+ if (isLive())
((PolygonAttributesRetained)this.retained).setCullFace(cullFace);
else
((PolygonAttributesRetained)this.retained).initCullFace(cullFace);
@@ -309,7 +309,7 @@ public class PolygonAttributes extends NodeComponent {
throw new CapabilityNotSetException(J3dI18N.getString("PolygonAttributes5"));
if (isLive())
((PolygonAttributesRetained)this.retained).setBackFaceNormalFlip(backFaceNormalFlip);
- else
+ else
((PolygonAttributesRetained)this.retained).initBackFaceNormalFlip(backFaceNormalFlip);
}
@@ -342,10 +342,10 @@ public class PolygonAttributes extends NodeComponent {
throw new CapabilityNotSetException(J3dI18N.getString("PolygonAttributes7"));
if (polygonMode < POLYGON_POINT || polygonMode > POLYGON_FILL)
- throw new IllegalArgumentException(J3dI18N.getString("PolygonAttributes8"));
+ throw new IllegalArgumentException(J3dI18N.getString("PolygonAttributes8"));
if (isLive())
((PolygonAttributesRetained)this.retained).setPolygonMode(polygonMode);
- else
+ else
((PolygonAttributesRetained)this.retained).initPolygonMode(polygonMode);
}
@@ -450,7 +450,7 @@ public class PolygonAttributes extends NodeComponent {
}
/**
- * @deprecated replaced with cloneNodeComponent(boolean forceDuplicate)
+ * @deprecated replaced with cloneNodeComponent(boolean forceDuplicate)
*/
public NodeComponent cloneNodeComponent() {
PolygonAttributes pga = new PolygonAttributes();
@@ -464,7 +464,7 @@ public class PolygonAttributes extends NodeComponent {
* the current node. This method is called from the
* duplicateNode
method. This routine does
* the actual duplication of all "local data" (any data defined in
- * this object).
+ * this object).
*
* @param originalNodeComponent the original node to duplicate.
* @param forceDuplicate when set to true
, causes the
@@ -477,11 +477,11 @@ public class PolygonAttributes extends NodeComponent {
* @see NodeComponent#setDuplicateOnCloneTree
*/
- void duplicateAttributes(NodeComponent originalNodeComponent,
- boolean forceDuplicate) {
+ void duplicateAttributes(NodeComponent originalNodeComponent,
+ boolean forceDuplicate) {
super.duplicateAttributes(originalNodeComponent, forceDuplicate);
-
+
PolygonAttributesRetained attr = (PolygonAttributesRetained)
originalNodeComponent.retained;
diff --git a/src/classes/share/javax/media/j3d/PolygonAttributesRetained.java b/src/classes/share/javax/media/j3d/PolygonAttributesRetained.java
index 8b041ac..8848a5f 100644
--- a/src/classes/share/javax/media/j3d/PolygonAttributesRetained.java
+++ b/src/classes/share/javax/media/j3d/PolygonAttributesRetained.java
@@ -162,9 +162,9 @@ class PolygonAttributesRetained extends NodeComponentRetained {
}
/**
- * Sets the polygon offset to the specified value and sends a
+ * Sets the polygon offset to the specified value and sends a
* message notifying the interested structures of the change.
- * This screen space offset is added to the final, device
+ * This screen space offset is added to the final, device
* coordinate Z value of polygon primitives.
* @param polygonOffset the polygon offset
*/
@@ -173,9 +173,9 @@ class PolygonAttributesRetained extends NodeComponentRetained {
}
/**
- * Sets the polygon offset to the specified value and sends a
+ * Sets the polygon offset to the specified value and sends a
* message notifying the interested structures of the change.
- * This screen space offset is added to the final, device
+ * This screen space offset is added to the final, device
* coordinate Z value of polygon primitives.
* @param polygonOffset the polygon offset
*/
@@ -195,7 +195,7 @@ class PolygonAttributesRetained extends NodeComponentRetained {
/**
- * Sets the polygon offset factor to the specified value and sends a
+ * Sets the polygon offset factor to the specified value and sends a
* message notifying the interested structures of the change.
* This factor is multiplied by the slope of the polygon, and
* then added to the final, device coordinate Z value of polygon
@@ -207,7 +207,7 @@ class PolygonAttributesRetained extends NodeComponentRetained {
}
/**
- * Sets the polygon offset factor to the specified value and sends a
+ * Sets the polygon offset factor to the specified value and sends a
* message notifying the interested structures of the change.
* This factor is multiplied by the slope of the polygon, and
* then added to the final, device coordinate Z value of polygon
@@ -216,7 +216,7 @@ class PolygonAttributesRetained extends NodeComponentRetained {
*/
final void setPolygonOffsetFactor(float polygonOffsetFactor) {
initPolygonOffsetFactor(polygonOffsetFactor);
- sendMessage(POLYGON_OFFSETFACTOR_CHANGED,
+ sendMessage(POLYGON_OFFSETFACTOR_CHANGED,
new Float(polygonOffsetFactor));
}
@@ -230,7 +230,7 @@ class PolygonAttributesRetained extends NodeComponentRetained {
}
/**
- * Creates and initializes a mirror object, point the mirror object
+ * Creates and initializes a mirror object, point the mirror object
* to the retained object if the object is not editable
*/
synchronized void createMirrorObject() {
@@ -244,9 +244,9 @@ class PolygonAttributesRetained extends NodeComponentRetained {
mirrorPa.set(this);
mirrorPa.source = source;
mirror = mirrorPa;
- }
+ }
} else {
- ((PolygonAttributesRetained) mirror).set(this);
+ ((PolygonAttributesRetained) mirror).set(this);
}
}
@@ -269,7 +269,7 @@ class PolygonAttributesRetained extends NodeComponentRetained {
}
/**
- * Update the "component" field of the mirror object with the
+ * Update the "component" field of the mirror object with the
* given "value"
*/
synchronized void updateMirrorObject(int component, Object value) {
@@ -287,12 +287,12 @@ class PolygonAttributesRetained extends NodeComponentRetained {
}
else if ((component & POLYGON_OFFSET_CHANGED) != 0) {
mirrorPa.polygonOffset = ((Float)value).floatValue();
- }
+ }
else if ((component & POLYGON_OFFSETFACTOR_CHANGED) != 0) {
mirrorPa.polygonOffsetFactor = ((Float) value).floatValue();
}
}
-
+
boolean equivalent(PolygonAttributesRetained pr) {
return ((pr != null) &&
@@ -311,10 +311,10 @@ class PolygonAttributesRetained extends NodeComponentRetained {
polygonOffset = pr.polygonOffset;
polygonOffsetFactor = pr.polygonOffsetFactor;
}
-
+
final void sendMessage(int attrMask, Object attr) {
ArrayList univList = new ArrayList();
- ArrayList gaList = Shape3DRetained.getGeomAtomsList(mirror.users, univList);
+ ArrayList gaList = Shape3DRetained.getGeomAtomsList(mirror.users, univList);
// Send to rendering attribute structure, regardless of
// whether there are users or not (alternate appearance case ..)
@@ -333,7 +333,7 @@ class PolygonAttributesRetained extends NodeComponentRetained {
createMessage = new J3dMessage();
createMessage.threads = J3dThread.UPDATE_RENDER;
createMessage.type = J3dMessage.POLYGONATTRIBUTES_CHANGED;
-
+
createMessage.universe = (VirtualUniverse) univList.get(i);
createMessage.args[0] = this;
createMessage.args[1]= new Integer(attrMask);
@@ -343,7 +343,7 @@ class PolygonAttributesRetained extends NodeComponentRetained {
GeometryAtom[] gaArr = new GeometryAtom[gL.size()];
gL.toArray(gaArr);
createMessage.args[3] = gaArr;
-
+
VirtualUniverse.mc.processMessage(createMessage);
}
@@ -356,6 +356,6 @@ class PolygonAttributesRetained extends NodeComponentRetained {
bit == PolygonAttributes.ALLOW_OFFSET_WRITE) {
setFrequencyChangeMask(bit, 0x1);
}
- }
+ }
}
diff --git a/src/classes/share/javax/media/j3d/PositionInterpolator.java b/src/classes/share/javax/media/j3d/PositionInterpolator.java
index 9875a61..2c528aa 100644
--- a/src/classes/share/javax/media/j3d/PositionInterpolator.java
+++ b/src/classes/share/javax/media/j3d/PositionInterpolator.java
@@ -36,9 +36,9 @@ import javax.vecmath.Vector3d;
/**
* Position interpolator behavior. This class defines a behavior
- * that modifies the translational component of its target
- * TransformGroup by linearly interpolating between a pair of
- * specified positions (using the value generated by the
+ * that modifies the translational component of its target
+ * TransformGroup by linearly interpolating between a pair of
+ * specified positions (using the value generated by the
* specified Alpha object). The interpolated position is used
* to generate a translation transform along the local X-axis
* of this interpolator.
@@ -52,14 +52,14 @@ public class PositionInterpolator extends TransformInterpolator {
float startPosition;
float endPosition;
- // We can't use a boolean flag since it is possible
+ // We can't use a boolean flag since it is possible
// that after alpha change, this procedure only run
// once at alpha.finish(). So the best way is to
// detect alpha value change.
private float prevAlphaValue = Float.NaN;
- private WakeupCriterion passiveWakeupCriterion =
+ private WakeupCriterion passiveWakeupCriterion =
(WakeupCriterion) new WakeupOnElapsedFrames(0, true);
-
+
// non-public, default constructor used by cloneNode
PositionInterpolator() {
}
@@ -69,7 +69,7 @@ public class PositionInterpolator extends TransformInterpolator {
* an axisOfTranslation set to Identity, a startPosition of 0.0f, and
* an endPosition of 1.0f.
* @param alpha The alpha object for this Interpolator
- * @param target The target for this position Interpolator
+ * @param target The target for this position Interpolator
*/
public PositionInterpolator(Alpha alpha, TransformGroup target) {
super(alpha, target);
@@ -140,7 +140,7 @@ public class PositionInterpolator extends TransformInterpolator {
public void setAxisOfTranslation(Transform3D axisOfTranslation) {
setTransformAxis(axisOfTranslation);
}
-
+
/**
* @deprecated As of Java 3D version 1.3, replaced by
* TransformInterpolator.getTransformAxis()
@@ -162,11 +162,11 @@ public class PositionInterpolator extends TransformInterpolator {
public void computeTransform(float alphaValue, Transform3D transform) {
double val = (1.0-alphaValue)*startPosition + alphaValue*endPosition;
-
+
// construct a Transform3D from: axis * translation * axisInverse
transv.set(val, 0.0, 0.0);
translation.setTranslation(transv);
-
+
transform.mul(axis, translation);
transform.mul(transform, axisInverse);
}
@@ -196,7 +196,7 @@ public class PositionInterpolator extends TransformInterpolator {
* originalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
@@ -216,7 +216,7 @@ public class PositionInterpolator extends TransformInterpolator {
super.duplicateAttributes(originalNode, forceDuplicate);
PositionInterpolator pi = (PositionInterpolator) originalNode;
-
+
setStartPosition(pi.getStartPosition());
setEndPosition(pi.getEndPosition());
}
diff --git a/src/classes/share/javax/media/j3d/PositionPathInterpolator.java b/src/classes/share/javax/media/j3d/PositionPathInterpolator.java
index 747d3db..336791d 100644
--- a/src/classes/share/javax/media/j3d/PositionPathInterpolator.java
+++ b/src/classes/share/javax/media/j3d/PositionPathInterpolator.java
@@ -39,11 +39,11 @@ import javax.vecmath.Vector3f;
* PositionPathInterpolator behavior. This class defines a behavior
* that modifies the translational component of its target TransformGroup
* by linearly interpolating among a series of predefined knot/position
- * pairs (using the value generated by the specified Alpha object). The
+ * pairs (using the value generated by the specified Alpha object). The
* interpolated position is used to generate a translation transform
* in the local coordinate system of this interpolator. The first knot
* must have a value of 0.0. The last knot must have a value of 1.0. An
- * intermediate knot with index k must have a value strictly greater
+ * intermediate knot with index k must have a value strictly greater
* than any knot with index less than k.
*/
@@ -55,14 +55,14 @@ public class PositionPathInterpolator extends PathInterpolator {
private Point3f positions[];
private float prevInterpolationValue = Float.NaN;
- // We can't use a boolean flag since it is possible
+ // We can't use a boolean flag since it is possible
// that after alpha change, this procedure only run
// once at alpha.finish(). So the best way is to
// detect alpha value change.
private float prevAlphaValue = Float.NaN;
- private WakeupCriterion passiveWakeupCriterion =
+ private WakeupCriterion passiveWakeupCriterion =
(WakeupCriterion) new WakeupOnElapsedFrames(0, true);
-
+
// non-public, default constructor used by cloneNode
PositionPathInterpolator() {
}
@@ -70,10 +70,10 @@ public class PositionPathInterpolator extends PathInterpolator {
/**
* Constructs a new PositionPathInterpolator that varies the transform
- * of the target TransformGroup.
+ * of the target TransformGroup.
* @param alpha the alpha object for this interpolator
* @param target the TransformGroup node affected by this translator
- * @param axisOfTransform the transform that defines the local
+ * @param axisOfTransform the transform that defines the local
* coordinate system in which this interpolator operates
* @param knots an array of knot values that specify interpolation points.
* @param positions an array of position values at the knots.
@@ -95,7 +95,7 @@ public class PositionPathInterpolator extends PathInterpolator {
/**
- * Sets the position at the specified index for this
+ * Sets the position at the specified index for this
* interpolator.
* @param index the index of the position to be changed
* @param position the new position at the index
@@ -178,7 +178,7 @@ public class PositionPathInterpolator extends PathInterpolator {
* TransformInterpolator.getTransformAxis()
*/
public Transform3D getAxisOfTranslation() {
- return getTransformAxis();
+ return getTransformAxis();
}
/**
@@ -194,7 +194,7 @@ public class PositionPathInterpolator extends PathInterpolator {
public void computeTransform(float alphaValue, Transform3D transform) {
computePathInterpolation(alphaValue);
-
+
if (currentKnotIndex == 0 &&
currentInterpolationValue == 0f) {
pos.x = positions[0].x;
@@ -213,7 +213,7 @@ public class PositionPathInterpolator extends PathInterpolator {
}
position.setIdentity();
position.setTranslation(pos);
-
+
// construct a Transform3D from: axis * position * axisInverse
transform.mul(axis, position);
transform.mul(transform, axisInverse);
@@ -245,7 +245,7 @@ public class PositionPathInterpolator extends PathInterpolator {
* originalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
@@ -264,9 +264,9 @@ public class PositionPathInterpolator extends PathInterpolator {
void duplicateAttributes(Node originalNode, boolean forceDuplicate) {
super.duplicateAttributes(originalNode, forceDuplicate);
- PositionPathInterpolator pi =
+ PositionPathInterpolator pi =
(PositionPathInterpolator) originalNode;
-
+
int len = pi.getArrayLengths();
// No API available to set the size of positions
diff --git a/src/classes/share/javax/media/j3d/QuadArrayRetained.java b/src/classes/share/javax/media/j3d/QuadArrayRetained.java
index 8978766..d8b58e9 100644
--- a/src/classes/share/javax/media/j3d/QuadArrayRetained.java
+++ b/src/classes/share/javax/media/j3d/QuadArrayRetained.java
@@ -45,23 +45,23 @@ class QuadArrayRetained extends GeometryArrayRetained {
QuadArrayRetained() {
this.geoType = GEO_TYPE_QUAD_SET;
}
-
+
boolean intersect(PickShape pickShape, PickInfo pickInfo, int flags, Point3d iPnt,
GeometryRetained geom, int geomIndex) {
-
+
Point3d pnts[] = new Point3d[4];
double sdist[] = new double[1];
double minDist = Double.MAX_VALUE;
double x = 0, y = 0, z = 0;
int[] vtxIndexArr = new int[4];
-
+
int i = ((vertexFormat & GeometryArray.BY_REFERENCE) == 0 ?
initialVertexIndex : initialCoordIndex);
pnts[0] = new Point3d();
pnts[1] = new Point3d();
pnts[2] = new Point3d();
pnts[3] = new Point3d();
-
+
switch (pickShape.getPickType()) {
case PickShape.PICKRAY:
PickRay pickRay= (PickRay) pickShape;
@@ -81,13 +81,13 @@ class QuadArrayRetained extends GeometryArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
@@ -111,19 +111,19 @@ class QuadArrayRetained extends GeometryArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
break;
case PickShape.PICKBOUNDINGBOX:
- BoundingBox bbox = (BoundingBox)
+ BoundingBox bbox = (BoundingBox)
((PickBounds) pickShape).bounds;
while (i < validVertexCount) {
for(int j=0; j<4; j++) {
@@ -140,19 +140,19 @@ class QuadArrayRetained extends GeometryArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
break;
case PickShape.PICKBOUNDINGSPHERE:
- BoundingSphere bsphere = (BoundingSphere)
+ BoundingSphere bsphere = (BoundingSphere)
((PickBounds) pickShape).bounds;
while (i < validVertexCount) {
@@ -170,20 +170,20 @@ class QuadArrayRetained extends GeometryArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
break;
case PickShape.PICKBOUNDINGPOLYTOPE:
- BoundingPolytope bpolytope = (BoundingPolytope)
+ BoundingPolytope bpolytope = (BoundingPolytope)
((PickBounds) pickShape).bounds;
while (i < validVertexCount) {
@@ -201,13 +201,13 @@ class QuadArrayRetained extends GeometryArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
@@ -230,13 +230,13 @@ class QuadArrayRetained extends GeometryArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
@@ -259,13 +259,13 @@ class QuadArrayRetained extends GeometryArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
@@ -274,8 +274,8 @@ class QuadArrayRetained extends GeometryArrayRetained {
// Should not happen since API already check for this
throw new IllegalArgumentException(J3dI18N.getString("QuadArrayRetained0"));
default:
- throw new RuntimeException("PickShape not supported for intersection ");
- }
+ throw new RuntimeException("PickShape not supported for intersection ");
+ }
if (minDist < Double.MAX_VALUE) {
iPnt.x = x;
@@ -284,7 +284,7 @@ class QuadArrayRetained extends GeometryArrayRetained {
return true;
}
return false;
-
+
}
// intersect pnts[] with every quad in this object
@@ -298,14 +298,14 @@ class QuadArrayRetained extends GeometryArrayRetained {
points[1] = new Point3d();
points[2] = new Point3d();
points[3] = new Point3d();
-
+
switch (pnts.length) {
case 3: // Triangle
while (i < validVertexCount) {
- getVertexData(i++, points[0]);
- getVertexData(i++, points[1]);
- getVertexData(i++, points[2]);
- getVertexData(i++, points[3]);
+ getVertexData(i++, points[0]);
+ getVertexData(i++, points[1]);
+ getVertexData(i++, points[2]);
+ getVertexData(i++, points[3]);
if (intersectTriTri(points[0], points[1], points[2],
pnts[0], pnts[1], pnts[2]) ||
intersectTriTri(points[0], points[2], points[3],
@@ -315,12 +315,12 @@ class QuadArrayRetained extends GeometryArrayRetained {
}
break;
case 4: // Quad
-
+
while (i < validVertexCount) {
- getVertexData(i++, points[0]);
- getVertexData(i++, points[1]);
- getVertexData(i++, points[2]);
- getVertexData(i++, points[3]);
+ getVertexData(i++, points[0]);
+ getVertexData(i++, points[1]);
+ getVertexData(i++, points[2]);
+ getVertexData(i++, points[3]);
if (intersectTriTri(points[0], points[1], points[2],
pnts[0], pnts[1], pnts[2]) ||
intersectTriTri(points[0], points[1], points[2],
@@ -335,10 +335,10 @@ class QuadArrayRetained extends GeometryArrayRetained {
break;
case 2: // Line
while (i < validVertexCount) {
- getVertexData(i++, points[0]);
- getVertexData(i++, points[1]);
- getVertexData(i++, points[2]);
- getVertexData(i++, points[3]);
+ getVertexData(i++, points[0]);
+ getVertexData(i++, points[1]);
+ getVertexData(i++, points[2]);
+ getVertexData(i++, points[3]);
if (intersectSegment(points, pnts[0], pnts[1], dist,
null)) {
return true;
@@ -347,10 +347,10 @@ class QuadArrayRetained extends GeometryArrayRetained {
break;
case 1: // Point
while (i < validVertexCount) {
- getVertexData(i++, points[0]);
- getVertexData(i++, points[1]);
- getVertexData(i++, points[2]);
- getVertexData(i++, points[3]);
+ getVertexData(i++, points[0]);
+ getVertexData(i++, points[1]);
+ getVertexData(i++, points[2]);
+ getVertexData(i++, points[3]);
if (intersectTriPnt(points[0], points[1], points[2],
pnts[0]) ||
intersectTriPnt(points[0], points[2], points[3],
@@ -362,7 +362,7 @@ class QuadArrayRetained extends GeometryArrayRetained {
}
return false;
}
-
+
boolean intersect(Transform3D thisToOtherVworld, GeometryRetained geom) {
@@ -374,12 +374,12 @@ class QuadArrayRetained extends GeometryArrayRetained {
points[1] = new Point3d();
points[2] = new Point3d();
points[3] = new Point3d();
-
+
while (i < validVertexCount) {
- getVertexData(i++, points[0]);
- getVertexData(i++, points[1]);
- getVertexData(i++, points[2]);
- getVertexData(i++, points[3]);
+ getVertexData(i++, points[0]);
+ getVertexData(i++, points[1]);
+ getVertexData(i++, points[2]);
+ getVertexData(i++, points[3]);
thisToOtherVworld.transform(points[0]);
thisToOtherVworld.transform(points[1]);
thisToOtherVworld.transform(points[2]);
@@ -407,10 +407,10 @@ class QuadArrayRetained extends GeometryArrayRetained {
BoundingBox box = (BoundingBox) targetBound;
while (i < validVertexCount) {
- getVertexData(i++, points[0]);
- getVertexData(i++, points[1]);
- getVertexData(i++, points[2]);
- getVertexData(i++, points[3]);
+ getVertexData(i++, points[0]);
+ getVertexData(i++, points[1]);
+ getVertexData(i++, points[2]);
+ getVertexData(i++, points[3]);
if (intersectBoundingBox(points, box, null, null)) {
return true;
}
@@ -420,10 +420,10 @@ class QuadArrayRetained extends GeometryArrayRetained {
BoundingSphere bsphere = (BoundingSphere) targetBound;
while (i < validVertexCount) {
- getVertexData(i++, points[0]);
- getVertexData(i++, points[1]);
- getVertexData(i++, points[2]);
- getVertexData(i++, points[3]);
+ getVertexData(i++, points[0]);
+ getVertexData(i++, points[1]);
+ getVertexData(i++, points[2]);
+ getVertexData(i++, points[3]);
if (intersectBoundingSphere(points, bsphere, null,
null)) {
return true;
@@ -434,10 +434,10 @@ class QuadArrayRetained extends GeometryArrayRetained {
BoundingPolytope bpolytope = (BoundingPolytope) targetBound;
while (i < validVertexCount) {
- getVertexData(i++, points[0]);
- getVertexData(i++, points[1]);
- getVertexData(i++, points[2]);
- getVertexData(i++, points[3]);
+ getVertexData(i++, points[0]);
+ getVertexData(i++, points[1]);
+ getVertexData(i++, points[2]);
+ getVertexData(i++, points[3]);
if (intersectBoundingPolytope(points, bpolytope, null, null)) {
return true;
}
@@ -445,11 +445,11 @@ class QuadArrayRetained extends GeometryArrayRetained {
break;
default:
throw new RuntimeException("Bounds not supported for intersection "
- + targetBound);
+ + targetBound);
}
return false;
}
-
+
// From Graphics Gems IV (pg5) and Graphics Gems II, Pg170
// The centroid is the area-weighted sum of the centroids of
// disjoint triangles that make up the polygon.
diff --git a/src/classes/share/javax/media/j3d/Raster.java b/src/classes/share/javax/media/j3d/Raster.java
index 57c70ea..70d0fc1 100644
--- a/src/classes/share/javax/media/j3d/Raster.java
+++ b/src/classes/share/javax/media/j3d/Raster.java
@@ -126,71 +126,71 @@ public class Raster extends Geometry {
public static final int
ALLOW_POSITION_WRITE = CapabilityBits.RASTER_ALLOW_POSITION_WRITE;
- /**
+ /**
* Specifies that this Raster allows reading the source or
* destination offset.
- */
+ */
public static final int
ALLOW_OFFSET_READ = CapabilityBits.RASTER_ALLOW_OFFSET_READ;
-
- /**
+
+ /**
* Specifies that this Raster allows writing the source or
* destination offset.
- */
- public static final int
+ */
+ public static final int
ALLOW_OFFSET_WRITE = CapabilityBits.RASTER_ALLOW_OFFSET_WRITE;
- /**
+ /**
* Specifies that this Raster allows reading the image.
- */
- public static final int
+ */
+ public static final int
ALLOW_IMAGE_READ = CapabilityBits.RASTER_ALLOW_IMAGE_READ;
-
- /**
- * Specifies that this Raster allows writing the image.
- */
- public static final int
+
+ /**
+ * Specifies that this Raster allows writing the image.
+ */
+ public static final int
ALLOW_IMAGE_WRITE = CapabilityBits.RASTER_ALLOW_IMAGE_WRITE;
- /**
+ /**
* Specifies that this Raster allows reading the depth component.
- */
- public static final int
+ */
+ public static final int
ALLOW_DEPTH_COMPONENT_READ = CapabilityBits.RASTER_ALLOW_DEPTH_COMPONENT_READ;
-
- /**
- * Specifies that this Raster allows writing the depth component.
- */
- public static final int
+
+ /**
+ * Specifies that this Raster allows writing the depth component.
+ */
+ public static final int
ALLOW_DEPTH_COMPONENT_WRITE = CapabilityBits.RASTER_ALLOW_DEPTH_COMPONENT_WRITE;
- /**
+ /**
* Specifies that this Raster allows reading the size.
*/
public static final int
ALLOW_SIZE_READ = CapabilityBits.RASTER_ALLOW_SIZE_READ;
-
- /**
+
+ /**
* Specifies that this Raster allows writing the size.
*/
public static final int
ALLOW_SIZE_WRITE = CapabilityBits.RASTER_ALLOW_SIZE_WRITE;
- /**
- * Specifies that this Raster allows reading the type.
- */
- public static final int
+ /**
+ * Specifies that this Raster allows reading the type.
+ */
+ public static final int
ALLOW_TYPE_READ = CapabilityBits.RASTER_ALLOW_TYPE_READ;
-
- /**
+
+ /**
* Specifies that this Raster allows reading the clip mode.
*
* @since Java 3D 1.3
*/
public static final int
ALLOW_CLIP_MODE_READ = CapabilityBits.RASTER_ALLOW_CLIP_MODE_READ;
-
- /**
+
+ /**
* Specifies that this Raster allows writing the clip mode.
*
* @since Java 3D 1.3
@@ -281,17 +281,17 @@ public class Raster extends Geometry {
* @param image the ImageComponent2D object containing the
* color data
* @param depthComponent the DepthComponent object containing the depth
- * (z-buffer) data
+ * (z-buffer) data
*
* @exception IllegalArgumentException if the image class of the specified
* ImageComponent2D is ImageClass.NIO_IMAGE_BUFFER.
*/
- public Raster(Point3f pos,
- int type,
+ public Raster(Point3f pos,
+ int type,
Point srcOffset,
Dimension size,
- ImageComponent2D image,
- DepthComponent depthComponent) {
+ ImageComponent2D image,
+ DepthComponent depthComponent) {
// set default read capabilities
setDefaultReadCapabilities(readCapabilities);
@@ -336,7 +336,7 @@ public class Raster extends Geometry {
ImageComponent2D image,
DepthComponent depthComponent) {
-
+
// set default read capabilities
setDefaultReadCapabilities(readCapabilities);
@@ -366,11 +366,11 @@ public class Raster extends Geometry {
* @param pos the new position of this raster
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public void setPosition(Point3f pos) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_POSITION_WRITE))
- throw new CapabilityNotSetException(J3dI18N.getString("Raster0"));
+ throw new CapabilityNotSetException(J3dI18N.getString("Raster0"));
((RasterRetained)this.retained).setPosition(pos);
}
@@ -383,7 +383,7 @@ public class Raster extends Geometry {
public void getPosition(Point3f pos) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_POSITION_READ))
- throw new CapabilityNotSetException(J3dI18N.getString("Raster1"));
+ throw new CapabilityNotSetException(J3dI18N.getString("Raster1"));
((RasterRetained)this.retained).getPosition(pos);
}
@@ -399,8 +399,8 @@ public class Raster extends Geometry {
checkForLiveOrCompiled();
((RasterRetained)this.retained).setType(type);
}
-
-
+
+
/**
* Retrieves the current type of this raster object, one of: RASTER_COLOR,
* RASTER_DEPTH, or RASTER_COLOR_DEPTH.
@@ -411,7 +411,7 @@ public class Raster extends Geometry {
public int getType() {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_TYPE_READ))
- throw new CapabilityNotSetException(J3dI18N.getString("Raster2"));
+ throw new CapabilityNotSetException(J3dI18N.getString("Raster2"));
return (((RasterRetained)this.retained).getType());
}
@@ -550,8 +550,8 @@ public class Raster extends Geometry {
throw new CapabilityNotSetException(J3dI18N.getString("Raster9"));
((RasterRetained)this.retained).setSize(width, height);
- }
-
+ }
+
/**
* Sets the size of the array of pixels to be copied.
* @param size the new size
@@ -564,9 +564,9 @@ public class Raster extends Geometry {
throw new CapabilityNotSetException(J3dI18N.getString("Raster9"));
((RasterRetained)this.retained).setSize(size.width, size.height);
- }
-
-
+ }
+
+
/**
* Retrieves the current raster size.
* @param size the object that will receive the size
@@ -576,10 +576,10 @@ public class Raster extends Geometry {
public void getSize(Dimension size) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_SIZE_READ))
- throw new CapabilityNotSetException(J3dI18N.getString("Raster1"));
+ throw new CapabilityNotSetException(J3dI18N.getString("Raster1"));
((RasterRetained)this.retained).getSize(size);
- }
+ }
/**
@@ -659,13 +659,13 @@ public class Raster extends Geometry {
* @exception IllegalArgumentException if the image class of the specified
* ImageComponent2D is ImageClass.NIO_IMAGE_BUFFER.
*
- */
+ */
public void setImage(ImageComponent2D image) {
-
+
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_IMAGE_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("Raster3"));
-
+
// Do illegal sharing check
if(image != null) {
ImageComponent2DRetained imageRetained = (ImageComponent2DRetained) image.retained;
@@ -675,7 +675,7 @@ public class Raster extends Geometry {
}
}
}
-
+
((RasterRetained)this.retained).setImage(image);
}
@@ -685,11 +685,11 @@ public class Raster extends Geometry {
* color data
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public ImageComponent2D getImage() {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_IMAGE_READ))
- throw new CapabilityNotSetException(J3dI18N.getString("Raster4"));
+ throw new CapabilityNotSetException(J3dI18N.getString("Raster4"));
return (((RasterRetained)this.retained).getImage());
}
@@ -700,7 +700,7 @@ public class Raster extends Geometry {
* depth (z-buffer) data
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public void setDepthComponent(DepthComponent depthComponent) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_DEPTH_COMPONENT_WRITE))
@@ -714,22 +714,22 @@ public class Raster extends Geometry {
* depth (z-buffer) data
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public DepthComponent getDepthComponent() {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_DEPTH_COMPONENT_READ))
- throw new CapabilityNotSetException(J3dI18N.getString("Raster6"));
+ throw new CapabilityNotSetException(J3dI18N.getString("Raster6"));
return (((RasterRetained)this.retained).getDepthComponent());
}
-
+
/**
* @deprecated replaced with cloneNodeComponent(boolean forceDuplicate)
*/
public NodeComponent cloneNodeComponent() {
Raster r = new Raster();
- r.duplicateNodeComponent(this);
+ r.duplicateNodeComponent(this);
return r;
}
@@ -745,14 +745,14 @@ public class Raster extends Geometry {
checkDuplicateNodeComponent(originalNodeComponent);
}
-
+
/**
* Copies all node information from originalNodeComponent
into
* the current node. This method is called from the
* duplicateNode
method. This routine does
* the actual duplication of all "local data" (any data defined in
- * this object).
+ * this object).
*
* @param originalNodeComponent the original node to duplicate.
* @param forceDuplicate when set to true
, causes the
@@ -764,7 +764,7 @@ public class Raster extends Geometry {
* @see Node#cloneTree
* @see NodeComponent#setDuplicateOnCloneTree
*/
- void duplicateAttributes(NodeComponent originalNodeComponent,
+ void duplicateAttributes(NodeComponent originalNodeComponent,
boolean forceDuplicate) {
super.duplicateAttributes(originalNodeComponent, forceDuplicate);
@@ -795,11 +795,11 @@ public class Raster extends Geometry {
}
- /**
+ /**
* This function is called from getNodeComponent() to see if any of
- * the sub-NodeComponents duplicateOnCloneTree flag is true.
- * If it is the case, current NodeComponent needs to
- * duplicate also even though current duplicateOnCloneTree flag is false.
+ * the sub-NodeComponents duplicateOnCloneTree flag is true.
+ * If it is the case, current NodeComponent needs to
+ * duplicate also even though current duplicateOnCloneTree flag is false.
* This should be overwrite by NodeComponent which contains sub-NodeComponent.
*/
boolean duplicateChild() {
diff --git a/src/classes/share/javax/media/j3d/RasterRetained.java b/src/classes/share/javax/media/j3d/RasterRetained.java
index 8c4d8c4..8e97715 100644
--- a/src/classes/share/javax/media/j3d/RasterRetained.java
+++ b/src/classes/share/javax/media/j3d/RasterRetained.java
@@ -47,7 +47,7 @@ class RasterRetained extends GeometryRetained {
/**
* Raster type
- */
+ */
int type = Raster.RASTER_COLOR;
private int clipMode = Raster.CLIP_POSITION;
@@ -59,17 +59,17 @@ class RasterRetained extends GeometryRetained {
private int xDstOffset = 0;
private int yDstOffset = 0;
ImageComponent2DRetained image = null;
- Texture2DRetained texture = null;
+ Texture2DRetained texture = null;
DepthComponentRetained depthComponent = null;
-
+
RasterRetained() {
this.geoType = GEO_TYPE_RASTER;
}
/**
* Set the Raster position
- * @param position new raster position
- */
+ * @param position new raster position
+ */
final void setPosition(Point3f pos) {
geomLock.getLock();
position.x = pos.x;
@@ -99,8 +99,8 @@ class RasterRetained extends GeometryRetained {
this.type = type;
geomLock.unLock();
}
-
-
+
+
/**
* Retrieves the current type of this raster object, one of: RASTER_COLOR,
* RASTER_DEPTH, or RASTER_COLOR_DEPTH.
@@ -125,9 +125,9 @@ class RasterRetained extends GeometryRetained {
if(source.isLive()) {
//update the Shape3Ds that refer to this Raster
int un = userLists.size();
- ArrayList shapeList;
+ ArrayList shapeList;
Shape3DRetained ms, shape;
- int sn;
+ int sn;
for(int i = 0; i < un; i++) {
shapeList = (ArrayList)userLists.get(i);
sn = shapeList.size();
@@ -141,8 +141,8 @@ class RasterRetained extends GeometryRetained {
}
}
-
-
+
+
/**
* Retrieves the current clipping mode of this raster object.
* @return clipMode the clipping mode of this raster,
@@ -185,15 +185,15 @@ class RasterRetained extends GeometryRetained {
this.width = width;
this.height = height;
geomLock.unLock();
- }
-
+ }
+
/**
* Gets the size of the array of pixels to be copied.
* @param size the new size
*/
final void getSize(Dimension size) {
size.setSize(width, height);
- }
+ }
/**
* Sets the destination pixel offset of the upper-left
@@ -218,19 +218,19 @@ class RasterRetained extends GeometryRetained {
/**
- * Initializes the raster image to the specified image.
+ * Initializes the raster image to the specified image.
* @param image new ImageCompoent2D object used as the raster image
*/
final void initImage(ImageComponent2D img) {
-
+
int texFormat;
-
+
if(img == null) {
image = null;
texture = null;
return;
}
-
+
image = (ImageComponent2DRetained) img.retained;
image.setEnforceNonPowerOfTwoSupport(true);
switch(image.getNumberOfComponents()) {
@@ -250,17 +250,17 @@ class RasterRetained extends GeometryRetained {
assert false;
return;
}
-
- Texture2D tex2D = new Texture2D(Texture.BASE_LEVEL, texFormat,
+
+ Texture2D tex2D = new Texture2D(Texture.BASE_LEVEL, texFormat,
img.getWidth(), img.getHeight());
texture = (Texture2DRetained) tex2D.retained;
texture.setUseAsRaster(true);
// Fix to issue 372 : ImageComponent.set(BufferedImage) ignored when used by Raster
image.addUser(texture);
texture.initImage(0,img);
-
+
}
-
+
/**
* Sets the pixel array used to copy pixels to/from a Canvas3D.
* This is used when the type is RASTER_COLOR or RASTER_COLOR_DEPTH.
@@ -268,12 +268,12 @@ class RasterRetained extends GeometryRetained {
* color data
*/
final void setImage(ImageComponent2D img) {
-
- if((img != null) &&
- (img.getImageClass() == ImageComponent.ImageClass.NIO_IMAGE_BUFFER)) {
+
+ if((img != null) &&
+ (img.getImageClass() == ImageComponent.ImageClass.NIO_IMAGE_BUFFER)) {
throw new IllegalArgumentException(J3dI18N.getString("Background14"));
}
-
+
TextureRetained oldTex = this.texture;
if (source.isLive()) {
if (this.texture != null) {
@@ -291,7 +291,7 @@ class RasterRetained extends GeometryRetained {
if (texture != null) {
texture.setLive(inBackgroundGroup, refCount);
}
-
+
sendChangedMessage((J3dThread.UPDATE_RENDER|J3dThread.UPDATE_RENDERING_ATTRIBUTES),
oldTex, this.texture);
}
@@ -326,12 +326,12 @@ class RasterRetained extends GeometryRetained {
if (depthComponent == null) {
this.depthComponent = null;
} else {
- this.depthComponent =
+ this.depthComponent =
(DepthComponentRetained)depthComponent.retained;
}
geomLock.unLock();
- }
-
+ }
+
/**
* Retrieves the current depth image object.
* @return depthImage DepthComponent containing the
@@ -384,14 +384,14 @@ class RasterRetained extends GeometryRetained {
void computeBoundingBox() {
if(clipMode == Raster.CLIP_IMAGE) {
- // Disable view frustum culling by setting the raster's bounds to
- // infinity.
- Point3d minBounds = new Point3d(Double.NEGATIVE_INFINITY,
- Double.NEGATIVE_INFINITY,
+ // Disable view frustum culling by setting the raster's bounds to
+ // infinity.
+ Point3d minBounds = new Point3d(Double.NEGATIVE_INFINITY,
+ Double.NEGATIVE_INFINITY,
Double.NEGATIVE_INFINITY);
- Point3d maxBounds = new Point3d(Double.POSITIVE_INFINITY,
- Double.POSITIVE_INFINITY,
- Double.POSITIVE_INFINITY);
+ Point3d maxBounds = new Point3d(Double.POSITIVE_INFINITY,
+ Double.POSITIVE_INFINITY,
+ Double.POSITIVE_INFINITY);
geoBounds.setUpper(maxBounds);
geoBounds.setLower(minBounds);
} else {
@@ -406,7 +406,7 @@ class RasterRetained extends GeometryRetained {
void update() {
computeBoundingBox();
- }
+ }
private void sendChangedMessage(int threads, Object arg1, Object arg2) {
@@ -447,9 +447,9 @@ class RasterRetained extends GeometryRetained {
// Check if adjusted position needs to be computed
Point3d adjPos = new Point3d(); // Position of the Raster after adjusting for dstOffset
adjPos.set(position);
-
+
Point2d winCoord = new Point2d(); // Position of Raster in window coordinates
- Transform3D localToImagePlate = new Transform3D(); // Local to Image plate transform
+ Transform3D localToImagePlate = new Transform3D(); // Local to Image plate transform
Point3d clipCoord = computeWinCoord(cv, ra, winCoord, adjPos, localToImagePlate);
@@ -457,7 +457,7 @@ class RasterRetained extends GeometryRetained {
if (clipCoord == null) {
return;
}
-
+
if(clipMode == Raster.CLIP_POSITION) {
// Do trivial reject test on Raster position.
if(!isRasterClipPositionInside(clipCoord)) {
@@ -470,15 +470,15 @@ class RasterRetained extends GeometryRetained {
winCoord.y += yDstOffset;
// System.err.println("Step 2 : adjPos " + adjPos + " winCoord " + winCoord);
-
-
+
+
if((type == Raster.RASTER_COLOR) || (type == Raster.RASTER_COLOR_DEPTH)) {
- float devCoordZ = (float) (clipCoord.z * 0.5 - 0.5);
+ float devCoordZ = (float) (clipCoord.z * 0.5 - 0.5);
// Do textfill stuffs
if (texture != null) {
- // setup Texture pipe.
- cv.updateTextureForRaster(texture);
-
+ // setup Texture pipe.
+ cv.updateTextureForRaster(texture);
+
cv.textureFill(this, winCoord, (float) devCoordZ, alpha);
// Restore texture pipe.
@@ -490,12 +490,12 @@ class RasterRetained extends GeometryRetained {
if((type == Raster.RASTER_DEPTH) || (type == Raster.RASTER_COLOR_DEPTH)) {
Point2i srcOffset = new Point2i(xSrcOffset, ySrcOffset);
-
+
if (clipMode == Raster.CLIP_IMAGE) {
clipImage(cv, ra, winCoord, srcOffset);
}
-
- computeObjCoord(cv, winCoord, adjPos, localToImagePlate);
+
+ computeObjCoord(cv, winCoord, adjPos, localToImagePlate);
cv.executeRasterDepth(cv.ctx,
(float) adjPos.x,
@@ -509,11 +509,11 @@ class RasterRetained extends GeometryRetained {
depthComponent.height,
depthComponent.type,
((DepthComponentIntRetained) depthComponent).depthData);
-
+
}
}
-
-
+
+
/**
* Clips the image against the window. This method simulates
* clipping the image by determining the subimage that will be
@@ -523,59 +523,59 @@ class RasterRetained extends GeometryRetained {
* the underlying graphics library automatically.
*/
private void clipImage(Canvas3D canvas, RenderAtom ra, Point2d winCoord, Point2i srcOffset) {
-
+
if ((winCoord.x > 0) && (winCoord.y > 0)) {
return;
}
-
+
// Check if the Raster point will be culled
// Note that w use 1 instead of 0, because when hardware
// tranform the coordinate back to winCoord it may get
// a small negative value due to numerically inaccurancy.
- // This clip the Raster away and cause flickering
+ // This clip the Raster away and cause flickering
// (see bug 4732965)
if(winCoord.x < 1) {
// Negate the window position and use this as the offset
srcOffset.x = (int)-winCoord.x+1;
winCoord.x = 1;
}
-
+
if(winCoord.y < 1) {
// Negate the window position and use this as the offset
srcOffset.y = (int)-winCoord.y+1;
winCoord.y = 1;
}
-
+
//check if user-specified subimage is smaller than the clipped image
if (srcOffset.x < xSrcOffset)
srcOffset.x = xSrcOffset;
if(srcOffset.y < ySrcOffset)
srcOffset.y = ySrcOffset;
-
- }
-
+ }
+
+
private boolean isRasterClipPositionInside(Point3d clipCoord) {
return (clipCoord.x >= -1.0) && (clipCoord.x <= 1.0) &&
(clipCoord.y >= -1.0) && (clipCoord.y <= 1.0);
}
-
+
private void computeObjCoord(Canvas3D canvas, Point2d winCoord, Point3d objCoord,
Transform3D localToImagePlate) {
// Back transform this pt. from window to object coordinates
- // Assumes this method is ALWAYS called after computeWinCoord has been
- // called. computeWinCoord calculates the Vworld to Image Plate Xform.
+ // Assumes this method is ALWAYS called after computeWinCoord has been
+ // called. computeWinCoord calculates the Vworld to Image Plate Xform.
// This method simply uses it without recomputing it.
-
- canvas.getPixelLocationInImagePlate(winCoord.x, winCoord.y, objCoord.z,
+
+ canvas.getPixelLocationInImagePlate(winCoord.x, winCoord.y, objCoord.z,
objCoord);
// Get image plate to object coord transform
// inv(P x M)
localToImagePlate.invert();
localToImagePlate.transform(objCoord);
}
-
- private Point3d computeWinCoord(Canvas3D canvas, RenderAtom ra,
+
+ private Point3d computeWinCoord(Canvas3D canvas, RenderAtom ra,
Point2d winCoord, Point3d objCoord,
Transform3D localToImagePlate) {
// Get local to Vworld transform
@@ -583,64 +583,64 @@ class RasterRetained extends GeometryRetained {
if (rm == null) {
// removeRenderAtom() may set ra.renderMolecule to null
- // in RenderBin before this renderer thread run.
+ // in RenderBin before this renderer thread run.
return null;
}
-
+
// MT safe issue: We can't reference ra.renderMolecule below since
// RenderBin thread may set it to null anytime. Use rm instead.
Transform3D lvw = rm.localToVworld[rm.localToVworldIndex[
NodeRetained.LAST_LOCAL_TO_VWORLD]];
-
+
Point3d clipCoord3 = new Point3d();
clipCoord3.set(objCoord);
Point4d clipCoord4 = new Point4d();
-
+
// Transform point from local coord. to clipping coord.
lvw.transform(clipCoord3);
canvas.vworldToEc.transform(clipCoord3);
canvas.projTrans.transform(clipCoord3, clipCoord4);
-
+
// clip check in Z
- if((clipCoord4.w <= 0.0) ||
+ if((clipCoord4.w <= 0.0) ||
(clipCoord4.z > clipCoord4.w) || (-clipCoord4.z > clipCoord4.w)) {
return null;
}
double invW = 1.0 / clipCoord4.w;
-
+
clipCoord3.x = clipCoord4.x * invW;
clipCoord3.y = clipCoord4.y * invW;
clipCoord3.z = clipCoord4.z * invW;
-
+
// Get Vworld to image plate Xform
canvas.getLastVworldToImagePlate(localToImagePlate);
-
- // v' = vwip x lvw x v
- // where v' = transformed vertex,
+
+ // v' = vwip x lvw x v
+ // where v' = transformed vertex,
// lvw = local to Vworld Xform
// vwip = Vworld to Image plate Xform
// v = vertex
-
+
// Compute composite local to image plate Xform
localToImagePlate.mul(lvw);
-
+
// Transform the Raster's position from object to world coordinates
localToImagePlate.transform(objCoord);
-
-
+
+
// Get the window coordinates of this point
canvas.getPixelLocationFromImagePlate(objCoord, winCoord);
-
+
return clipCoord3;
}
-
+
int getClassType() {
return RASTER_TYPE;
}
-
+
// notifies the Raster mirror object that the image data in a referenced
// ImageComponent object is changed.
// Currently we are not making use of this information.
@@ -652,8 +652,8 @@ class RasterRetained extends GeometryRetained {
boolean intersect(PickShape pickShape, PickInfo pickInfo, int flags, Point3d iPnt,
GeometryRetained geom, int geomIndex) {
return false;
- }
-
+ }
+
boolean intersect(Bounds targetBound) {
return false;
}
@@ -665,7 +665,7 @@ class RasterRetained extends GeometryRetained {
geom) {
return false;
}
- boolean intersect(Transform3D thisLocalToVworld,
+ boolean intersect(Transform3D thisLocalToVworld,
Transform3D otherLocalToVworld,
GeometryRetained geom) {
return false;
@@ -677,7 +677,7 @@ class RasterRetained extends GeometryRetained {
void handleFrequencyChange(int bit) {
if (bit == Raster.ALLOW_IMAGE_WRITE)
setFrequencyChangeMask(bit, 0x1);
-
+
}
}
diff --git a/src/classes/share/javax/media/j3d/RenderAtom.java b/src/classes/share/javax/media/j3d/RenderAtom.java
index 2bbce61..55eb48d 100644
--- a/src/classes/share/javax/media/j3d/RenderAtom.java
+++ b/src/classes/share/javax/media/j3d/RenderAtom.java
@@ -48,12 +48,12 @@ class RenderAtom extends Object implements ObjectUpdate {
RenderMolecule renderMolecule = null;
- /**
+ /**
* The lights that influence this RenderAtom
*/
LightRetained[] lights = null;
- /**
+ /**
* The fog that influences this RenderAtom
*/
FogRetained fog = null;
@@ -102,10 +102,10 @@ class RenderAtom extends Object implements ObjectUpdate {
// true if in dirty depth sort position list
static int IN_SORTED_POS_DIRTY_TRANSP_LIST = 0x80;
-
+
// A bitmask for all the bit specified above in this renderAtom
int dirtyMask = 0;
-
+
/**
* Environment set that this renderAtom belongs to, used
* to compare the new env set with the old one when the
@@ -123,7 +123,7 @@ class RenderAtom extends Object implements ObjectUpdate {
* The last time this atom was reported visible
*/
long lastVisibleTime = -1;
-
+
/**
* Next and Previous references for the list of RenderAtoms
* groupType is a mask set to true if this renderAtom is part of the displaylist array
@@ -172,7 +172,7 @@ class RenderAtom extends Object implements ObjectUpdate {
RenderAtom() {
}
- /**
+ /**
* This sets the inRenderBin flag
*/
synchronized void setRenderBin(boolean value) {
@@ -185,7 +185,7 @@ class RenderAtom extends Object implements ObjectUpdate {
else {
dirtyMask |= IN_RENDERBIN;
}
-
+
}
/**
@@ -225,12 +225,12 @@ class RenderAtom extends Object implements ObjectUpdate {
break;
default:
if (app.polygonAttributes != null) {
- if ((app.polygonAttributes.polygonMode ==
+ if ((app.polygonAttributes.polygonMode ==
PolygonAttributes.POLYGON_POINT) &&
(app.pointAttributes != null) &&
app.pointAttributes.pointAntialiasing) {
return false;
- } else if ((app.polygonAttributes.polygonMode ==
+ } else if ((app.polygonAttributes.polygonMode ==
PolygonAttributes.POLYGON_LINE) &&
(app.lineAttributes != null) &&
app.lineAttributes.lineAntialiasing) {
@@ -241,9 +241,9 @@ class RenderAtom extends Object implements ObjectUpdate {
}
return ((ta == null) ||
- (ta.transparencyMode ==
+ (ta.transparencyMode ==
TransparencyAttributes.NONE) ||
- (ta.transparencyMode ==
+ (ta.transparencyMode ==
TransparencyAttributes.SCREEN_DOOR));
} else {
return ((ta == null) ||
@@ -270,7 +270,7 @@ class RenderAtom extends Object implements ObjectUpdate {
boolean onLocaleVwcBoundsUpdateList() {
return ((dirtyMask & ON_LOCALE_VWC_BOUNDS_UPDATELIST) != 0);
- }
+ }
boolean isOriented() {
return ((dirtyMask & IS_ORIENTED) != 0);
@@ -284,16 +284,16 @@ class RenderAtom extends Object implements ObjectUpdate {
boolean inDirtyOrientedRAs() {
return ((dirtyMask & IN_DIRTY_ORIENTED_RAs) != 0);
}
-
+
public void updateObject() {
if (inRenderBin()) {
- int lastLVWIndex =
+ int lastLVWIndex =
renderMolecule.localToVworldIndex[NodeRetained.LAST_LOCAL_TO_VWORLD];
for (int i = 0; i < rListInfo.length; i++) {
if (rListInfo[i].geometry() == null)
continue;
-
+
if (geometryAtom.source.inBackgroundGroup) {
if (rListInfo[i].infLocalToVworld == null)
rListInfo[i].infLocalToVworld = new Transform3D();
@@ -314,9 +314,9 @@ class RenderAtom extends Object implements ObjectUpdate {
}
void updateOrientedTransform() {
- int lastLVWIndex =
+ int lastLVWIndex =
renderMolecule.localToVworldIndex[NodeRetained.LAST_LOCAL_TO_VWORLD];
- Transform3D orientedTransform =
+ Transform3D orientedTransform =
((OrientedShape3DRetained)geometryAtom.source).
getOrientedTransform(renderMolecule.renderBin.view.viewIndex);
for (int i = 0; i < rListInfo.length; i++) {
@@ -362,19 +362,19 @@ class RenderAtom extends Object implements ObjectUpdate {
void updateLocaleVwcBounds() {
// it is possible that inRenderBin could be false because
- // the renderAtom could have been removed from RenderBin
+ // the renderAtom could have been removed from RenderBin
// in the same frame, and removeRenderAtoms does happen
// before updateLocaleVwcBounds
if (inRenderBin()) {
// Check if the locale of this is different from the
- // locale on which the view is,then compute the translated
+ // locale on which the view is,then compute the translated
// localeVwcBounds
if (renderMolecule.renderBin.locale != geometryAtom.source.locale) {
-
+
geometryAtom.source.locale.
- hiRes.difference(renderMolecule.renderBin.locale.hiRes,
+ hiRes.difference(renderMolecule.renderBin.locale.hiRes,
renderMolecule.renderBin.localeTranslation);
- localeVwcBounds.translate(geometryAtom.source.vwcBounds,
+ localeVwcBounds.translate(geometryAtom.source.vwcBounds,
renderMolecule.renderBin.localeTranslation);
} else {
localeVwcBounds.set(geometryAtom.source.vwcBounds);
diff --git a/src/classes/share/javax/media/j3d/RenderAtomListInfo.java b/src/classes/share/javax/media/j3d/RenderAtomListInfo.java
index 1be930f..3ff04f6 100644
--- a/src/classes/share/javax/media/j3d/RenderAtomListInfo.java
+++ b/src/classes/share/javax/media/j3d/RenderAtomListInfo.java
@@ -37,12 +37,12 @@ package javax.media.j3d;
class RenderAtomListInfo extends Object {
// RenderAtom that its a part of
- RenderAtom renderAtom = null;
+ RenderAtom renderAtom = null;
// Specific geometry index in the GeometryAtom geometryArr list that
// corresponds to this RenderAtomListInfo
int index;
-
+
// Prev and next pointer
RenderAtomListInfo next = null;
RenderAtomListInfo prev = null;
diff --git a/src/classes/share/javax/media/j3d/RenderBin.java b/src/classes/share/javax/media/j3d/RenderBin.java
index 0a60252..662db84 100644
--- a/src/classes/share/javax/media/j3d/RenderBin.java
+++ b/src/classes/share/javax/media/j3d/RenderBin.java
@@ -40,12 +40,12 @@ import java.util.*;
*/
class RenderBin extends J3dStructure implements ObjectUpdate {
-
+
/**
* The list of RenderAtoms
*/
ArrayList renderAtoms = new ArrayList(5);
-
+
/**
* A couple ArrayLists used during light Processing
*/
@@ -82,17 +82,17 @@ class RenderBin extends J3dStructure implements ObjectUpdate {
* are temporarily removed from the bin.
*/
ArrayList updateCheckList = new ArrayList();
-
+
/**
* The number of lights supported by the underlying context.
*/
int maxLights;
-
+
/**
* The opaque objects
*/
LightBin opaqueBin = null;
-
+
/**
* OpaqueBins to be added for the next frame
*/
@@ -104,28 +104,28 @@ class RenderBin extends J3dStructure implements ObjectUpdate {
ArrayList allTransparentObjects = new ArrayList(5);
TransparentRenderingInfo transparentInfo;
-
+
/**
* List of RenderAtoms whose postion have changed - only used for
* depth sorted transparency
- */
+ */
ArrayList positionDirtyList = new ArrayList(5);
-
+
/**
* Used when ColoringAttributes is null
*/
Color3f white = new Color3f(1.0f, 1.0f, 1.0f);
-
+
/**
* Used when Background is null
*/
Color3f black = new Color3f(0.0f, 0.0f, 0.0f);
-
+
/**
* The backgound color data.
*/
BackgroundRetained background = new BackgroundRetained();
-
+
/**
* The view platform transforms.
*/
@@ -134,7 +134,7 @@ class RenderBin extends J3dStructure implements ObjectUpdate {
// used for updating vpSchedSphere
Transform3D vpcToVworld = new Transform3D();
-
+
/**
* Two bounding spheres to track the scheduling region of
* the view platform.
@@ -154,7 +154,7 @@ class RenderBin extends J3dStructure implements ObjectUpdate {
/**
* back clip distance in vworld
- */
+ */
double backClipDistanceInVworld;
boolean backClipActive = false;
@@ -178,9 +178,9 @@ class RenderBin extends J3dStructure implements ObjectUpdate {
* The View for this render bin
*/
View view = null;
-
+
private Comparator transparencySortComparator = null;
-
+
private ArrayList toBeAddedTextureResourceFreeList = new ArrayList(5);
private ArrayList displayListResourceFreeList = new ArrayList(5);
@@ -200,7 +200,7 @@ class RenderBin extends J3dStructure implements ObjectUpdate {
static int REEVALUATE_ALL_ENV = REEVALUATE_LIGHTS | REEVALUATE_FOG | REEVALUATE_MCLIP;
int envDirty = 0;
-
+
private boolean reEvaluateBg = true;
private boolean reloadBgTexture = true;
@@ -234,13 +234,13 @@ class RenderBin extends J3dStructure implements ObjectUpdate {
/**
* remove the bins first before adding them to new ones
*/
- IndexedUnorderSet removeRenderAtomInRMList =
+ IndexedUnorderSet removeRenderAtomInRMList =
new IndexedUnorderSet(RenderMolecule.class,
RenderMolecule.REMOVE_RENDER_ATOM_IN_RM_LIST, null);
-
+
/**
- * list of affect OrderedGroups with childIndexOrder changed.
+ * list of affect OrderedGroups with childIndexOrder changed.
*/
ArrayList ogCIOList = new ArrayList(5);
@@ -301,7 +301,7 @@ class RenderBin extends J3dStructure implements ObjectUpdate {
ArrayList newNodeComponentList = new ArrayList(5);
ArrayList removeNodeComponentList = new ArrayList(5);
ArrayList dirtyNodeComponentList = new ArrayList(5);
-
+
ArrayList textureBinList = new ArrayList(5);
/**
@@ -319,7 +319,7 @@ class RenderBin extends J3dStructure implements ObjectUpdate {
// Cached copy of dirty oriented RAs to be updated in MasterControl
ArrayList cachedDirtyOrientedRAs = null;
- // list of offScreen message that
+ // list of offScreen message that
ArrayList offScreenMessage = new ArrayList(5);
// Vector used for locale translation
@@ -332,7 +332,7 @@ class RenderBin extends J3dStructure implements ObjectUpdate {
// Separate dlists per rinfo that were added/removed in this snapshot
ArrayList addDlistPerRinfo = new ArrayList(5);
ArrayList removeDlistPerRinfo = new ArrayList(5);
-
+
Locale locale = null;
// Set to true if locale changes as part of UPDATE_VIEW message
@@ -358,7 +358,7 @@ class RenderBin extends J3dStructure implements ObjectUpdate {
// Temporary dirtylist
ArrayList dirtyList = new ArrayList(5);
-
+
// Transaprency sort mode
int transpSortMode = View.TRANSPARENCY_SORT_NONE;
int cachedTranspSortMode = View.TRANSPARENCY_SORT_NONE;
@@ -372,11 +372,11 @@ class RenderBin extends J3dStructure implements ObjectUpdate {
Point3d eyeInVworld = new Point3d();
// Number of RenderAtomListInfo in the depthSortedList
int nElements = 0;
-
-
+
+
/**
- * Constructs a new RenderBin
+ * Constructs a new RenderBin
*/
RenderBin(VirtualUniverse u, View v) {
super(u, J3dThread.UPDATE_RENDER);
@@ -393,7 +393,7 @@ class RenderBin extends J3dStructure implements ObjectUpdate {
dlistRenderMethod = (DisplayListRenderMethod)
VirtualUniverse.mc.getDisplayListRenderMethod();
}
-
+
/**
* updateObject
*/
@@ -409,16 +409,16 @@ class RenderBin extends J3dStructure implements ObjectUpdate {
TextureRetained tex;
Integer texIdObj;
int size;
-
+
// System.err.println("dirtyRenderMoleculeList.size = "+dirtyRenderMoleculeList.size());
// System.err.println("reEvaluateBg = "+reEvaluateBg);
- // System.err.println("reEvaluateClip = "+reEvaluateClip);
+ // System.err.println("reEvaluateClip = "+reEvaluateClip);
// System.err.println("<========+End All Cached Values===========>");
// Add the new lightBins that have been created
// System.err.println("objUpdateList.size = "+objUpdateList.size());
// System.err.println("addOpaqueBin = "+addOpaqueBin);
// System.err.println("opaqueBin = "+opaqueBin);
-
+
// List of renderMolecule from which renderAtoms have been removed
size = removeRenderAtomInRMList.size();
if (size > 0) {
@@ -439,13 +439,13 @@ class RenderBin extends J3dStructure implements ObjectUpdate {
orderBin.addRemoveOrderedCollection();
}
}
-
+
size = ogCIOList.size();
- if(size > 0) {
+ if(size > 0) {
J3dMessage m;
for(i=0; isetAlphaTestValue
* method. The default alpha test value is 0.0.setRasterOp
method. The raster operation
@@ -131,26 +131,26 @@ package javax.media.j3d;
* setIgnoreVertexColors
method. If
- * ignoreVertexColors is false, per-vertex colors are used, when
+ * setIgnoreVertexColors
method. If
+ * ignoreVertexColors is false, per-vertex colors are used, when
* present in the associated geometry objects, taking
* precedence over the ColoringAttributes color and the
* specified Material color(s). If ignoreVertexColors is true, per-vertex
- * colors are ignored. In this case, if lighting is enabled, the
+ * colors are ignored. In this case, if lighting is enabled, the
* Material diffuse color will be used as the object color.
* if lighting is disabled, the ColoringAttributes color is
* used. The default value is false.setVisible
* method. By default, the visibility flag is true.setDepthBufferEnable
method enables
- * or disabled the depth buffer. The
+ * or disabled the depth buffer. The
* setDepthBufferWriteEnable
method enables or disables
* writing the depth buffer for this object. During the transparent
* rendering pass, this attribute can be overridden by the
@@ -210,16 +210,16 @@ package javax.media.j3d;
*
* DST = DST
.
* @see #setRasterOp
@@ -555,7 +555,7 @@ public class RenderingAttributes extends NodeComponent {
* @since Java 3D 1.4
*/
public static final int ROP_EQUIV = 0x9;
-
+
/**
* Raster operation: DST = ~DST
.
* @see #setRasterOp
@@ -563,7 +563,7 @@ public class RenderingAttributes extends NodeComponent {
* @since Java 3D 1.4
*/
public static final int ROP_INVERT = 0xA;
-
+
/**
* Raster operation: DST = src | ~DST
.
* @see #setRasterOp
@@ -663,7 +663,7 @@ public class RenderingAttributes extends NodeComponent {
ALLOW_ALPHA_TEST_VALUE_READ,
ALLOW_DEPTH_ENABLE_READ,
ALLOW_DEPTH_TEST_FUNCTION_READ,
- ALLOW_IGNORE_VERTEX_COLORS_READ,
+ ALLOW_IGNORE_VERTEX_COLORS_READ,
ALLOW_RASTER_OP_READ,
ALLOW_STENCIL_ATTRIBUTES_READ,
ALLOW_VISIBLE_READ
@@ -745,14 +745,14 @@ public class RenderingAttributes extends NodeComponent {
int rasterOp) {
// set default read capabilities
setDefaultReadCapabilities(readCapabilities);
-
+
((RenderingAttributesRetained)this.retained).initDepthBufferEnable(depthBufferEnable);
((RenderingAttributesRetained)this.retained).initDepthBufferWriteEnable(depthBufferWriteEnable);
((RenderingAttributesRetained)this.retained).initAlphaTestValue(alphaTestValue);
((RenderingAttributesRetained)this.retained).initAlphaTestFunction(alphaTestFunction);
((RenderingAttributesRetained)this.retained).initVisible(visible);
-
+
((RenderingAttributesRetained)this.retained).initIgnoreVertexColors(ignoreVertexColors);
((RenderingAttributesRetained)this.retained).initRasterOpEnable(rasterOpEnable);
((RenderingAttributesRetained)this.retained).initRasterOp(rasterOp);
@@ -764,7 +764,7 @@ public class RenderingAttributes extends NodeComponent {
*
* @param state true or false to enable or disable depth buffer mode
*
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @see GraphicsConfigTemplate3D#setDepthSize
@@ -785,7 +785,7 @@ public class RenderingAttributes extends NodeComponent {
* Retrieves the state of zBuffer Enable flag
* @return true if depth buffer mode is enabled, false
* if depth buffer mode is disabled
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public boolean getDepthBufferEnable(){
@@ -802,7 +802,7 @@ public class RenderingAttributes extends NodeComponent {
* this attribute can be overridden by
* the depthBufferFreezeTransparent attribute in the View object.
* @param state true or false to enable or disable depth buffer Write mode
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
* @see View#setDepthBufferFreezeTransparent
*/
@@ -820,7 +820,7 @@ public class RenderingAttributes extends NodeComponent {
* Retrieves the state of Depth Buffer Write Enable flag.
* @return true if depth buffer is writable, false
* if depth buffer is read-only
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public boolean getDepthBufferWriteEnable(){
@@ -835,7 +835,7 @@ public class RenderingAttributes extends NodeComponent {
* Set alpha test value used by alpha test function. This value is
* compared to the alpha value of each rendered pixel.
* @param value the alpha test value
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public void setAlphaTestValue(float value){
@@ -852,7 +852,7 @@ public class RenderingAttributes extends NodeComponent {
/**
* Retrieves the alpha test value.
* @return the alpha test value.
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public float getAlphaTestValue(){
@@ -871,7 +871,7 @@ public class RenderingAttributes extends NodeComponent {
* @param function the new alpha test function. One of
* ALWAYS, NEVER, EQUAL, NOT_EQUAL, LESS, LESS_OR_EQUAL, GREATER,
* GREATER_OR_EQUAL
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public void setAlphaTestFunction(int function){
@@ -889,7 +889,7 @@ public class RenderingAttributes extends NodeComponent {
/**
* Retrieves current alpha test function.
* @return the current alpha test function
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public int getAlphaTestFunction(){
@@ -906,7 +906,7 @@ public class RenderingAttributes extends NodeComponent {
* the visibility policy for the current view), but they can be picked
* or collided with. The default value is true.
* @param visible true or false to enable or disable visibility
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @see View#setVisibilityPolicy
@@ -917,7 +917,7 @@ public class RenderingAttributes extends NodeComponent {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_VISIBLE_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("RenderingAttributes8"));
-
+
if (isLive())
((RenderingAttributesRetained)this.retained).setVisible(visible);
else
@@ -928,7 +928,7 @@ public class RenderingAttributes extends NodeComponent {
* Retrieves the visibility flag for this RenderingAttributes object.
* @return true if the object is visible; false
* if the object is invisible.
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @since Java 3D 1.2
@@ -937,7 +937,7 @@ public class RenderingAttributes extends NodeComponent {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_VISIBLE_READ))
throw new CapabilityNotSetException(J3dI18N.getString("RenderingAttributes9"));
-
+
return ((RenderingAttributesRetained)this.retained).getVisible();
}
@@ -955,7 +955,7 @@ public class RenderingAttributes extends NodeComponent {
*
* @param ignoreVertexColors true or false to enable or disable
* the ignoring of per-vertex colors
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @see ColoringAttributes
@@ -980,7 +980,7 @@ public class RenderingAttributes extends NodeComponent {
* RenderingAttributes object.
* @return true if per-vertex colors are ignored; false
* if per-vertex colors are used.
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @since Java 3D 1.2
@@ -1006,7 +1006,7 @@ public class RenderingAttributes extends NodeComponent {
*
* @param rasterOpEnable true or false to enable or disable
* raster operations
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @see #setRasterOp
@@ -1029,7 +1029,7 @@ public class RenderingAttributes extends NodeComponent {
* object.
* @return true if raster operations are enabled; false
* if raster operations are disabled.
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @since Java 3D 1.2
@@ -1051,7 +1051,7 @@ public class RenderingAttributes extends NodeComponent {
* ROP_CLEAR, ROP_AND, ROP_AND_REVERSE, ROP_COPY, ROP_AND_INVERTED,
* ROP_NOOP, ROP_XOR, ROP_OR, ROP_NOR, ROP_EQUIV, ROP_INVERT,
* ROP_OR_REVERSE, ROP_COPY_INVERTED, ROP_OR_INVERTED, ROP_NAND or ROP_SET.
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @since Java 3D 1.2
@@ -1074,7 +1074,7 @@ public class RenderingAttributes extends NodeComponent {
* ROP_CLEAR, ROP_AND, ROP_AND_REVERSE, ROP_COPY, ROP_AND_INVERTED,
* ROP_NOOP, ROP_XOR, ROP_OR, ROP_NOR, ROP_EQUIV, ROP_INVERT,
* ROP_OR_REVERSE, ROP_COPY_INVERTED, ROP_OR_INVERTED, ROP_NAND or ROP_SET
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @since Java 3D 1.2
@@ -1098,7 +1098,7 @@ public class RenderingAttributes extends NodeComponent {
/**
- * @deprecated replaced with cloneNodeComponent(boolean forceDuplicate)
+ * @deprecated replaced with cloneNodeComponent(boolean forceDuplicate)
*/
public NodeComponent cloneNodeComponent() {
RenderingAttributes ra = new RenderingAttributes();
@@ -1112,7 +1112,7 @@ public class RenderingAttributes extends NodeComponent {
* the current node. This method is called from the
* duplicateNode
method. This routine does
* the actual duplication of all "local data" (any data defined in
- * this object).
+ * this object).
*
* @param originalNodeComponent the original node to duplicate.
* @param forceDuplicate when set to true
, causes the
@@ -1124,12 +1124,12 @@ public class RenderingAttributes extends NodeComponent {
* @see Node#cloneTree
* @see NodeComponent#setDuplicateOnCloneTree
*/
- void duplicateAttributes(NodeComponent originalNodeComponent,
- boolean forceDuplicate) {
+ void duplicateAttributes(NodeComponent originalNodeComponent,
+ boolean forceDuplicate) {
super.duplicateAttributes(originalNodeComponent, forceDuplicate);
- RenderingAttributesRetained attr =
+ RenderingAttributesRetained attr =
(RenderingAttributesRetained) originalNodeComponent.retained;
RenderingAttributesRetained rt =
(RenderingAttributesRetained) retained;
@@ -1163,7 +1163,7 @@ public class RenderingAttributes extends NodeComponent {
* ALWAYS, NEVER, EQUAL, NOT_EQUAL, LESS, LESS_OR_EQUAL, GREATER,
* or GREATER_OR_EQUAL.
* The default value is LESS_OR_EQUAL.
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @since Java 3D 1.4
@@ -1182,7 +1182,7 @@ public class RenderingAttributes extends NodeComponent {
/**
* Retrieves current depth test function.
* @return the current depth test function
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @since Java 3D 1.4
@@ -1207,7 +1207,7 @@ public class RenderingAttributes extends NodeComponent {
* If this is set to false, the stencilOp and stencilFunction parameters
* are not used.
*
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @see GraphicsConfigTemplate3D#setStencilSize
@@ -1235,7 +1235,7 @@ public class RenderingAttributes extends NodeComponent {
* @return true if stencil buffer operations are enabled; false
* if stencil buffer operations are disabled.
*
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @since Java 3D 1.4
@@ -1268,7 +1268,7 @@ public class RenderingAttributes extends NodeComponent {
* STENCIL_KEEP, STENCIL_ZERO, STENCIL_REPLACE, STENCIL_INCR, STENCIL_DECR,
* or STENCIL_INVERT.
*
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @since Java 3D 1.4
@@ -1281,12 +1281,12 @@ public class RenderingAttributes extends NodeComponent {
}
if (isLive())
- ((RenderingAttributesRetained)this.retained).setStencilOp(failOp,
- zFailOp,
+ ((RenderingAttributesRetained)this.retained).setStencilOp(failOp,
+ zFailOp,
zPassOp);
else
- ((RenderingAttributesRetained)this.retained).initStencilOp(failOp,
- zFailOp,
+ ((RenderingAttributesRetained)this.retained).initStencilOp(failOp,
+ zFailOp,
zPassOp);
}
@@ -1301,7 +1301,7 @@ public class RenderingAttributes extends NodeComponent {
* zFailOp
parameter, and element 2 specifies the
* zPassOp
parameter.
*
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @see #setStencilOp(int,int,int)
@@ -1316,11 +1316,11 @@ public class RenderingAttributes extends NodeComponent {
}
if (isLive())
- ((RenderingAttributesRetained)this.retained).setStencilOp(stencilOps[0],
+ ((RenderingAttributesRetained)this.retained).setStencilOp(stencilOps[0],
stencilOps[1],
stencilOps[2]);
else
- ((RenderingAttributesRetained)this.retained).initStencilOp(stencilOps[0],
+ ((RenderingAttributesRetained)this.retained).initStencilOp(stencilOps[0],
stencilOps[1],
stencilOps[2]);
}
@@ -1336,7 +1336,7 @@ public class RenderingAttributes extends NodeComponent {
* into element 1, and the zPassOp
parameter is copied
* into element 2.
*
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @since Java 3D 1.4
@@ -1347,7 +1347,7 @@ public class RenderingAttributes extends NodeComponent {
throw new CapabilityNotSetException(J3dI18N.getString("RenderingAttributes17"));
}
}
-
+
((RenderingAttributesRetained)this.retained).getStencilOp(stencilOps);
}
@@ -1382,11 +1382,11 @@ public class RenderingAttributes extends NodeComponent {
}
}
if (isLive())
- ((RenderingAttributesRetained)this.retained).setStencilFunction(function,
+ ((RenderingAttributesRetained)this.retained).setStencilFunction(function,
refValue,
compareMask);
else
- ((RenderingAttributesRetained)this.retained).initStencilFunction(function,
+ ((RenderingAttributesRetained)this.retained).initStencilFunction(function,
refValue,
compareMask);
}
@@ -1402,7 +1402,7 @@ public class RenderingAttributes extends NodeComponent {
* reference value, and element 2 specifies the
* comparison mask.
*
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @see #setStencilFunction(int,int,int)
@@ -1417,11 +1417,11 @@ public class RenderingAttributes extends NodeComponent {
}
if (isLive())
- ((RenderingAttributesRetained)this.retained).setStencilFunction(params[0],
+ ((RenderingAttributesRetained)this.retained).setStencilFunction(params[0],
params[1],
params[2]);
else
- ((RenderingAttributesRetained)this.retained).initStencilFunction(params[0],
+ ((RenderingAttributesRetained)this.retained).initStencilFunction(params[0],
params[1],
params[2]);
@@ -1438,7 +1438,7 @@ public class RenderingAttributes extends NodeComponent {
* into element 1, and the comparison mask is copied
* into element 2.
*
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @since Java 3D 1.4
@@ -1461,7 +1461,7 @@ public class RenderingAttributes extends NodeComponent {
*
* @param mask the new stencil write mask.
*
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @since Java 3D 1.4
@@ -1485,7 +1485,7 @@ public class RenderingAttributes extends NodeComponent {
*
* @return the stencil write mask.
*
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @since Java 3D 1.4
diff --git a/src/classes/share/javax/media/j3d/RenderingAttributesRetained.java b/src/classes/share/javax/media/j3d/RenderingAttributesRetained.java
index 968a2d1..ac46850 100644
--- a/src/classes/share/javax/media/j3d/RenderingAttributesRetained.java
+++ b/src/classes/share/javax/media/j3d/RenderingAttributesRetained.java
@@ -70,9 +70,9 @@ class RenderingAttributesRetained extends NodeComponentRetained {
boolean depthBufferEnable = true;
boolean depthBufferWriteEnable = true;
-
+
float alphaTestValue = 0.0f;
-
+
int alphaTestFunction = RenderingAttributes.ALWAYS;
int depthTestFunction = RenderingAttributes.LESS_OR_EQUAL;
@@ -101,9 +101,9 @@ class RenderingAttributesRetained extends NodeComponentRetained {
static final int LEQUAL = 1;
/**
- * Sets the visibility flag for this RenderingAttributes component object.
+ * Sets the visibility flag for this RenderingAttributes component object.
* @param visible true or false to enable or disable visibility
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @see View#setVisibilityPolicy
@@ -111,19 +111,19 @@ class RenderingAttributesRetained extends NodeComponentRetained {
final void initVisible(boolean state){
visible = state;
}
-
+
/**
* Sets the visibility flag for this RenderingAttributes
* component object. Invisible objects are not rendered (subject to
* the visibility policy for the current view), but they can be picked
* or collided with.
* @param visible true or false to enable or disable visibility
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @see View#setVisibilityPolicy
*/
- final void setVisible(boolean state){
+ final void setVisible(boolean state){
// Optimize : If new state equal to current state, should I simply return ?
// Is it safe ?
initVisible(state);
@@ -136,19 +136,19 @@ class RenderingAttributesRetained extends NodeComponentRetained {
sendMessage(VISIBLE, (state ? Boolean.TRUE: Boolean.FALSE));
}
-
+
/**
* Retrieves the visibility flag for this RenderingAttributes object.
* @return true if the object is visible; false
* if the object is invisible.
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
final boolean getVisible() {
return visible;
}
-
+
/**
* Enables or disables vertex colors for this RenderAttributes
* component object.
@@ -160,7 +160,7 @@ class RenderingAttributesRetained extends NodeComponentRetained {
/**
* Enables or disables vertex colors for this RenderAttributes
- * component object and sends a
+ * component object and sends a
* message notifying the interested structures of the change.
* @param state true or false to enable or disable depth vertex colors
*/
@@ -190,7 +190,7 @@ class RenderingAttributesRetained extends NodeComponentRetained {
/**
* Enables or disables depth buffer mode for this RenderAttributes
- * component object and sends a
+ * component object and sends a
* message notifying the interested structures of the change.
* @param state true or false to enable or disable depth buffer mode
*/
@@ -253,7 +253,7 @@ class RenderingAttributesRetained extends NodeComponentRetained {
alphaTestValue = value;
}
/**
- * Set alpha test value used by alpha test function and sends a
+ * Set alpha test value used by alpha test function and sends a
* message notifying the interested structures of the change.
* This value is compared to the alpha value of each rendered pixel.
* @param value the alpha value
@@ -288,7 +288,7 @@ class RenderingAttributesRetained extends NodeComponentRetained {
/**
- * Set alpha test function and sends a
+ * Set alpha test function and sends a
* message notifying the interested structures of the change.
* This function is used to compare the
* alpha test value with each per-pixel alpha value. If the test
@@ -299,7 +299,7 @@ class RenderingAttributesRetained extends NodeComponentRetained {
* GREATER_OR_EQUAL.
*/
final void setAlphaTestFunction(int function){
-
+
initAlphaTestFunction(function);
sendMessage(ALPHA_TEST_FUNC, new Integer(function));
}
@@ -344,7 +344,7 @@ class RenderingAttributesRetained extends NodeComponentRetained {
/**
* Retrieves current depth test function.
* @return the current depth test function
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
final int getDepthTestFunction(){
@@ -396,7 +396,7 @@ class RenderingAttributesRetained extends NodeComponentRetained {
}
- // Stencil operations
+ // Stencil operations
/**
* Initialize the stencil enable state
*/
@@ -433,7 +433,7 @@ class RenderingAttributesRetained extends NodeComponentRetained {
*/
final void setStencilOp(int failOp, int zFailOp, int zPassOp) {
initStencilOp(failOp, zFailOp, zPassOp);
-
+
ArrayList arrList = new ArrayList(3);
arrList.add(new Integer(failOp));
arrList.add(new Integer(zFailOp));
@@ -465,7 +465,7 @@ class RenderingAttributesRetained extends NodeComponentRetained {
*/
final void setStencilFunction(int function, int refValue, int compareMask) {
initStencilOp(function, refValue, compareMask);
-
+
ArrayList arrList = new ArrayList(3);
arrList.add(new Integer(function));
arrList.add(new Integer(refValue));
@@ -494,7 +494,7 @@ class RenderingAttributesRetained extends NodeComponentRetained {
* Set the stencil write mask
*/
final void setStencilWriteMask(int mask) {
- initStencilWriteMask(mask);
+ initStencilWriteMask(mask);
sendMessage(STENCIL_WRITE_MASK, new Integer(mask));
}
@@ -505,7 +505,7 @@ class RenderingAttributesRetained extends NodeComponentRetained {
return stencilWriteMask;
}
-
+
/**
* Updates the native context.
*/
@@ -516,11 +516,11 @@ class RenderingAttributesRetained extends NodeComponentRetained {
void updateNative(Canvas3D c3d,
boolean depthBufferWriteEnableOverride,
boolean depthBufferEnableOverride) {
- Pipeline.getPipeline().updateRenderingAttributes(c3d.ctx,
+ Pipeline.getPipeline().updateRenderingAttributes(c3d.ctx,
depthBufferWriteEnableOverride, depthBufferEnableOverride,
depthBufferEnable, depthBufferWriteEnable, depthTestFunction,
alphaTestValue, alphaTestFunction, ignoreVertexColors,
- rasterOpEnable, rasterOp, c3d.userStencilAvailable, stencilEnable,
+ rasterOpEnable, rasterOp, c3d.userStencilAvailable, stencilEnable,
stencilFailOp, stencilZFailOp, stencilZPassOp,
stencilFunction, stencilReferenceValue, stencilCompareMask,
stencilWriteMask );
@@ -538,14 +538,14 @@ class RenderingAttributesRetained extends NodeComponentRetained {
mirror = this;
}
else {
- RenderingAttributesRetained mirrorRa
+ RenderingAttributesRetained mirrorRa
= new RenderingAttributesRetained();
mirrorRa.set(this);
mirrorRa.source = source;
mirror = mirrorRa;
}
} else {
- ((RenderingAttributesRetained) mirror).set(this);
+ ((RenderingAttributesRetained) mirror).set(this);
}
}
@@ -558,11 +558,11 @@ class RenderingAttributesRetained extends NodeComponentRetained {
}
/**
- * Update the "component" field of the mirror object with the
+ * Update the "component" field of the mirror object with the
* given "value"
*/
synchronized void updateMirrorObject(int component, Object value) {
- RenderingAttributesRetained mirrorRa = (RenderingAttributesRetained)mirror;
+ RenderingAttributesRetained mirrorRa = (RenderingAttributesRetained)mirror;
if ((component & DEPTH_ENABLE) != 0) {
mirrorRa.depthBufferEnable = ((Boolean)value).booleanValue();
@@ -584,10 +584,10 @@ class RenderingAttributesRetained extends NodeComponentRetained {
}
else if ((component & IGNORE_VCOLOR) != 0) {
mirrorRa.ignoreVertexColors = (((Boolean)value).booleanValue());
- }
+ }
else if ((component & RASTER_OP_ENABLE) != 0) {
mirrorRa.rasterOpEnable = (((Boolean)value).booleanValue());
- }
+ }
else if ((component & RASTER_OP_VALUE) != 0) {
mirrorRa.rasterOp = (((Integer)value).intValue());
}
@@ -615,7 +615,7 @@ class RenderingAttributesRetained extends NodeComponentRetained {
return (this == rr) ||
((rr != null) &&
(rr.depthBufferEnable == depthBufferEnable) &&
- (rr.depthBufferWriteEnable == depthBufferWriteEnable) &&
+ (rr.depthBufferWriteEnable == depthBufferWriteEnable) &&
(rr.alphaTestValue == alphaTestValue) &&
(rr.alphaTestFunction == alphaTestFunction) &&
(rr.visible == visible) &&
@@ -654,11 +654,11 @@ class RenderingAttributesRetained extends NodeComponentRetained {
stencilWriteMask = ra.stencilWriteMask;
}
-
+
final void sendMessage(int attrMask, Object attr) {
ArrayList univList = new ArrayList();
- ArrayList gaList = Shape3DRetained.getGeomAtomsList(mirror.users, univList);
+ ArrayList gaList = Shape3DRetained.getGeomAtomsList(mirror.users, univList);
// Send to rendering attribute structure, regardless of
// whether there are users or not (alternate appearance case ..)
@@ -680,7 +680,7 @@ class RenderingAttributesRetained extends NodeComponentRetained {
if (attrMask == VISIBLE)
createMessage.threads |= J3dThread.UPDATE_GEOMETRY;
createMessage.type = J3dMessage.RENDERINGATTRIBUTES_CHANGED;
-
+
createMessage.universe = (VirtualUniverse) univList.get(i);
createMessage.args[0] = this;
createMessage.args[1]= new Integer(attrMask);
@@ -689,8 +689,8 @@ class RenderingAttributesRetained extends NodeComponentRetained {
ArrayList gL = (ArrayList)gaList.get(i);
GeometryAtom[] gaArr = new GeometryAtom[gL.size()];
gL.toArray(gaArr);
- createMessage.args[3] = gaArr;
-
+ createMessage.args[3] = gaArr;
+
VirtualUniverse.mc.processMessage(createMessage);
}
@@ -699,7 +699,7 @@ class RenderingAttributesRetained extends NodeComponentRetained {
// TODO : Need to handle stencil operation -- Chien
void handleFrequencyChange(int bit) {
int mask = 0;
-
+
if (bit == RenderingAttributes.ALLOW_ALPHA_TEST_VALUE_WRITE)
mask = ALPHA_TEST_VALUE;
if( bit == RenderingAttributes.ALLOW_ALPHA_TEST_FUNCTION_WRITE)
@@ -719,12 +719,12 @@ class RenderingAttributesRetained extends NodeComponentRetained {
mask = DEPTH_TEST_FUNC;
if( bit == RenderingAttributes.ALLOW_DEPTH_TEST_FUNCTION_WRITE)
- mask = STENCIL_ENABLE | STENCIL_OP_VALUES | STENCIL_FUNC |
+ mask = STENCIL_ENABLE | STENCIL_OP_VALUES | STENCIL_FUNC |
STENCIL_WRITE_MASK;
if (mask != 0)
setFrequencyChangeMask(bit, mask);
// System.err.println("changedFreqent2 = "+changedFrequent);
}
-
+
}
diff --git a/src/classes/share/javax/media/j3d/RenderingAttributesStructure.java b/src/classes/share/javax/media/j3d/RenderingAttributesStructure.java
index 118dde7..603edb2 100644
--- a/src/classes/share/javax/media/j3d/RenderingAttributesStructure.java
+++ b/src/classes/share/javax/media/j3d/RenderingAttributesStructure.java
@@ -35,7 +35,7 @@ import java.util.ArrayList;
import java.util.Arrays;
/**
- * A rendering attributes structure is an object that handles
+ * A rendering attributes structure is an object that handles
* NodeComponent object updates.
*/
@@ -50,7 +50,7 @@ class RenderingAttributesStructure extends J3dStructure implements ObjectUpdate
void processMessages(long referenceTime) {
J3dMessage m;
boolean addMirrorObj = false;
-
+
J3dMessage messages[] = getMessages(referenceTime);
int nMsg = getNumMessage();
@@ -90,7 +90,7 @@ class RenderingAttributesStructure extends J3dStructure implements ObjectUpdate
case J3dMessage.TRANSPARENCYATTRIBUTES_CHANGED:
case J3dMessage.MATERIAL_CHANGED:
case J3dMessage.TEXCOORDGENERATION_CHANGED:
- case J3dMessage.SHADER_ATTRIBUTE_CHANGED:
+ case J3dMessage.SHADER_ATTRIBUTE_CHANGED:
case J3dMessage.SHADER_ATTRIBUTE_SET_CHANGED:
{
// System.err.println("2 RAS : J3dMessage type : " + m.type);
@@ -123,7 +123,7 @@ class RenderingAttributesStructure extends J3dStructure implements ObjectUpdate
m.decRefcount();
}
}
- break;
+ break;
case J3dMessage.TEXTUREATTRIBUTES_CHANGED:
{
@@ -141,11 +141,11 @@ class RenderingAttributesStructure extends J3dStructure implements ObjectUpdate
}
}
break;
- case J3dMessage.TEXTURE_CHANGED:
+ case J3dMessage.TEXTURE_CHANGED:
{
NodeComponentRetained nc = (NodeComponentRetained)m.args[0];
nc.mirror.changedFrequent = ((Integer)m.args[3]).intValue();
-
+
objList.add(m);
nc.mirror.compChanged = 1;
addMirrorObj = true;
@@ -165,7 +165,7 @@ class RenderingAttributesStructure extends J3dStructure implements ObjectUpdate
else {
val = ((Integer)m.args[3]).intValue();
geo.cachedChangedFrequent = val;
- m.decRefcount();
+ m.decRefcount();
}
break;
case J3dMessage.MORPH_CHANGED:
@@ -178,12 +178,12 @@ class RenderingAttributesStructure extends J3dStructure implements ObjectUpdate
}
if (addMirrorObj) {
VirtualUniverse.mc.addMirrorObject(this);
- }
+ }
// clear array to prevent memory leaks
Arrays.fill(messages, 0, nMsg, null);
}
-
+
public void updateObject() {
int size = objList.size();
@@ -229,7 +229,7 @@ class RenderingAttributesStructure extends J3dStructure implements ObjectUpdate
private void updateNodeComponent(Object[] args) {
- // System.err.println("RAS : updateNodeComponent : " + this);
+ // System.err.println("RAS : updateNodeComponent : " + this);
NodeComponentRetained n = (NodeComponentRetained)args[0];
n.updateMirrorObject(((Integer)args[1]).intValue(), args[2]);
}
@@ -246,4 +246,4 @@ class RenderingAttributesStructure extends J3dStructure implements ObjectUpdate
}
-
+
diff --git a/src/classes/share/javax/media/j3d/RenderingEnvironmentStructure.java b/src/classes/share/javax/media/j3d/RenderingEnvironmentStructure.java
index b53aa36..f0b378c 100644
--- a/src/classes/share/javax/media/j3d/RenderingEnvironmentStructure.java
+++ b/src/classes/share/javax/media/j3d/RenderingEnvironmentStructure.java
@@ -161,16 +161,16 @@ class RenderingEnvironmentStructure extends J3dStructure implements ObjectUpdate
}
return objs;
}
-
+
void addObjArrayToFreeList(Object[] objs) {
int i;
for (i = 0; i < objs.length; i++)
objs[i] = null;
-
+
objFreeList.add(objs);
}
-
+
public void updateObject() {
@@ -275,14 +275,14 @@ class RenderingEnvironmentStructure extends J3dStructure implements ObjectUpdate
}
m.decRefcount();
}
-
+
if (transformMsg) {
updateTransformChange();
transformMsg = false;
}
-
+
VirtualUniverse.mc.addMirrorObject(this);
-
+
Arrays.fill(messages, 0, nMsg, null);
}
@@ -297,7 +297,7 @@ class RenderingEnvironmentStructure extends J3dStructure implements ObjectUpdate
for (int n = 0; n < ogList.length; n++) {
og = (OrderedGroupRetained)ogList[n];
og.updateChildIdTableInserted(((Integer) ogChildIdList[n]).intValue(),
- ((Integer) ogOrderedIdList[n]).intValue());
+ ((Integer) ogOrderedIdList[n]).intValue());
og.incrChildCount();
}
}
@@ -308,7 +308,7 @@ class RenderingEnvironmentStructure extends J3dStructure implements ObjectUpdate
OrderedGroupRetained og;
int index;
Object[] objs;
-
+
for (int n = 0; n < ogList.length; n++) {
og = (OrderedGroupRetained)ogList[n];
og.updateChildIdTableRemoved(((Integer) ogChildIdList[n]).intValue());
@@ -373,7 +373,7 @@ class RenderingEnvironmentStructure extends J3dStructure implements ObjectUpdate
LightRetained lt;
FogRetained fg;
ModelClipRetained mc;
- ArrayList list;
+ ArrayList list;
for (i=0; iTransformInterpolator.getTransformAxis()
@@ -252,7 +252,7 @@ public class RotPosPathInterpolator extends PathInterpolator {
*/
public void computeTransform(float alphaValue, Transform3D transform) {
double quatDot;
-
+
computePathInterpolation(alphaValue);
if (currentKnotIndex == 0 &&
@@ -299,7 +299,7 @@ public class RotPosPathInterpolator extends PathInterpolator {
tQuat.w = quats[currentKnotIndex].w +
(quats[currentKnotIndex+1].w -
quats[currentKnotIndex].w)*currentInterpolationValue;
- }
+ }
pos.x = positions[currentKnotIndex].x +
(positions[currentKnotIndex+1].x -
positions[currentKnotIndex].x) * currentInterpolationValue;
@@ -310,17 +310,17 @@ public class RotPosPathInterpolator extends PathInterpolator {
(positions[currentKnotIndex+1].z -
positions[currentKnotIndex].z) * currentInterpolationValue;
}
- tQuat.normalize();
-
+ tQuat.normalize();
+
// Set the rotation components
tMat.set(tQuat);
-
+
// Set the translation components.
tMat.m03 = pos.x;
tMat.m13 = pos.y;
tMat.m23 = pos.z;
rotation.set(tMat);
-
+
// construct a Transform3D from: axis * rotation * axisInverse
transform.mul(axis, rotation);
transform.mul(transform, axisInverse);
@@ -353,7 +353,7 @@ public class RotPosPathInterpolator extends PathInterpolator {
* originalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
@@ -373,7 +373,7 @@ public class RotPosPathInterpolator extends PathInterpolator {
super.duplicateAttributes(originalNode, forceDuplicate);
RotPosPathInterpolator ri = (RotPosPathInterpolator) originalNode;
-
+
int len = ri.getArrayLengths();
// No API availble to set array size, so explicitly set it here
diff --git a/src/classes/share/javax/media/j3d/RotPosScalePathInterpolator.java b/src/classes/share/javax/media/j3d/RotPosScalePathInterpolator.java
index 4ff2c2f..db3cdb4 100644
--- a/src/classes/share/javax/media/j3d/RotPosScalePathInterpolator.java
+++ b/src/classes/share/javax/media/j3d/RotPosScalePathInterpolator.java
@@ -41,7 +41,7 @@ import javax.vecmath.Point3f;
* RotPosScalePathInterpolation behavior. This class defines a behavior
* that varies the rotational, translational, and scale components of its
* target TransformGroup by linearly interpolating among a series of
- * predefined knot/position, knot/orientation, and knot/scale pairs
+ * predefined knot/position, knot/orientation, and knot/scale pairs
* (using the value generated by the specified Alpha object). The
* interpolated position, orientation, and scale are used to generate
* a transform in the local coordinate system of this interpolator. The
@@ -65,12 +65,12 @@ public class RotPosScalePathInterpolator extends PathInterpolator {
private float prevInterpolationValue = Float.NaN;
- // We can't use a boolean flag since it is possible
+ // We can't use a boolean flag since it is possible
// that after alpha change, this procedure only run
// once at alpha.finish(). So the best way is to
// detect alpha value change.
private float prevAlphaValue = Float.NaN;
- private WakeupCriterion passiveWakeupCriterion =
+ private WakeupCriterion passiveWakeupCriterion =
(WakeupCriterion) new WakeupOnElapsedFrames(0, true);
// non-public, default constructor used by cloneNode
@@ -80,7 +80,7 @@ public class RotPosScalePathInterpolator extends PathInterpolator {
/**
* Constructs a new RotPosScalePathInterpolator object that varies the
- * rotation, translation, and scale of the target TransformGroup's
+ * rotation, translation, and scale of the target TransformGroup's
* transform.
* @param alpha the alpha object for this interpolator.
* @param target the TransformGroup node affected by this interpolator.
@@ -110,13 +110,13 @@ public class RotPosScalePathInterpolator extends PathInterpolator {
if (knots.length != scales.length)
throw new IllegalArgumentException(J3dI18N.getString("RotPosScalePathInterpolator2"));
-
+
setPathArrays(quats, positions, scales);
}
/**
- * Sets the quat value at the specified index for this
+ * Sets the quat value at the specified index for this
* interpolator.
* @param index the index to be changed
* @param quat the new quat value at index
@@ -137,7 +137,7 @@ public class RotPosScalePathInterpolator extends PathInterpolator {
/**
- * Sets the position value at the specified index for
+ * Sets the position value at the specified index for
* this interpolator.
* @param index the index to be changed
* @param position the new position value at index
@@ -285,11 +285,11 @@ public class RotPosScalePathInterpolator extends PathInterpolator {
* @deprecated As of Java 3D version 1.3, replaced by
* TransformInterpolator.setTransformAxis(Transform3D)
*/
-
+
public void setAxisOfRotPosScale(Transform3D axisOfRotPosScale) {
setTransformAxis(axisOfRotPosScale);
}
-
+
/**
* @deprecated As of Java 3D version 1.3, replaced by
* TransformInterpolator.geTransformAxis()
@@ -314,9 +314,9 @@ public class RotPosScalePathInterpolator extends PathInterpolator {
float scale;
double quatDot;
-
+
computePathInterpolation(alphaValue);
-
+
if (currentKnotIndex == 0 &&
currentInterpolationValue == 0f) {
tQuat.x = quats[0].x;
@@ -362,7 +362,7 @@ public class RotPosScalePathInterpolator extends PathInterpolator {
tQuat.w = quats[currentKnotIndex].w +
(quats[currentKnotIndex+1].w -
quats[currentKnotIndex].w)*currentInterpolationValue;
- }
+ }
pos.x = positions[currentKnotIndex].x +
(positions[currentKnotIndex+1].x -
positions[currentKnotIndex].x) * currentInterpolationValue;
@@ -376,21 +376,21 @@ public class RotPosScalePathInterpolator extends PathInterpolator {
(scales[currentKnotIndex+1] -
scales[currentKnotIndex]) * currentInterpolationValue;
}
- tQuat.normalize();
-
+ tQuat.normalize();
+
sMat.set(scale);
tMat.set(tQuat);
tMat.mul(sMat);
// Set the translation components.
-
+
tMat.m03 = pos.x;
tMat.m13 = pos.y;
tMat.m23 = pos.z;
rotation.set(tMat);
-
+
// construct a Transform3D from: axis * rotation * axisInverse
transform.mul(axis, rotation);
- transform.mul(transform, axisInverse);
+ transform.mul(transform, axisInverse);
}
/**
@@ -419,7 +419,7 @@ public class RotPosScalePathInterpolator extends PathInterpolator {
* originalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
@@ -439,9 +439,9 @@ public class RotPosScalePathInterpolator extends PathInterpolator {
super.duplicateAttributes(originalNode, forceDuplicate);
- RotPosScalePathInterpolator ri =
+ RotPosScalePathInterpolator ri =
(RotPosScalePathInterpolator) originalNode;
-
+
int len = ri.getArrayLengths();
// No API available to change size of array, so set here explicitly
diff --git a/src/classes/share/javax/media/j3d/RotationInterpolator.java b/src/classes/share/javax/media/j3d/RotationInterpolator.java
index 8d319ff..05e31a8 100644
--- a/src/classes/share/javax/media/j3d/RotationInterpolator.java
+++ b/src/classes/share/javax/media/j3d/RotationInterpolator.java
@@ -47,14 +47,14 @@ public class RotationInterpolator extends TransformInterpolator {
float maximumAngle;
private Transform3D rotation = new Transform3D();
- // We can't use a boolean flag since it is possible
+ // We can't use a boolean flag since it is possible
// that after alpha change, this procedure only run
// once at alpha.finish(). So the best way is to
// detect alpha value change.
private float prevAlphaValue = Float.NaN;
- private WakeupCriterion passiveWakeupCriterion =
+ private WakeupCriterion passiveWakeupCriterion =
(WakeupCriterion) new WakeupOnElapsedFrames(0, true);
-
+
// non-public, default constructor used by cloneNode
RotationInterpolator() {
}
@@ -104,7 +104,7 @@ public class RotationInterpolator extends TransformInterpolator {
}
/**
- * This method retrieves this interpolator's minimumAngle, in
+ * This method retrieves this interpolator's minimumAngle, in
* radians.
* @return the interpolator's minimal angle value
*/
@@ -122,7 +122,7 @@ public class RotationInterpolator extends TransformInterpolator {
}
/**
- * This method retrieves this interpolator's maximumAngle, in
+ * This method retrieves this interpolator's maximumAngle, in
* radians.
* @return the interpolator's maximal angle value
*/
@@ -137,7 +137,7 @@ public class RotationInterpolator extends TransformInterpolator {
public void setAxisOfRotation(Transform3D axisOfRotation) {
setTransformAxis(axisOfRotation);
}
-
+
/**
* @deprecated As of Java 3D version 1.3, replaced by
* TransformInterpolator.getTransformAxis()
@@ -145,7 +145,7 @@ public class RotationInterpolator extends TransformInterpolator {
public Transform3D getAxisOfRotation() {
return getTransformAxis();
}
-
+
/**
* Computes the new transform for this interpolator for a given
* alpha value.
@@ -191,7 +191,7 @@ public class RotationInterpolator extends TransformInterpolator {
* originalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
@@ -211,7 +211,7 @@ public class RotationInterpolator extends TransformInterpolator {
super.duplicateAttributes(originalNode, forceDuplicate);
RotationInterpolator ri = (RotationInterpolator) originalNode;
-
+
setMinimumAngle(ri.getMinimumAngle());
setMaximumAngle(ri.getMaximumAngle());
diff --git a/src/classes/share/javax/media/j3d/RotationPathInterpolator.java b/src/classes/share/javax/media/j3d/RotationPathInterpolator.java
index 0f6803c..f722b27 100644
--- a/src/classes/share/javax/media/j3d/RotationPathInterpolator.java
+++ b/src/classes/share/javax/media/j3d/RotationPathInterpolator.java
@@ -55,13 +55,13 @@ public class RotationPathInterpolator extends PathInterpolator {
private Quat4f quats[];
private float prevInterpolationValue = Float.NaN;
- // We can't use a boolean flag since it is possible
+ // We can't use a boolean flag since it is possible
// that after alpha change, this procedure only run
// once at alpha.finish(). So the best way is to
// detect alpha value change.
private float prevAlphaValue = Float.NaN;
- private WakeupCriterion passiveWakeupCriterion =
- (WakeupCriterion) new WakeupOnElapsedFrames(0, true);
+ private WakeupCriterion passiveWakeupCriterion =
+ (WakeupCriterion) new WakeupOnElapsedFrames(0, true);
// non-public, default constructor used by cloneNode
RotationPathInterpolator() {
}
@@ -170,7 +170,7 @@ public class RotationPathInterpolator extends PathInterpolator {
public void setAxisOfRotation(Transform3D axisOfRotation) {
setTransformAxis(axisOfRotation);
}
-
+
/**
* @deprecated As of Java 3D version 1.3, replaced by
* TransformInterpolator.getTransformAxis()
@@ -178,7 +178,7 @@ public class RotationPathInterpolator extends PathInterpolator {
public Transform3D getAxisOfRotation() {
return getTransformAxis();
}
-
+
// The RotationPathInterpolator's initialize routine uses the default
// initialization routine.
@@ -198,7 +198,7 @@ public class RotationPathInterpolator extends PathInterpolator {
double quatDot;
computePathInterpolation(alphaValue);
// For RPATH, take quaternion average and set rotation in TransformGroup
-
+
if (currentKnotIndex == 0 &&
currentInterpolationValue == 0f) {
tQuat.x = quats[0].x;
@@ -240,12 +240,12 @@ public class RotationPathInterpolator extends PathInterpolator {
tQuat.w = quats[currentKnotIndex].w +
(quats[currentKnotIndex+1].w -
quats[currentKnotIndex].w)*currentInterpolationValue;
- }
+ }
}
-
- tQuat.normalize();
+
+ tQuat.normalize();
rotation.set(tQuat);
-
+
// construct a Transform3D from: axis * rotation * axisInverse
transform.mul(axis, rotation);
transform.mul(transform, axisInverse);
@@ -277,7 +277,7 @@ public class RotationPathInterpolator extends PathInterpolator {
* originalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
@@ -296,7 +296,7 @@ public class RotationPathInterpolator extends PathInterpolator {
void duplicateAttributes(Node originalNode, boolean forceDuplicate) {
super.duplicateAttributes(originalNode, forceDuplicate);
- RotationPathInterpolator ri =
+ RotationPathInterpolator ri =
(RotationPathInterpolator) originalNode;
int len = ri.getArrayLengths();
diff --git a/src/classes/share/javax/media/j3d/ScaleInterpolator.java b/src/classes/share/javax/media/j3d/ScaleInterpolator.java
index 41645b2..cb0e4eb 100644
--- a/src/classes/share/javax/media/j3d/ScaleInterpolator.java
+++ b/src/classes/share/javax/media/j3d/ScaleInterpolator.java
@@ -48,12 +48,12 @@ public class ScaleInterpolator extends TransformInterpolator {
private Transform3D scale = new Transform3D();
- // We can't use a boolean flag since it is possible
+ // We can't use a boolean flag since it is possible
// that after alpha change, this procedure only run
// once at alpha.finish(). So the best way is to
// detect alpha value change.
private float prevAlphaValue = Float.NaN;
- private WakeupCriterion passiveWakeupCriterion =
+ private WakeupCriterion passiveWakeupCriterion =
(WakeupCriterion) new WakeupOnElapsedFrames(0, true);
// non-public, default constructor used by cloneNode
@@ -62,8 +62,8 @@ public class ScaleInterpolator extends TransformInterpolator {
/**
* Constructs a trivial scale interpolator that varies its target
- * TransformGroup node between the two specified alpha values
- * using the specified alpha, an identity matrix,
+ * TransformGroup node between the two specified alpha values
+ * using the specified alpha, an identity matrix,
* a minimum scale = 0.1f, and a maximum scale = 1.0f.
* @param alpha the alpha object for this interpolator
* @param target the TransformGroup node affected by this interpolator
@@ -77,9 +77,9 @@ public class ScaleInterpolator extends TransformInterpolator {
}
/**
- * Constructs a new scaleInterpolator object that varies its target
+ * Constructs a new scaleInterpolator object that varies its target
* TransformGroup node's scale component between two scale values
- * (minimumScale and maximumScale).
+ * (minimumScale and maximumScale).
* @param alpha the alpha object for this interpolator
* @param target the TransformGroup node affected by this interpolator
* @param axisOfTransform the transform that defines the local coordinate
@@ -98,7 +98,7 @@ public class ScaleInterpolator extends TransformInterpolator {
this.minimumScale = minimumScale;
this.maximumScale = maximumScale;
- }
+ }
/**
* This method sets the minimumScale for this interpolator.
@@ -139,7 +139,7 @@ public class ScaleInterpolator extends TransformInterpolator {
public void setAxisOfScale(Transform3D axisOfScale) {
setTransformAxis(axisOfScale);
}
-
+
/**
* @deprecated As of Java 3D version 1.3, replaced by
* TransformInterpolator.getTransformAxis()
@@ -195,7 +195,7 @@ public class ScaleInterpolator extends TransformInterpolator {
* originalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
@@ -214,7 +214,7 @@ public class ScaleInterpolator extends TransformInterpolator {
void duplicateAttributes(Node originalNode, boolean forceDuplicate) {
super.duplicateAttributes(originalNode, forceDuplicate);
-
+
ScaleInterpolator si = (ScaleInterpolator) originalNode;
setMinimumScale(si.getMinimumScale());
diff --git a/src/classes/share/javax/media/j3d/SceneGraphCycleException.java b/src/classes/share/javax/media/j3d/SceneGraphCycleException.java
index be07db8..cd55116 100644
--- a/src/classes/share/javax/media/j3d/SceneGraphCycleException.java
+++ b/src/classes/share/javax/media/j3d/SceneGraphCycleException.java
@@ -33,7 +33,7 @@ package javax.media.j3d;
/**
* Indicates a graph that contains a cycle.
- * Java 3D scene graphs are directed acyclic graphs and, as such, do not
+ * Java 3D scene graphs are directed acyclic graphs and, as such, do not
* permit cycles.
* This exception is thrown when a graph containing a cycle:
*
diff --git a/src/classes/share/javax/media/j3d/SceneGraphObject.java b/src/classes/share/javax/media/j3d/SceneGraphObject.java
index 6944cad..08508d2 100644
--- a/src/classes/share/javax/media/j3d/SceneGraphObject.java
+++ b/src/classes/share/javax/media/j3d/SceneGraphObject.java
@@ -171,7 +171,7 @@ public abstract class SceneGraphObject extends Object {
capabilityBits |= (1L << bit);
retained.handleFrequencyChange(bit);
-
+
}
/**
@@ -301,7 +301,7 @@ public abstract class SceneGraphObject extends Object {
* allowed by the object's capability bits are allowed.
* @return true if node is part of a compiled scene graph, else false
*/
-
+
public final boolean isCompiled() {
return this.compiled;
}
@@ -370,7 +370,7 @@ public abstract class SceneGraphObject extends Object {
/**
* Callback used to allow a node to check if any scene graph objects
- * referenced by that node have been duplicated via a call to
+ * referenced by that node have been duplicated via a call to
*
cloneTree
.
* This method is called by cloneTree
after all nodes in
* the sub-graph have been duplicated. The cloned Leaf
@@ -417,7 +417,7 @@ public abstract class SceneGraphObject extends Object {
* @return the name of this object
*
* @since Java 3D 1.4
- */
+ */
public String getName() {
return objectName;
}
@@ -448,12 +448,12 @@ public abstract class SceneGraphObject extends Object {
/**
- * If forceDuplicate
is true
or
+ * If forceDuplicate
is true
or
* duplicateOnCloneTree
flag is true. This procedure
* will return a clone of originalNode or the value in
- * in nodeHashtable
if found. Otherwise return
+ * in nodeHashtable
if found. Otherwise return
* originalNode
- *
+ *
* This method is called from the
* duplicateAttributes
method during cloneNodeComponent.
*
@@ -463,16 +463,16 @@ public abstract class SceneGraphObject extends Object {
* false
, the value of each node's
* duplicateOnCloneTree
variable determines whether
* NodeComponent data is duplicated or copied.
- * @param nodeHashtable is used to keep track of mapping between old and
+ * @param nodeHashtable is used to keep track of mapping between old and
* new node references.
*/
NodeComponent getNodeComponent(NodeComponent originalNodeComponent,
boolean forceDuplicate,
Hashtable hashtable) {
if ((originalNodeComponent != null) &&
- (forceDuplicate ||
+ (forceDuplicate ||
originalNodeComponent.duplicateChild())) {
- NodeComponent nc = (NodeComponent)
+ NodeComponent nc = (NodeComponent)
hashtable.get(originalNodeComponent);
if (nc == null) {
originalNodeComponent.nodeHashtable = hashtable;
@@ -481,7 +481,7 @@ public abstract class SceneGraphObject extends Object {
cloneNodeComponent(forceDuplicate);
} catch (RuntimeException e) {
// must reset nodeHashtable in any case
- originalNodeComponent.nodeHashtable = null;
+ originalNodeComponent.nodeHashtable = null;
throw e;
}
originalNodeComponent.nodeHashtable = null;
diff --git a/src/classes/share/javax/media/j3d/SceneGraphObjectRetained.java b/src/classes/share/javax/media/j3d/SceneGraphObjectRetained.java
index 64cf052..1e25cda 100644
--- a/src/classes/share/javax/media/j3d/SceneGraphObjectRetained.java
+++ b/src/classes/share/javax/media/j3d/SceneGraphObjectRetained.java
@@ -94,7 +94,7 @@ abstract class SceneGraphObjectRetained extends IndexedObject
boolean isInSetLive() {
return inSetLive;
}
-
+
/**
* Makes the internal node live.
*/
@@ -119,7 +119,7 @@ abstract class SceneGraphObjectRetained extends IndexedObject
/**
* Makes the internal node not live
*/
- void clearLive(VirtualUniverse univ, int index,
+ void clearLive(VirtualUniverse univ, int index,
boolean sharedGroup, HashKey [] keys) {
inBackgroundGroup = false;
this.source.clearLive();
@@ -154,7 +154,7 @@ abstract class SceneGraphObjectRetained extends IndexedObject
void mergeTransform(TransformGroupRetained xform) {
}
-
+
void traverse(boolean sameLevel, int level) {
System.err.println();
@@ -164,7 +164,7 @@ abstract class SceneGraphObjectRetained extends IndexedObject
System.err.print(this);
}
- /**
+ /**
* true if component can't be read or written after compile or setlive()
*/
boolean isStatic() {
@@ -174,7 +174,7 @@ abstract class SceneGraphObjectRetained extends IndexedObject
protected Object clone() {
try {
return super.clone();
- } catch (CloneNotSupportedException e) {
+ } catch (CloneNotSupportedException e) {
return null;
}
}
diff --git a/src/classes/share/javax/media/j3d/SceneGraphPath.java b/src/classes/share/javax/media/j3d/SceneGraphPath.java
index 5995cce..11a1e69 100644
--- a/src/classes/share/javax/media/j3d/SceneGraphPath.java
+++ b/src/classes/share/javax/media/j3d/SceneGraphPath.java
@@ -127,7 +127,7 @@ public class SceneGraphPath {
/**
- * Constructs a new SceneGraphPath object
+ * Constructs a new SceneGraphPath object
* @param sgp the SceneGraphPath to copy from
*/
SceneGraphPath(SceneGraphPath sgp) {
@@ -173,7 +173,7 @@ public class SceneGraphPath {
* the Locale to the terminal node
*/
public final void setNodes(Node nodes[]) {
-
+
if(nodes != null && nodes.length > 0) {
interior = new Node[nodes.length];
for (int i = 0; i < nodes.length; i++)
@@ -200,7 +200,7 @@ public class SceneGraphPath {
/**
* Sets the transform component of this SceneGraphPath to the value of
* the passed transform.
- * @param trans the transform to be copied. trans should be the
+ * @param trans the transform to be copied. trans should be the
* localToVworld matrix of this SceneGraphPath object.
*/
public final void setTransform(Transform3D trans) {
@@ -215,7 +215,7 @@ public class SceneGraphPath {
* coordinate transform for this scene graph object at the
* time of the pick or collision is recorded.
* @return the local to VWorld transform
- */
+ */
public final Transform3D getTransform() {
return new Transform3D(transform);
}
@@ -254,7 +254,7 @@ public class SceneGraphPath {
*/
public final Node getNode(int index) {
if(interior == null)
- throw new
+ throw new
ArrayIndexOutOfBoundsException(J3dI18N.getString("SceneGraphPath1"));
return interior[index];
}
@@ -269,21 +269,21 @@ public class SceneGraphPath {
public boolean equals(SceneGraphPath testPath) {
boolean result = true;
try {
-
+
if(testPath == null || root != testPath.root || item != testPath.item)
return false;
-
+
result = transform.equals(testPath.transform);
-
+
if(result == false)
return false;
if(interior == null || testPath.interior == null) {
- if(interior != testPath.interior)
+ if(interior != testPath.interior)
return false;
- else
+ else
result = (root == testPath.root && item == testPath.item);
-
+
} else {
if (interior.length == testPath.interior.length) {
for (int i = 0; i < interior.length; i++)
@@ -294,10 +294,10 @@ public class SceneGraphPath {
else
return false;
}
-
+
}
catch (NullPointerException e2) {return false;}
-
+
return result;
}
@@ -315,18 +315,18 @@ public class SceneGraphPath {
SceneGraphPath testPath = (SceneGraphPath)o1;
if(testPath == null || root != testPath.root || item != testPath.item)
return false;
-
+
result = transform.equals(testPath.transform);
-
+
if(result == false)
return false;
-
+
if(interior == null || testPath.interior == null) {
- if(interior != testPath.interior)
+ if(interior != testPath.interior)
return false;
- else
+ else
result = (root == testPath.root && item == testPath.item);
-
+
} else {
if (interior.length == testPath.interior.length) {
for (int i = 0; i < interior.length; i++)
@@ -337,14 +337,14 @@ public class SceneGraphPath {
else
return false;
}
-
+
return result;
}
catch (NullPointerException e2) {return false;}
catch (ClassCastException e1) {return false;}
}
-
-
+
+
/**
* Returns a hash number based on the data values in this
* object. Two different SceneGraphPath objects with identical data
@@ -355,8 +355,8 @@ public class SceneGraphPath {
*/
public int hashCode() {
HashKey key = new HashKey(250);
- // NOTE: Needed to add interior != null because this method is called
- // by object.toString() when interior is null.
+ // NOTE: Needed to add interior != null because this method is called
+ // by object.toString() when interior is null.
if(interior != null && item != null) {
for(int i=0; ifalse
, the value of each node's
* duplicateOnCloneTree
variable determines whether
* NodeComponent data is duplicated or copied.
- * @exception ClassCastException if originalNode is not an instance of
+ * @exception ClassCastException if originalNode is not an instance of
* Shape3D
*
* @see Node#cloneTree
@@ -719,7 +719,7 @@ public class Shape3D extends Leaf {
* @see NodeComponent#setDuplicateOnCloneTree
*/
public void duplicateNode(Node originalNode, boolean forceDuplicate) {
- checkDuplicateNode(originalNode, forceDuplicate);
+ checkDuplicateNode(originalNode, forceDuplicate);
}
@@ -746,26 +746,26 @@ public class Shape3D extends Leaf {
* @see NodeComponent#setDuplicateOnCloneTree
*/
void duplicateAttributes(Node originalNode, boolean forceDuplicate) {
-
+
super.duplicateAttributes(originalNode, forceDuplicate);
Shape3DRetained attr = (Shape3DRetained) originalNode.retained;
Shape3DRetained rt = (Shape3DRetained) retained;
rt.setAppearance((Appearance) getNodeComponent(
- attr.getAppearance(),
+ attr.getAppearance(),
forceDuplicate,
originalNode.nodeHashtable));
int num = attr.numGeometries(id);
if (num > 0) {
rt.setGeometry((Geometry) getNodeComponent(
attr.getGeometry(0, id),
- forceDuplicate,
+ forceDuplicate,
originalNode.nodeHashtable), 0);
for(int i=1; i< num; i++) {
rt.addGeometry((Geometry) getNodeComponent(
attr.getGeometry(i, id),
- forceDuplicate,
+ forceDuplicate,
originalNode.nodeHashtable));
}
}
@@ -789,6 +789,6 @@ public class Shape3D extends Leaf {
return ((Shape3DRetained)this.retained).getBounds();
}
-
+
}
diff --git a/src/classes/share/javax/media/j3d/Shape3DCompileRetained.java b/src/classes/share/javax/media/j3d/Shape3DCompileRetained.java
index 9a650d8..c87e141 100644
--- a/src/classes/share/javax/media/j3d/Shape3DCompileRetained.java
+++ b/src/classes/share/javax/media/j3d/Shape3DCompileRetained.java
@@ -41,14 +41,14 @@ class Shape3DCompileRetained extends Shape3DRetained {
int numShapes = 0;
-
+
// Each element in the arraylist is an array of geometries for a
- // particular merged shape
+ // particular merged shape
ArrayList geometryInfo = null;
Object[] srcList = null;
-
+
Shape3DCompileRetained(Shape3DRetained[] shapes, int nShapes, int compileFlags) {
int i, j;
Shape3DRetained shape;
@@ -70,7 +70,7 @@ class Shape3DCompileRetained extends Shape3DRetained {
boundsAutoCompute = shapes[0].boundsAutoCompute;
source = shapes[0].source;
}
-
+
// Remove the null that was added by Shape3DRetained constructor
geometryList.remove(0);
int geoIndex = 0;
@@ -85,11 +85,11 @@ class Shape3DCompileRetained extends Shape3DRetained {
appearance = shapes[0].appearance;
collisionBound = shapes[0].collisionBound;
localBounds = shapes[0].localBounds;
-
+
if ((compileFlags & CompileState.GEOMETRY_READ) != 0)
geometryInfo = new ArrayList();
-
+
for (i = 0; i < nShapes; i++) {
shape = shapes[i];
((Shape3D)shape.source).id = i;
@@ -121,7 +121,7 @@ class Shape3DCompileRetained extends Shape3DRetained {
}
}
-
+
// Point to the geometryList's source, so the
// retained side will be garbage collected
if ((compileFlags & CompileState.GEOMETRY_READ) != 0) {
@@ -369,7 +369,7 @@ class Shape3DCompileRetained extends Shape3DRetained {
break;
}
}
-
+
}
@@ -377,7 +377,7 @@ class Shape3DCompileRetained extends Shape3DRetained {
Bounds getCollisionBounds(int childIndex) {
return collisionBound;
}
-
+
int numGeometries(int childIndex) {
ArrayList geo = (ArrayList) geometryInfo.get(childIndex);
@@ -389,17 +389,17 @@ class Shape3DCompileRetained extends Shape3DRetained {
ArrayList geoInfo = (ArrayList) geometryInfo.get(childIndex);
return (Geometry)geoInfo.get(i);
-
+
}
Enumeration getAllGeometries(int childIndex) {
ArrayList geoInfo = (ArrayList) geometryInfo.get(childIndex);
Vector geomList = new Vector();
-
+
for(int i=0; ipath
is
* invalid.
*/
-
+
boolean intersect(SceneGraphPath path,
PickShape pickShape, double[] dist) {
-
+
int flags;
PickInfo pickInfo = new PickInfo();
-
+
Transform3D localToVworld = path.getTransform();
if (localToVworld == null) {
- throw new IllegalArgumentException(J3dI18N.getString("Shape3DRetained3"));
+ throw new IllegalArgumentException(J3dI18N.getString("Shape3DRetained3"));
}
pickInfo.setLocalToVWorldRef( localToVworld);
//System.err.println("Shape3DRetained.intersect() : ");
@@ -742,27 +742,27 @@ class Shape3DRetained extends LeafRetained {
//System.err.println(" no dist request ....");
return intersect(pickInfo, pickShape, 0);
}
-
+
flags = PickInfo.CLOSEST_DISTANCE;
if (intersect(pickInfo, pickShape, flags)) {
dist[0] = pickInfo.getClosestDistance();
return true;
}
-
+
return false;
-
+
}
/**
* This sets the immedate mode context flag
- */
+ */
void setInImmCtx(boolean inCtx) {
inImmCtx = inCtx;
}
/**
* This gets the immedate mode context flag
- */
+ */
boolean getInImmCtx() {
return (inImmCtx);
}
@@ -774,7 +774,7 @@ class Shape3DRetained extends LeafRetained {
private void initMirrorShape3D(SetLiveState s, Shape3DRetained ms, int index) {
// New 1.2.1 code
-
+
ms.inBackgroundGroup = inBackgroundGroup;
ms.geometryBackground = geometryBackground;
ms.source = source;
@@ -808,9 +808,9 @@ class Shape3DRetained extends LeafRetained {
ms.appearanceOverrideEnable = appearanceOverrideEnable;
-
+
ms.geometryList = geometryList;
-
+
// Assign the parent of this mirror shape node
ms.sourceNode = this;
@@ -823,13 +823,13 @@ class Shape3DRetained extends LeafRetained {
oms.initConstantScaleEnable(os.constantScale);
oms.initScale(os.scaleFactor);
}
-
+
}
void updateImmediateMirrorObject(Object[] objs) {
int component = ((Integer)objs[1]).intValue();
GeometryArrayRetained ga;
-
+
Shape3DRetained[] msArr = (Shape3DRetained[]) objs[2];
int i, j;
if ((component & APPEARANCE_CHANGED) != 0) {
@@ -854,7 +854,7 @@ class Shape3DRetained extends LeafRetained {
* Gets the bounding object of a node.
* @return the node's bounding object
*/
-
+
Bounds getBounds() {
if(boundsAutoCompute) {
@@ -866,10 +866,10 @@ class Shape3DRetained extends LeafRetained {
if(geometryList != null) {
BoundingBox bbox = new BoundingBox((Bounds) null);
- GeometryRetained geometry;
+ GeometryRetained geometry;
for(int i=0; iAssociated with each Sound node is a MediaContainer
* which includes audio data and information about this data.
* This data can be cached (buffered) or non-cached (unbuffered or streaming).
- * If an AudioDevice has been attached to the PhysicalEnvironment, the sound
+ * If an AudioDevice has been attached to the PhysicalEnvironment, the sound
* data is made ready to begin playing.
* Certain functionality can not be applied to true streaming sound data:
@@ -58,24 +58,24 @@ package javax.media.j3d;
*This gain is a scale factor applied to the sound data associated
+ *
This gain is a scale factor applied to the sound data associated
* with this sound source to increase or decrease its overall amplitude.
*Data for non-streaming sound (such as a sound sample) can contain two
* loop points marking a section of the data that is to be looped a specific
- * number of times. Thus sound data can be divided into three segments:
+ * number of times. Thus sound data can be divided into three segments:
* the attack (before the begin loop point), the sustain (between the begin
- * and end loop points), and the release (after the end loop point). If
+ * and end loop points), and the release (after the end loop point). If
* there are no loop begin and end points defined as part of the sound data,
* the begin loop point is set at the beginning of the sound data,
* and the end loop point at the end of the sound data.
- * If this is the case, looping the sound would mean repeating the whole
- * sound. However, these allow a portion in the middle of the sound to
+ * If this is the case, looping the sound would mean repeating the whole
+ * sound. However, these allow a portion in the middle of the sound to
* be looped.
*
When a sound is disabled, its playback would normally stop immediately
- * no matter what part of the sound data was currently being played. By
+ *
When a sound is disabled, its playback would normally stop immediately
+ * no matter what part of the sound data was currently being played. By
* setting the Release Flag to true for nodes with non-streaming sound data,
- * the sound is allowed to play from its current position in the sound data
+ * the sound is allowed to play from its current position in the sound data
* to the end of the data (without repeats), thus playing the release portion
* of the sound before stopping.
*For some applications, it's useful to turn a sound source "off" but to
+ *
*For some applications, it's useful to turn a sound source "off" but to
* continue "silently" playing the sound so that when it is turned back "on"
- * the sound picks up playing in the same location (over time) as it would
- * have been if the sound had never been disabled (turned off). Setting the
- * Continuous flag true causes the sound renderer to keep track of where
+ * the sound picks up playing in the same location (over time) as it would
+ * have been if the sound had never been disabled (turned off). Setting the
+ * Continuous flag true causes the sound renderer to keep track of where
* (over time) the sound would be playing even when the sound is disabled.
*When the pause state is set true, a playing sound is paused.
*
*
- * A Sound is scheduled for activation when its scheduling region intersects
- * the ViewPlatform's activation volume. This is used when the scheduling
+ * A Sound is scheduled for activation when its scheduling region intersects
+ * the ViewPlatform's activation volume. This is used when the scheduling
* bounding leaf is set to null.
*When set to a value other than null, the scheduling bounding leaf
+ *
+ *
When set to a value other than null, the scheduling bounding leaf
* region overrides the scheduling bounds
* object.
*Sound Priority is used
* to rank concurrently playing sounds in order of importance during playback.
* When more sounds are started than the AudioDevice
- * can handle, the sound node with the lowest priority ranking is
+ * can handle, the sound node with the lowest priority ranking is
* deactivated (but continues playing silently). If a sound is deactivated
- * (due to a sound with a higher
+ * (due to a sound with a higher
* priority being started), it is automatically re-activated when
- * resources become available (e.g., when a sound with a higher priority
+ * resources become available (e.g., when a sound with a higher priority
* finishes playing), or when the ordering of sound nodes are changed due to
* a change in a sound node's priority.
*
* Each sound has a length of time in milliseconds that it
+ *
+ *
*
@@ -704,7 +704,7 @@ abstract class SoundRetained extends LeafRetained
else
if (atom.loadStatus == SoundRetained.LOAD_COMPLETE) {
atomFoundReady = true;
- continue;
+ continue;
}
else
return false;
@@ -723,11 +723,11 @@ abstract class SoundRetained extends LeafRetained
* true only if the following are true for the given view:
*
* Each sound has a length of time in milliseconds that it
* can run (including repeating loop section)
* if it plays to completion. If the sound
* media type is streaming, or if the sound is looped indefinitely, then a
@@ -197,7 +197,7 @@ package javax.media.j3d;
*
*
*When a sound is started, it could use more than one channel on the
* selected AudioDevice it is to be played on. The number of Audio Device
- * channels currently used for a sound can be queried using
+ * channels currently used for a sound can be queried using
* getNumberOfChannelsUsed().
*
* 3) is enabled while it mute state is true
*originalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
diff --git a/src/classes/share/javax/media/j3d/SoundRenderer.java b/src/classes/share/javax/media/j3d/SoundRenderer.java
index c51b5fe..9c9f249 100644
--- a/src/classes/share/javax/media/j3d/SoundRenderer.java
+++ b/src/classes/share/javax/media/j3d/SoundRenderer.java
@@ -59,7 +59,7 @@ class SoundRenderer extends Object {
else
System.err.println("AuralAttributes is null");
}
-
+
void update(SoundRetained sound, SoundscapeRetained ss) {
AuralAttributesRetained aa = ss.attributes.mirrorAa;
@@ -74,7 +74,7 @@ class SoundRenderer extends Object {
System.err.println("Soundscape is " + ss);
}
}
-
+
void deactivate(SoundRetained sound) {
if (false) {
if (sound instanceof BackgroundSoundRetained) {
@@ -86,9 +86,9 @@ class SoundRenderer extends Object {
}
}
}
-
+
public String toString() {
return "";
}
-
+
}
diff --git a/src/classes/share/javax/media/j3d/SoundRetained.java b/src/classes/share/javax/media/j3d/SoundRetained.java
index 57307b0..cf66692 100644
--- a/src/classes/share/javax/media/j3d/SoundRetained.java
+++ b/src/classes/share/javax/media/j3d/SoundRetained.java
@@ -40,7 +40,7 @@ import java.util.ArrayList;
* SoundRetained is an abstract class that contains instance varables common
* to all retained sounds.
*/
-
+
abstract class SoundRetained extends LeafRetained
{
@@ -51,45 +51,45 @@ abstract class SoundRetained extends LeafRetained
/**
* sound data associated with sound source
- */
+ */
MediaContainer soundData = null;
/**
* Overall Scale Factor applied to sound.
- */
+ */
float initialGain = 1.0f; // Valid values are >= 0.0.
/**
* Number of times sound is looped/repeated during play
- */
+ */
int loopCount = 0; // Range from 0 to POSITIVE_INFINITY(-1)
/**
* Switch for turning sound on or off while the sound is "active"
- */
+ */
boolean enable = false;
/**
* Type of release when sound is disabled.
* If true, sound plays thru to end of sample before disabled
* Otherwise, sound is disabled immediately.
- */
+ */
boolean release = false;
/**
* Flag denoting if sound silently continues playing when it's deactivated.
- */
+ */
boolean continuous = false;
/**
* Flag denoting if sound is explicitly muted, so that if begins playing
* it will be played silently.
- */
+ */
boolean mute = false;
/**
* Flag denoting if sound is paused from playing - waiting to be resumed
- */
+ */
boolean pause = false;
/**
@@ -109,7 +109,7 @@ abstract class SoundRetained extends LeafRetained
*/
Bounds schedulingRegion = null;
- /**
+ /**
* The bounding leaf reference
*/
BoundingLeafRetained boundingLeaf = null;
@@ -130,35 +130,35 @@ abstract class SoundRetained extends LeafRetained
static final int SOUND_DATA_DIRTY_BIT = 0x0001;
static final int INITIAL_GAIN_DIRTY_BIT = 0x0002;
static final int LOOP_COUNT_DIRTY_BIT = 0x0004;
- static final int BOUNDS_DIRTY_BIT = 0x0008;
- static final int BOUNDING_LEAF_DIRTY_BIT = 0x0010;
- static final int PRIORITY_DIRTY_BIT = 0x0020;
- static final int POSITION_DIRTY_BIT = 0x0040;
- static final int DISTANCE_GAIN_DIRTY_BIT = 0x0080;
- static final int BACK_DISTANCE_GAIN_DIRTY_BIT = 0x0100;
- static final int DIRECTION_DIRTY_BIT = 0x0200;
- static final int ANGULAR_ATTENUATION_DIRTY_BIT = 0x0400;
- static final int RATE_DIRTY_BIT = 0x0800;
-
- static final int BOUNDS_CHANGED =
+ static final int BOUNDS_DIRTY_BIT = 0x0008;
+ static final int BOUNDING_LEAF_DIRTY_BIT = 0x0010;
+ static final int PRIORITY_DIRTY_BIT = 0x0020;
+ static final int POSITION_DIRTY_BIT = 0x0040;
+ static final int DISTANCE_GAIN_DIRTY_BIT = 0x0080;
+ static final int BACK_DISTANCE_GAIN_DIRTY_BIT = 0x0100;
+ static final int DIRECTION_DIRTY_BIT = 0x0200;
+ static final int ANGULAR_ATTENUATION_DIRTY_BIT = 0x0400;
+ static final int RATE_DIRTY_BIT = 0x0800;
+
+ static final int BOUNDS_CHANGED =
BOUNDS_DIRTY_BIT | BOUNDING_LEAF_DIRTY_BIT;
- static final int ATTRIBUTE_DIRTY_BITS =
- SOUND_DATA_DIRTY_BIT | INITIAL_GAIN_DIRTY_BIT |
- LOOP_COUNT_DIRTY_BIT | PRIORITY_DIRTY_BIT |
+ static final int ATTRIBUTE_DIRTY_BITS =
+ SOUND_DATA_DIRTY_BIT | INITIAL_GAIN_DIRTY_BIT |
+ LOOP_COUNT_DIRTY_BIT | PRIORITY_DIRTY_BIT |
RATE_DIRTY_BIT;
- static final int POSITIONAL_DIRTY_BITS =
+ static final int POSITIONAL_DIRTY_BITS =
ATTRIBUTE_DIRTY_BITS |
POSITION_DIRTY_BIT | DISTANCE_GAIN_DIRTY_BIT;
- static final int DIRECTIONAL_DIRTY_BITS =
+ static final int DIRECTIONAL_DIRTY_BITS =
POSITIONAL_DIRTY_BITS | BACK_DISTANCE_GAIN_DIRTY_BIT |
DIRECTION_DIRTY_BIT | ANGULAR_ATTENUATION_DIRTY_BIT;
// All attribute bits that are specifically set or cleared for any node */
static final int ALL_ATTIBS_DIRTY_BITS = 0x0FFF;
-
+
// State Dirty bit flags
// This bitmask is set when scene graph state is changed.
static final int LIVE_DIRTY_BIT = 0x0001;
@@ -194,7 +194,7 @@ abstract class SoundRetained extends LeafRetained
/**
* Array of references to sound scheduler atoms associated with this node.
* For each view that a sound node is associated with a sound scheduler
- * atom is created and maintained
+ * atom is created and maintained
*/
// for a particular view that are playing either audibly or silently.
private SoundSchedulerAtom[] loadedAtoms = new SoundSchedulerAtom[1];
@@ -202,12 +202,12 @@ abstract class SoundRetained extends LeafRetained
/**
* This is true when this sound is referenced in an immediate mode context
- */
+ */
boolean inImmCtx = false;
/**
* Load Sound Data Status
- */
+ */
static final int LOAD_COMPLETE = 2;
// load requested but could not be performed due because sound not live
static final int LOAD_PENDING = 1;
@@ -285,7 +285,7 @@ abstract class SoundRetained extends LeafRetained
/**
* Associates sound data with this sound source node
- * Attempt to load sound
+ * Attempt to load sound
* @param soundData descrition of sound source data
*/
void setSoundData(MediaContainer soundData) {
@@ -326,7 +326,7 @@ abstract class SoundRetained extends LeafRetained
return ( this.soundData );
}
-
+
/**
* Set the gain scale factor applied to this sound
* @param amplitude gain scale factor
@@ -334,7 +334,7 @@ abstract class SoundRetained extends LeafRetained
void setInitialGain(float scaleFactor) {
if (scaleFactor < 0.0f)
this.initialGain = 0.0f;
- else
+ else
this.initialGain = scaleFactor;
dispatchAttribChange(INITIAL_GAIN_DIRTY_BIT, (new Float(scaleFactor)));
@@ -362,7 +362,7 @@ abstract class SoundRetained extends LeafRetained
this.loopCount = (int) loopCount;
if (debugFlag)
debugPrint("setLoopCount called with " + this.loopCount);
-
+
dispatchAttribChange(LOOP_COUNT_DIRTY_BIT, (new Integer(loopCount)));
if (source != null && source.isLive()) {
notifySceneGraphChanged(false);
@@ -494,11 +494,11 @@ abstract class SoundRetained extends LeafRetained
/**
* Set the Sound's scheduling region to the specified Leaf node.
- */
+ */
void setSchedulingBoundingLeaf(BoundingLeaf region) {
int i;
int numSnds = numMirrorSounds;
- if (numMirrorSounds == 0)
+ if (numMirrorSounds == 0)
numSnds = 1;
if ((boundingLeaf != null) &&
@@ -520,7 +520,7 @@ abstract class SoundRetained extends LeafRetained
} else {
boundingLeaf = null;
}
- // XXXX: since BoundingLeaf constructor only takes Bounds
+ // XXXX: since BoundingLeaf constructor only takes Bounds
// test if region passed into dispatchAttribChange correctly.
dispatchAttribChange(BOUNDING_LEAF_DIRTY_BIT, region);
if (source != null && source.isLive()) {
@@ -530,7 +530,7 @@ abstract class SoundRetained extends LeafRetained
/**
* Get the Sound's scheduling region
- */
+ */
BoundingLeaf getSchedulingBoundingLeaf() {
if (boundingLeaf != null) {
return((BoundingLeaf)boundingLeaf.source);
@@ -570,11 +570,11 @@ abstract class SoundRetained extends LeafRetained
}
}
-
- /**
+
+ /**
* Set sound's proirity value.
* @param priority value used to order sound's importance for playback.
- */
+ */
void setPriority(float rank) {
if (rank == this.priority)
// changing priority is expensive in the sound scheduler(s)
@@ -587,20 +587,20 @@ abstract class SoundRetained extends LeafRetained
if (source != null && source.isLive()) {
notifySceneGraphChanged(false);
}
- }
-
- /**
+ }
+
+ /**
* Retrieves sound's priority value.
- * @return sound priority value
- */
- float getPriority() {
+ * @return sound priority value
+ */
+ float getPriority() {
return (this.priority);
}
/**
* Retrieves sound's duration in milliseconds
- * @return sound's duration, returns DURATION_UNKNOWN if duration could
+ * @return sound's duration, returns DURATION_UNKNOWN if duration could
* not be queried from the audio device
*/
long getDuration() {
@@ -608,23 +608,23 @@ abstract class SoundRetained extends LeafRetained
}
- /**
- * Set scale factor
+ /**
+ * Set scale factor
* @param scaleFactor applied to sound playback rate
- */
+ */
void setRateScaleFactor(float scaleFactor) {
this.rate = scaleFactor;
dispatchAttribChange(RATE_DIRTY_BIT, (new Float(scaleFactor)));
if (source != null && source.isLive()) {
notifySceneGraphChanged(false);
}
- }
-
- /**
+ }
+
+ /**
* Retrieves sound's rate scale factor
* @return sound rate scale factor
- */
- float getRateScaleFactor() {
+ */
+ float getRateScaleFactor() {
return (this.rate);
}
@@ -656,7 +656,7 @@ abstract class SoundRetained extends LeafRetained
// remove atom from array of playing atoms if it is in list
boolean atomFound = false;
int i;
- for (i=0; i
* 2) the Sound node is live;
* 3) there is at least one active View in the Universe; and
- * 4) an instance of an AudioDevice is attached to the current
+ * 4) an instance of an AudioDevice is attached to the current
* PhysicalEnvironment.
*
- * 1) the Sound node has a non-null sound data and this data has
+ * 1) the Sound node has a non-null sound data and this data has
* sucessfully been loaded/opened/copied/attached;
*
@@ -753,7 +753,7 @@ abstract class SoundRetained extends LeafRetained
continue;
}
return false; // sound scheduler atom for given view not found
-
+
}
// *******************************
@@ -767,7 +767,7 @@ abstract class SoundRetained extends LeafRetained
* @return sound playing flag
*/
boolean isPlaying() {
- for (int i=0; i
* 2) the Sound node is live;
* 3) the given View is active in the Universe; and
- * 4) an instance of an AudioDevice is attached to the current
+ * 4) an instance of an AudioDevice is attached to the current
* PhysicalEnvironment.
* application region: null (no active region)
* aural attributes: null (uses default aural attributes)
- */
+ */
public Soundscape() {
// Just use default values
// set default read capabilities
@@ -113,7 +113,7 @@ public class Soundscape extends Leaf {
* parameters
* @param region application region
* @param attributes array of aural attribute component objects
- */
+ */
public Soundscape(Bounds region,
AuralAttributes attributes) {
// set default read capabilities
@@ -126,7 +126,7 @@ public class Soundscape extends Leaf {
/**
* Creates the retained mode SoundscapeRetained object that this
* component object will point to.
- */
+ */
void createRetained() {
this.retained = new SoundscapeRetained();
this.retained.setSource(this);
@@ -134,17 +134,17 @@ public class Soundscape extends Leaf {
/**
* Set the Soundscape's application region to the specified bounds
- * specified in local coordinates of this leaf node. The aural
- * attributes associated with this Soundscape are used to render
- * the active sounds when this application region intersects the
- * ViewPlatform's activation volume. The getApplicationBounds method
+ * specified in local coordinates of this leaf node. The aural
+ * attributes associated with this Soundscape are used to render
+ * the active sounds when this application region intersects the
+ * ViewPlatform's activation volume. The getApplicationBounds method
* returns a new Bounds object.
* This region is used when the application bounding leaf is null.
* @param region the bounds that contains the Soundscape's new application
* region.
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public void setApplicationBounds(Bounds region) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_APPLICATION_BOUNDS_WRITE))
@@ -153,12 +153,12 @@ public class Soundscape extends Leaf {
((SoundscapeRetained)this.retained).setApplicationBounds(region);
}
- /**
+ /**
* Retrieves the Soundscape node's application bounds.
* @return this Soundscape's application bounds information
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public Bounds getApplicationBounds() {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_APPLICATION_BOUNDS_READ))
@@ -175,7 +175,7 @@ public class Soundscape extends Leaf {
* node's new application region.
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public void setApplicationBoundingLeaf(BoundingLeaf region) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_APPLICATION_BOUNDS_WRITE))
@@ -184,12 +184,12 @@ public class Soundscape extends Leaf {
((SoundscapeRetained)this.retained).setApplicationBoundingLeaf(region);
}
- /**
+ /**
* Retrieves the Soundscape node's application bounding leaf.
* @return this Soundscape's application bounding leaf information
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- */
+ */
public BoundingLeaf getApplicationBoundingLeaf() {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_APPLICATION_BOUNDS_READ))
@@ -220,13 +220,13 @@ public class Soundscape extends Leaf {
*/
public AuralAttributes getAuralAttributes() {
if (isLiveOrCompiled())
- if(!this.getCapability(ALLOW_ATTRIBUTES_READ))
- throw new CapabilityNotSetException(J3dI18N.getString("Soundscape5"));
-
+ if(!this.getCapability(ALLOW_ATTRIBUTES_READ))
+ throw new CapabilityNotSetException(J3dI18N.getString("Soundscape5"));
+
return ((SoundscapeRetained)this.retained).getAuralAttributes();
}
-
+
/**
* Creates a new instance of the node. This routine is called
* by cloneTree
to duplicate the current node.
@@ -271,7 +271,7 @@ public class Soundscape extends Leaf {
* false
, the value of each node's
* duplicateOnCloneTree
variable determines whether
* NodeComponent data is duplicated or copied.
- * @exception ClassCastException if originalNode is not an instance of
+ * @exception ClassCastException if originalNode is not an instance of
* Soundscape
*
* @see Node#cloneTree
@@ -287,7 +287,7 @@ public class Soundscape extends Leaf {
* originalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
@@ -310,7 +310,7 @@ public class Soundscape extends Leaf {
SoundscapeRetained rt = (SoundscapeRetained) retained;
rt.setApplicationBounds(attr.getApplicationBounds());
-
+
rt.setAuralAttributes((AuralAttributes) getNodeComponent(
attr.getAuralAttributes(),
forceDuplicate,
diff --git a/src/classes/share/javax/media/j3d/SoundscapeRetained.java b/src/classes/share/javax/media/j3d/SoundscapeRetained.java
index c637d26..7fa6945 100644
--- a/src/classes/share/javax/media/j3d/SoundscapeRetained.java
+++ b/src/classes/share/javax/media/j3d/SoundscapeRetained.java
@@ -33,7 +33,7 @@ package javax.media.j3d;
import java.util.ArrayList;
/**
- * The SoundscapeRetained object defines all soundscape rendering state
+ * The SoundscapeRetained object defines all soundscape rendering state
* as a subclass of a Leaf node.
*/
class SoundscapeRetained extends LeafRetained
@@ -42,12 +42,12 @@ class SoundscapeRetained extends LeafRetained
static final int BOUNDING_LEAF_CHANGED = 0x00002;
static final int APPLICATION_BOUNDS_CHANGED = 0x00004;
- /**
+ /**
* Soundscape nodes application region
- */
+ */
Bounds applicationRegion = null;
- /**
+ /**
* The bounding leaf reference
*/
BoundingLeafRetained boundingLeaf = null;
@@ -56,12 +56,12 @@ class SoundscapeRetained extends LeafRetained
* The transformed Application Region
*/
Bounds transformedRegion = null;
-
- /**
+
+ /**
* Aural attributes associated with this Soundscape
- */
+ */
AuralAttributesRetained attributes = null;
-
+
// A bitmask that indicates that the something has changed.
int isDirty = 0xffff;
@@ -87,7 +87,7 @@ class SoundscapeRetained extends LeafRetained
VirtualUniverse.mc.processMessage(createMessage);
}
-
+
SoundscapeRetained() {
super();
this.nodeType = NodeRetained.SOUNDSCAPE;
@@ -100,7 +100,7 @@ class SoundscapeRetained extends LeafRetained
/**
* Set the Soundscape's application region.
* @param region a region that contains the Soundscape's new application region
- */
+ */
void setApplicationBounds(Bounds region)
{
if (region != null) {
@@ -124,7 +124,7 @@ class SoundscapeRetained extends LeafRetained
/**
* Get the Soundscape's application region.
* @return this Soundscape's application region information
- */
+ */
Bounds getApplicationBounds()
{
Bounds b = null;
@@ -143,7 +143,7 @@ class SoundscapeRetained extends LeafRetained
/**
* Set the Soundscape's application region to the specified Leaf node.
- */
+ */
void setApplicationBoundingLeaf(BoundingLeaf region) {
if (boundingLeaf != null) {
// Remove the soundscape as users of the original bounding leaf
@@ -166,7 +166,7 @@ class SoundscapeRetained extends LeafRetained
/**
* Get the Soundscape's application region
- */
+ */
BoundingLeaf getApplicationBoundingLeaf() {
if (boundingLeaf != null) {
return (BoundingLeaf)boundingLeaf.source;
@@ -218,7 +218,7 @@ class SoundscapeRetained extends LeafRetained
{
if (attributes != null) {
return ((AuralAttributes) attributes.source);
- }
+ }
else
return ((AuralAttributes) null);
}
@@ -238,11 +238,11 @@ class SoundscapeRetained extends LeafRetained
// The update Object function.
synchronized void updateMirrorObject(Object[] objs) {
- // NOTE: There doesn't seem to be a use for mirror objects since
+ // NOTE: There doesn't seem to be a use for mirror objects since
// Soundscapes can't be shared.
// This method updates the transformed region from either bounding
// leaf or application bounds. Bounding leaf takes precidence.
- Transform3D trans = null;
+ Transform3D trans = null;
int component = ((Integer)objs[1]).intValue();
if ((component & BOUNDING_LEAF_CHANGED) != 0) {
if (this.boundingLeaf != null) {
@@ -269,7 +269,7 @@ class SoundscapeRetained extends LeafRetained
else {
transformedRegion = null;
}
- }
+ }
}
// The update tranform fields
@@ -311,7 +311,7 @@ class SoundscapeRetained extends LeafRetained
GroupRetained group;
Transform3D trans;
Bounds region = null;
-
+
if (ms == null)
return;
}
@@ -338,7 +338,7 @@ class SoundscapeRetained extends LeafRetained
else {
ms.boundingLeaf = null;
}
-
+
if (applicationRegion != null) {
ms.applicationRegion = (Bounds) applicationRegion.clone();
// Assign region only if bounding leaf is null
@@ -347,7 +347,7 @@ class SoundscapeRetained extends LeafRetained
ms.transformedRegion.transform(ms.applicationRegion,
ms.getLastLocalToVworld());
}
-
+
}
else {
ms.applicationRegion = null;
@@ -386,7 +386,7 @@ class SoundscapeRetained extends LeafRetained
if (inSharedGroup) {
throw new
IllegalSharingException(J3dI18N.getString("SoundscapeRetained0"));
- }
+ }
// process switch leaf
if (s.switchTargets != null &&
@@ -399,7 +399,7 @@ class SoundscapeRetained extends LeafRetained
super.markAsLive();
}
-
+
/**
* This clearLive routine first calls the superclass's method, then
* it removes itself to the list of lights
diff --git a/src/classes/share/javax/media/j3d/SourceCodeShader.java b/src/classes/share/javax/media/j3d/SourceCodeShader.java
index cb12c36..b617910 100644
--- a/src/classes/share/javax/media/j3d/SourceCodeShader.java
+++ b/src/classes/share/javax/media/j3d/SourceCodeShader.java
@@ -94,13 +94,13 @@ public class SourceCodeShader extends Shader {
this.retained.setSource(this);
// System.err.println("SourceCodeShader.createRetained()");
}
-
+
/**
* @deprecated replaced with cloneNodeComponent(boolean forceDuplicate)
*/
public NodeComponent cloneNodeComponent() {
SourceCodeShaderRetained scsRetained = (SourceCodeShaderRetained) retained;
-
+
SourceCodeShader scs = new SourceCodeShader(scsRetained.getShadingLanguage(),
scsRetained.getShaderType(),
scsRetained.getShaderSource());
@@ -108,13 +108,13 @@ public class SourceCodeShader extends Shader {
return scs;
}
-
+
/**
- * Copies all node information from originalNodeComponent
+ * Copies all node information from originalNodeComponent
* into the current node. This method is called from the
* duplicateNode
method. This routine does
* the actual duplication of all "local data" (any data defined in
- * this object).
+ * this object).
*
* @param originalNodeComponent the original node to duplicate
* @param forceDuplicate when set to true
, causes the
@@ -127,7 +127,7 @@ public class SourceCodeShader extends Shader {
* @see NodeComponent#setDuplicateOnCloneTree
*/
void duplicateAttributes(NodeComponent originalNodeComponent,
- boolean forceDuplicate) {
+ boolean forceDuplicate) {
super.duplicateAttributes(originalNodeComponent, forceDuplicate);
String sc = ((SourceCodeShaderRetained) originalNodeComponent.retained).getShaderSource();
diff --git a/src/classes/share/javax/media/j3d/SourceCodeShaderRetained.java b/src/classes/share/javax/media/j3d/SourceCodeShaderRetained.java
index 7232611..f80e371 100644
--- a/src/classes/share/javax/media/j3d/SourceCodeShaderRetained.java
+++ b/src/classes/share/javax/media/j3d/SourceCodeShaderRetained.java
@@ -50,12 +50,12 @@ class SourceCodeShaderRetained extends ShaderRetained {
SourceCodeShaderRetained() {
}
- // This method is similar to setShaderSource().
- // To conform to j3d frame in retained creation, we will stick with method
+ // This method is similar to setShaderSource().
+ // To conform to j3d frame in retained creation, we will stick with method
// with init name.
final void initShaderSource(String shaderSource) {
this.shaderSource = shaderSource;
- }
+ }
final void set(int shadingLanguage, int shaderType, String shaderSource) {
this.shadingLanguage = shadingLanguage;
@@ -74,7 +74,7 @@ class SourceCodeShaderRetained extends ShaderRetained {
final void setShaderSource(String shaderSource) {
this.shaderSource = shaderSource;
- }
+ }
synchronized void createMirrorObject() {
// System.err.println("SourceCodeShaderRetained : createMirrorObject");
@@ -86,7 +86,7 @@ class SourceCodeShaderRetained extends ShaderRetained {
initMirrorObject();
}
-
+
/**
* Initializes a mirror object.
*/
@@ -94,7 +94,7 @@ class SourceCodeShaderRetained extends ShaderRetained {
mirror.source = source;
((SourceCodeShaderRetained) mirror).set(shadingLanguage, shaderType, shaderSource);
- ((SourceCodeShaderRetained) mirror).shaderData = null;
+ ((SourceCodeShaderRetained) mirror).shaderData = null;
}
synchronized void updateMirrorObject(int component, Object value) {
diff --git a/src/classes/share/javax/media/j3d/SpotLight.java b/src/classes/share/javax/media/j3d/SpotLight.java
index 23039c2..36fdfd8 100644
--- a/src/classes/share/javax/media/j3d/SpotLight.java
+++ b/src/classes/share/javax/media/j3d/SpotLight.java
@@ -53,7 +53,7 @@ import javax.vecmath.Vector3f;
* lower than 0 are clamped to 0 and values over PI/2 are clamped
* to PI. The default spread angle is PI radians.
- *
- *
- *
- *
genMode
is
* a value other than OBJECT_LINEAR
, EYE_LINEAR
,
- * SPHERE_MAP
, NORMAL_MAP
, or
+ * SPHERE_MAP
, NORMAL_MAP
, or
* REFLECTION_MAP
.
*
* @see Canvas3D#queryProperties
@@ -494,7 +494,7 @@ public class TexCoordGeneration extends NodeComponent {
* is used to generate the S coordinate in OBJECT_LINEAR and EYE_LINEAR
* texture generation modes.
* @param planeS plane equation for the S coordinate
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public void setPlaneS(Vector4f planeS) {
@@ -527,7 +527,7 @@ public class TexCoordGeneration extends NodeComponent {
* is used to generate the T coordinate in OBJECT_LINEAR and EYE_LINEAR
* texture generation modes.
* @param planeT plane equation for the T coordinate
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public void setPlaneT(Vector4f planeT) {
@@ -560,7 +560,7 @@ public class TexCoordGeneration extends NodeComponent {
* is used to generate the R coordinate in OBJECT_LINEAR and EYE_LINEAR
* texture generation modes.
* @param planeR plane equation for the R coordinate
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public void setPlaneR(Vector4f planeR) {
@@ -593,7 +593,7 @@ public class TexCoordGeneration extends NodeComponent {
* is used to generate the Q coordinate in OBJECT_LINEAR and EYE_LINEAR
* texture generation modes.
* @param planeQ plane equation for the Q coordinate
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @since Java 3D 1.3
@@ -635,7 +635,7 @@ public class TexCoordGeneration extends NodeComponent {
}
/**
- * @deprecated replaced with cloneNodeComponent(boolean forceDuplicate)
+ * @deprecated replaced with cloneNodeComponent(boolean forceDuplicate)
*/
public NodeComponent cloneNodeComponent() {
TexCoordGeneration tga = new TexCoordGeneration();
@@ -649,7 +649,7 @@ public class TexCoordGeneration extends NodeComponent {
* the current node. This method is called from the
* duplicateNode
method. This routine does
* the actual duplication of all "local data" (any data defined in
- * this object).
+ * this object).
*
* @param originalNodeComponent the original node to duplicate.
* @param forceDuplicate when set to true
, causes the
@@ -662,12 +662,12 @@ public class TexCoordGeneration extends NodeComponent {
* @see NodeComponent#setDuplicateOnCloneTree
*/
- void duplicateAttributes(NodeComponent originalNodeComponent,
- boolean forceDuplicate) {
+ void duplicateAttributes(NodeComponent originalNodeComponent,
+ boolean forceDuplicate) {
super.duplicateAttributes(originalNodeComponent, forceDuplicate);
-
- TexCoordGenerationRetained tex = (TexCoordGenerationRetained)
+
+ TexCoordGenerationRetained tex = (TexCoordGenerationRetained)
originalNodeComponent.retained;
TexCoordGenerationRetained rt = (TexCoordGenerationRetained) retained;
@@ -679,9 +679,9 @@ public class TexCoordGeneration extends NodeComponent {
tex.getPlaneT(v);
rt.initPlaneT(v);
tex.getPlaneR(v);
- rt.initPlaneR(v);
+ rt.initPlaneR(v);
tex.getPlaneQ(v);
- rt.initPlaneQ(v);
+ rt.initPlaneQ(v);
rt.initFormat(tex.getFormat());
rt.initEnable(tex.getEnable());
}
diff --git a/src/classes/share/javax/media/j3d/TexCoordGenerationRetained.java b/src/classes/share/javax/media/j3d/TexCoordGenerationRetained.java
index 438e1bc..5e2636e 100644
--- a/src/classes/share/javax/media/j3d/TexCoordGenerationRetained.java
+++ b/src/classes/share/javax/media/j3d/TexCoordGenerationRetained.java
@@ -39,7 +39,7 @@ import java.util.ArrayList;
* coordinate generation. It is included as part of an Appearance
* component object.
*/
-class TexCoordGenerationRetained extends NodeComponentRetained {
+class TexCoordGenerationRetained extends NodeComponentRetained {
// A list of pre-defined bits to indicate which component
// in this TexCoordGeneration object changed.
@@ -67,7 +67,7 @@ class TexCoordGenerationRetained extends NodeComponentRetained {
// true when mirror texCoord component set
boolean mirrorCompDirty = false;
-
+
/**
* Enables or disables texture coordinate generation for this
* appearance component object.
@@ -270,7 +270,7 @@ class TexCoordGenerationRetained extends NodeComponentRetained {
mirror = mirrorTg;
}
} else {
- ((TexCoordGenerationRetained) mirror).set(this);
+ ((TexCoordGenerationRetained) mirror).set(this);
}
}
@@ -278,25 +278,25 @@ class TexCoordGenerationRetained extends NodeComponentRetained {
int gMode = genMode;
Transform3D trans = null;
Transform3D m = cv.vworldToEc;
-
+
if (((cv.textureExtendedFeatures & Canvas3D.TEXTURE_CUBE_MAP) == 0) &&
- ((genMode == TexCoordGeneration.NORMAL_MAP) ||
+ ((genMode == TexCoordGeneration.NORMAL_MAP) ||
(genMode == TexCoordGeneration.REFLECTION_MAP))) {
gMode = TexCoordGeneration.SPHERE_MAP;
- }
+ }
if (VirtualUniverse.mc.isD3D() &&
(gMode == TexCoordGeneration.EYE_LINEAR)) {
trans = new Transform3D(cv.vworldToEc);
trans.invert();
m = trans;
- }
-
- Pipeline.getPipeline().updateTexCoordGeneration(cv.ctx,
+ }
+
+ Pipeline.getPipeline().updateTexCoordGeneration(cv.ctx,
enable, gMode, format, planeS.x, planeS.y, planeS.z,
planeS.w, planeT.x, planeT.y, planeT.z, planeT.w,
- planeR.x, planeR.y, planeR.z, planeR.w,
- planeQ.x, planeQ.y, planeQ.z, planeQ.w,
+ planeR.x, planeR.y, planeR.z, planeR.w,
+ planeQ.x, planeQ.y, planeQ.z, planeQ.w,
m.mat);
}
@@ -308,11 +308,11 @@ class TexCoordGenerationRetained extends NodeComponentRetained {
((TexCoordGenerationRetained)mirror).set(this);
}
- /** Update the "component" field of the mirror object with the
+ /** Update the "component" field of the mirror object with the
* given "value"
*/
synchronized void updateMirrorObject(int component, Object value) {
-
+
TexCoordGenerationRetained mirrorTc = (TexCoordGenerationRetained) mirror;
mirrorTc.mirrorCompDirty = true;
@@ -359,7 +359,7 @@ class TexCoordGenerationRetained extends NodeComponentRetained {
tr.planeR = new Vector4f(planeR);
// other attributes is copied in super.clone()
return tr;
-
+
}
protected void set(TexCoordGenerationRetained tr) {
@@ -370,12 +370,12 @@ class TexCoordGenerationRetained extends NodeComponentRetained {
planeS.set(tr.planeS);
planeT.set(tr.planeT);
planeR.set(tr.planeR);
- }
+ }
final void sendMessage(int attrMask, Object attr) {
ArrayList univList = new ArrayList();
- ArrayList gaList = Shape3DRetained.getGeomAtomsList(mirror.users, univList);
+ ArrayList gaList = Shape3DRetained.getGeomAtomsList(mirror.users, univList);
// Send to rendering attribute structure, regardless of
// whether there are users or not (alternate appearance case ..)
@@ -395,7 +395,7 @@ class TexCoordGenerationRetained extends NodeComponentRetained {
createMessage = new J3dMessage();
createMessage.threads = J3dThread.UPDATE_RENDER;
createMessage.type = J3dMessage.TEXCOORDGENERATION_CHANGED;
-
+
createMessage.universe = (VirtualUniverse) univList.get(i);
createMessage.args[0] = this;
createMessage.args[1]= new Integer(attrMask);
@@ -405,7 +405,7 @@ class TexCoordGenerationRetained extends NodeComponentRetained {
GeometryAtom[] gaArr = new GeometryAtom[gL.size()];
gL.toArray(gaArr);
createMessage.args[3] = gaArr;
-
+
VirtualUniverse.mc.processMessage(createMessage);
}
}
diff --git a/src/classes/share/javax/media/j3d/Text3D.java b/src/classes/share/javax/media/j3d/Text3D.java
index 64a78e8..d29a137 100644
--- a/src/classes/share/javax/media/j3d/Text3D.java
+++ b/src/classes/share/javax/media/j3d/Text3D.java
@@ -41,8 +41,8 @@ import javax.vecmath.Point3f;
*
*
duplicateNode
method. This routine does
* the actual duplication of all "local data" (any data defined in
- * this object).
+ * this object).
*
* @param originalNodeComponent the original node to duplicate.
* @param forceDuplicate when set to true
, causes the
@@ -635,7 +635,7 @@ public class Text3D extends Geometry {
* @see Node#cloneTree
* @see NodeComponent#setDuplicateOnCloneTree
*/
- void duplicateAttributes(NodeComponent originalNodeComponent,
+ void duplicateAttributes(NodeComponent originalNodeComponent,
boolean forceDuplicate) {
super.duplicateAttributes(originalNodeComponent, forceDuplicate);
diff --git a/src/classes/share/javax/media/j3d/Text3DRenderMethod.java b/src/classes/share/javax/media/j3d/Text3DRenderMethod.java
index 8972678..1818c45 100644
--- a/src/classes/share/javax/media/j3d/Text3DRenderMethod.java
+++ b/src/classes/share/javax/media/j3d/Text3DRenderMethod.java
@@ -46,10 +46,10 @@ class Text3DRenderMethod implements RenderMethod {
boolean isNonUniformScale;
Transform3D trans = null;
-
+
GeometryArrayRetained geo = (GeometryArrayRetained)ra.geometry();
- geo.setVertexFormat((rm.useAlpha && ((geo.vertexFormat &
- GeometryArray.COLOR) != 0)),
+ geo.setVertexFormat((rm.useAlpha && ((geo.vertexFormat &
+ GeometryArray.COLOR) != 0)),
rm.textureBin.attributeBin.ignoreVertexColors, cv.ctx);
if (rm.doInfinite) {
@@ -58,7 +58,7 @@ class Text3DRenderMethod implements RenderMethod {
trans = ra.infLocalToVworld;
isNonUniformScale = !trans.isCongruent();
cv.setModelViewMatrix(cv.ctx, cv.vworldToEc.mat, trans);
-
+
ra.geometry().execute(cv, ra.renderAtom, isNonUniformScale,
(rm.useAlpha && ra.geometry().noAlpha),
rm.alpha,
@@ -68,7 +68,7 @@ class Text3DRenderMethod implements RenderMethod {
}
return true;
}
-
+
boolean isVisible = false; // True if any of the RAs is visible.
while (ra != null) {
if (cv.ra == ra.renderAtom) {
@@ -76,7 +76,7 @@ class Text3DRenderMethod implements RenderMethod {
cv.updateState(dirtyBits);
trans = ra.localToVworld;
isNonUniformScale = !trans.isCongruent();
-
+
cv.setModelViewMatrix(cv.ctx, cv.vworldToEc.mat, trans);
ra.geometry().execute(cv, ra.renderAtom, isNonUniformScale,
(rm.useAlpha && ra.geometry().noAlpha),
@@ -94,7 +94,7 @@ class Text3DRenderMethod implements RenderMethod {
cv.raIsVisible = true;
trans = ra.localToVworld;
isNonUniformScale = !trans.isCongruent();
-
+
cv.setModelViewMatrix(cv.ctx, cv.vworldToEc.mat, trans);
ra.geometry().execute(cv, ra.renderAtom, isNonUniformScale,
(rm.useAlpha && ra.geometry().noAlpha),
@@ -109,16 +109,16 @@ class Text3DRenderMethod implements RenderMethod {
}
cv.ra = ra.renderAtom;
}
-
+
ra = ra.next;
-
+
}
-
- geo.disableGlobalAlpha(cv.ctx,
- (rm.useAlpha && ((geo.vertexFormat &
- GeometryArray.COLOR) != 0)),
+
+ geo.disableGlobalAlpha(cv.ctx,
+ (rm.useAlpha && ((geo.vertexFormat &
+ GeometryArray.COLOR) != 0)),
rm.textureBin.attributeBin.ignoreVertexColors);
-
+
return isVisible;
}
}
diff --git a/src/classes/share/javax/media/j3d/Text3DRetained.java b/src/classes/share/javax/media/j3d/Text3DRetained.java
index c3ad1c3..50ce513 100644
--- a/src/classes/share/javax/media/j3d/Text3DRetained.java
+++ b/src/classes/share/javax/media/j3d/Text3DRetained.java
@@ -57,7 +57,7 @@ class Text3DRetained extends GeometryRetained {
* The temporary transforms for this Text3D
*/
Transform3D[] charTransforms = new Transform3D[0];
-
+
/**
* A cached list of geometry arrays for the current settings
*/
@@ -98,14 +98,14 @@ class Text3DRetained extends GeometryRetained {
double width = 0, height = 0;
Rectangle2D bounds;
- //Reset bounds data
+ //Reset bounds data
l.set(location);
u.set(location);
if (numChars != 0) {
// Set loop counters based on path type
if (path == Text3D.PATH_RIGHT || path == Text3D.PATH_UP) {
- k = 0;
+ k = 0;
numTotal = numChars + 1;
} else if (path == Text3D.PATH_LEFT || path == Text3D.PATH_DOWN) {
k = 1;
@@ -150,8 +150,8 @@ class Text3DRetained extends GeometryRetained {
break;
}
}
-
- // Handle string alignment. ALIGN_FIRST is handled by default
+
+ // Handle string alignment. ALIGN_FIRST is handled by default
if (alignment != Text3D.ALIGN_FIRST) {
double cx = (u.x - l.x);
double cy = (u.y - l.y);
@@ -344,7 +344,7 @@ class Text3DRetained extends GeometryRetained {
*
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- *
+ *
* @see #getPosition
*/
final void setAlignment(int alignment) {
@@ -496,10 +496,10 @@ class Text3DRetained extends GeometryRetained {
}
gSize = s.geometryList.size();
-
+
GeometryAtom oldGA = Shape3DRetained.getGeomAtom(s);
GeometryAtom newGA = new GeometryAtom();
-
+
int geometryCnt = 0;
for(k = 0; k
- *
- *
@@ -99,13 +99,13 @@ import java.util.Hashtable; * j1 = j0 + 1
* a = frac(u - 0.5)
* b = frac(v - 0.5)
- * T' = (1-a)*(1-b)*Ti0j0 + + * T' = (1-a)*(1-b)*Ti0j0 + * a*(1-b)*Ti1j0 + * (1-a)*b*Ti0j1 + * a*b*Ti1j1
* *
*
- * T' = f(1+a) * f(1+b) * Ti0j0 +
- * f(a) * f(1+b) * Ti1j0 +
- * f(1-a) * f(1+b) * Ti2j0 +
+ * T' = f(1+a) * f(1+b) * Ti0j0 +
+ * f(a) * f(1+b) * Ti1j0 +
+ * f(1-a) * f(1+b) * Ti2j0 +
* f(2-a) * f(1+b) * Ti3j0 +
- * f(1+a) * f(b) * Ti0j1 +
- * f(a) * f(b) * Ti1j1 +
- * f(1-a) * f(b) * Ti2j1 +
+ * f(1+a) * f(b) * Ti0j1 +
+ * f(a) * f(b) * Ti1j1 +
+ * f(1-a) * f(b) * Ti2j1 +
* f(2-a) * f(b) * Ti3j1 +
- * f(1+a) * f(1-b) * Ti0j2 +
- * f(a) * f(1-b) * Ti1j2 +
- * f(1-a) * f(1-b) * Ti2j2 +
+ * f(1+a) * f(1-b) * Ti0j2 +
+ * f(a) * f(1-b) * Ti1j2 +
+ * f(1-a) * f(1-b) * Ti2j2 +
* f(2-a) * f(1-b) * Ti3j2 +
- * f(1+a) * f(2-b) * Ti0j3 +
- * f(a) * f(2-b) * Ti1j3 +
- * f(1-a) * f(2-b) * Ti2j3 +
+ * f(1+a) * f(2-b) * Ti0j3 +
+ * f(a) * f(2-b) * Ti1j3 +
+ * f(1-a) * f(2-b) * Ti2j3 +
* f(2-a) * f(2-b) * Ti3j3
* * @@ -211,14 +211,14 @@ import java.util.Hashtable; * this texture object. The anisotropic modes are as follows:
*
- *
*
*
log2(max(width,height))+1
* separate images.
@@ -565,16 +565,16 @@ public abstract class Texture extends NodeComponent {
private static final int[] readCapabilities = {
ALLOW_ANISOTROPIC_FILTER_READ,
ALLOW_BOUNDARY_COLOR_READ,
- ALLOW_BOUNDARY_MODE_READ,
+ ALLOW_BOUNDARY_MODE_READ,
ALLOW_ENABLE_READ,
ALLOW_FILTER4_READ,
- ALLOW_FILTER_READ,
+ ALLOW_FILTER_READ,
ALLOW_FORMAT_READ,
ALLOW_IMAGE_READ,
ALLOW_LOD_RANGE_READ,
- ALLOW_MIPMAP_MODE_READ,
+ ALLOW_MIPMAP_MODE_READ,
ALLOW_SHARPEN_TEXTURE_READ,
- ALLOW_SIZE_READ
+ ALLOW_SIZE_READ
};
/**
@@ -604,7 +604,7 @@ public abstract class Texture extends NodeComponent {
* filter4 func: null
- * Note that the default constructor creates a texture object with
+ * Note that the default constructor creates a texture object with
* a width and height of 0 and is, therefore, not useful.
*/
public Texture() {
@@ -621,7 +621,7 @@ public abstract class Texture extends NodeComponent {
* by the application (using either the
- * Note that the default constructor creates a texture object with
+ * Note that the default constructor creates a texture object with
* a width, height, and depth of 0 and is, therefore, not useful.
*/
public Texture3D() {
@@ -70,7 +70,7 @@ public class Texture3D extends Texture {
/**
* Constructs an empty Texture3D object with specified mipmapMode
- * format, width, height, and depth. Image at base level must be set by
+ * format, width, height, and depth. Image at base level must be set by
* the application using 'setImage' method. If mipmapMode is
* set to MULTI_LEVEL_MIPMAP, images for base level through
* maximum level must be set.
@@ -97,19 +97,19 @@ public class Texture3D extends Texture {
super(mipmapMode, format, width, height);
int depthLevels = -1;
-
+
depthLevels = getLevelsNPOT(depth);
-
- // TODO : Need to verify whether this is a bug. Why depthLevels isn't
+
+ // TODO : Need to verify whether this is a bug. Why depthLevels isn't
// use to determine maxMipMapLevels ? See also Texture.java
-
+
((Texture3DRetained)this.retained).setDepth(depth);
}
/**
* Constructs an empty Texture3D object with specified mipmapMode
- * format, width, height, depth, and boundaryWidth.
- * Image at base level must be set by
+ * format, width, height, depth, and boundaryWidth.
+ * Image at base level must be set by
* the application using 'setImage' method. If mipmapMode is
* set to MULTI_LEVEL_MIPMAP, images for base level through
* maximum level must be set.
@@ -143,12 +143,12 @@ public class Texture3D extends Texture {
super(mipmapMode, format, width, height, boundaryWidth);
int depthLevels = -1;
-
+
depthLevels = getLevelsNPOT(depth);
-
- // TODO : Need to verify whether this is a bug. Why depthLevels isn't
+
+ // TODO : Need to verify whether this is a bug. Why depthLevels isn't
// use to determine maxMipMapLevels ? See also Texture.java
-
+
((Texture3DRetained)this.retained).setDepth(depth);
}
@@ -243,7 +243,7 @@ public class Texture3D extends Texture {
* the current node. This method is called from the
*
*
+ *
*
*
@@ -97,19 +97,19 @@ import javax.vecmath.Color4f;
*
*
- *
+ *
*
*
*
*
* where CNx is the x component of the Nth color operand
* in the combine operation.
- * The value C' will be placed to the all three r,g,b components or the
+ * The value C' will be placed to the all three r,g,b components or the
* a component of the output.
*
* setImage
or
* setImages
method). If mipMapMode
is
* set to MULTI_LEVEL_MIPMAP
, then images for levels
- * Base Level through Maximum Level must be set.
+ * Base Level through Maximum Level must be set.
* Note that a texture with a non-power-of-two width or height will
* only be rendered on a graphics device that supports non-power-of-two
* textures.
@@ -646,12 +646,12 @@ public abstract class Texture extends NodeComponent {
if ((mipMapMode != BASE_LEVEL) && (mipMapMode != MULTI_LEVEL_MIPMAP))
throw new IllegalArgumentException(J3dI18N.getString("Texture0"));
- if ((format != INTENSITY) && (format != LUMINANCE) &&
+ if ((format != INTENSITY) && (format != LUMINANCE) &&
(format != ALPHA) && (format != LUMINANCE_ALPHA) &&
(format != RGB) && (format != RGBA)) {
throw new IllegalArgumentException(J3dI18N.getString("Texture1"));
}
-
+
if (width < 1) {
throw new IllegalArgumentException(J3dI18N.getString("Texture46"));
}
@@ -662,7 +662,7 @@ public abstract class Texture extends NodeComponent {
int widthLevels;
int heightLevels;
-
+
widthLevels = getLevelsNPOT(width);
heightLevels = getLevelsNPOT(height);
@@ -672,14 +672,14 @@ public abstract class Texture extends NodeComponent {
/**
* Constructs an empty Texture object with specified mipMapMode,
- * format, width, height, and boundaryWidth.
+ * format, width, height, and boundaryWidth.
* Defaults are used for all other
* parameters. If mipMapMode
is set to
* BASE_LEVEL
, then the image at level 0 must be set
* by the application (using either the setImage
or
* setImages
method). If mipMapMode
is
* set to MULTI_LEVEL_MIPMAP
, then images for levels
- * Base Level through Maximum Level must be set.
+ * Base Level through Maximum Level must be set.
* Note that a texture with a non-power-of-two width or height will
* only be rendered on a graphics device that supports non-power-of-two
* textures.
@@ -711,7 +711,7 @@ public abstract class Texture extends NodeComponent {
if ((mipMapMode != BASE_LEVEL) && (mipMapMode != MULTI_LEVEL_MIPMAP))
throw new IllegalArgumentException(J3dI18N.getString("Texture0"));
- if ((format != INTENSITY) && (format != LUMINANCE) &&
+ if ((format != INTENSITY) && (format != LUMINANCE) &&
(format != ALPHA) && (format != LUMINANCE_ALPHA) &&
(format != RGB) && (format != RGBA)) {
throw new IllegalArgumentException(J3dI18N.getString("Texture1"));
@@ -727,7 +727,7 @@ public abstract class Texture extends NodeComponent {
int widthLevels;
int heightLevels;
-
+
widthLevels = getLevelsNPOT(width);
heightLevels = getLevelsNPOT(height);
@@ -817,7 +817,7 @@ public abstract class Texture extends NodeComponent {
* function is used when the pixel being rendered maps to an area
* greater than one texel.
* @param minFilter the minification filter. One of:
- * FASTEST, NICEST, BASE_LEVEL_POINT, BASE_LEVEL_LINEAR,
+ * FASTEST, NICEST, BASE_LEVEL_POINT, BASE_LEVEL_LINEAR,
* MULTI_LEVEL_POINT, MULTI_LEVEL_LINEAR, or FILTER4
* @exception RestrictedAccessException if the method is called
* when this object is part of live or compiled scene graph.
@@ -866,15 +866,15 @@ public abstract class Texture extends NodeComponent {
* function is used when the pixel being rendered maps to an area
* less than or equal to one texel.
* @param magFilter the magnification filter, one of:
- * FASTEST, NICEST, BASE_LEVEL_POINT, BASE_LEVEL_LINEAR,
+ * FASTEST, NICEST, BASE_LEVEL_POINT, BASE_LEVEL_LINEAR,
* LINEAR_SHARPEN, LINEAR_SHARPEN_RGB, LINEAR_SHARPEN_ALPHA, or FILTER4.
- *
+ *
* @exception RestrictedAccessException if the method is called
* when this object is part of live or compiled scene graph.
* @exception IllegalArgumentException if magFilter
* is a value other than FASTEST
, NICEST
,
* BASE_LEVEL_POINT
, BASE_LEVEL_LINEAR
,
- * LINEAR_SHARPEN
, LINEAR_SHARPEN_RGB
,
+ * LINEAR_SHARPEN
, LINEAR_SHARPEN_RGB
,
* LINEAR_SHARPEN_ALPHA
, or
* FILTER4
.
*
@@ -949,10 +949,10 @@ public abstract class Texture extends NodeComponent {
if(!this.getCapability(ALLOW_IMAGE_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("Texture15"));
}
-
+
// Do illegal sharing check
validateImageIllegalSharing(image);
-
+
if (isLive())
((TextureRetained)this.retained).setImage(level, image);
else
@@ -1018,11 +1018,11 @@ public abstract class Texture extends NodeComponent {
throw new CapabilityNotSetException(J3dI18N.getString("Texture15"));
}
- // Do illegal sharing check
+ // Do illegal sharing check
for(int i=0; iMULTI_LEVEL_MIPMAP
; otherwise it returns 1.
* @exception CapabilityNotSetException if appropriate capability is
@@ -1133,13 +1133,13 @@ public abstract class Texture extends NodeComponent {
}
/**
- * Sets mipmap mode for texture mapping for this texture object.
+ * Sets mipmap mode for texture mapping for this texture object.
* @param mipMapMode the new mipmap mode for this object. One of:
* BASE_LEVEL or MULTI_LEVEL_MIPMAP.
* @exception RestrictedAccessException if the method is called
* when this object is part of live or compiled scene graph.
* @exception IllegalArgumentException if mipMapMode
- * is a value other than BASE_LEVEL
or
+ * is a value other than BASE_LEVEL
or
* MULTI_LEVEL_MIPMAP
.
*/
public void setMipMapMode(int mipMapMode) {
@@ -1200,11 +1200,11 @@ public abstract class Texture extends NodeComponent {
// num is NOT power of 2.
// NOTE: ********** Assumes 32 bit integer******************
static int getPowerOf2(int num) {
-
+
int i, tmp;
// Can only handle positive numbers, return error.
if (num < 1) return -1;
-
+
for (i=0, tmp = num; i < 32;i++) {
// Check if leftmost bit is 1
if ((tmp & 0x80000000) != 0) {
@@ -1231,7 +1231,7 @@ public abstract class Texture extends NodeComponent {
}
return levels;
}
-
+
/**
* Sets the texture boundary color for this texture object. The
* texture boundary color is used when boundaryModeS or boundaryModeT
@@ -1327,10 +1327,10 @@ public abstract class Texture extends NodeComponent {
* @param maximumLevel index of the highest defined mipmap level.
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- * @exception IllegalArgumentException if specified
+ * @exception IllegalArgumentException if specified
* maximumLevel < baseLevel, or
* if maximumLevel > log2(max(width,height))
- * @exception IllegalArgumentException if mipMipMapMode is equal to BASE_LEVEL
+ * @exception IllegalArgumentException if mipMipMapMode is equal to BASE_LEVEL
* and maximumLevel is not equal to zero.
*
* @since Java 3D 1.3
@@ -1541,7 +1541,7 @@ public abstract class Texture extends NodeComponent {
*/
public void setAnisotropicFilterMode(int mode) {
checkForLiveOrCompiled();
- if ((mode != ANISOTROPIC_NONE) &&
+ if ((mode != ANISOTROPIC_NONE) &&
(mode != ANISOTROPIC_SINGLE_VALUE)) {
throw new IllegalArgumentException(
J3dI18N.getString("Texture25"));
@@ -1569,7 +1569,7 @@ public abstract class Texture extends NodeComponent {
/**
* Specifies the degree of anisotropy to be
- * used when the anisotropic filter mode specifies
+ * used when the anisotropic filter mode specifies
* ANISOTROPIC_SINGLE_VALUE.
* @param degree degree of anisotropy
* @exception RestrictedAccessException if the method is called
@@ -1607,14 +1607,14 @@ public abstract class Texture extends NodeComponent {
}
return ((TextureRetained)this.retained).getAnisotropicFilterDegree();
}
-
+
/**
* sets the sharpen texture LOD function for this texture object.
* @param lod array containing the level-of-detail values.
* @param pts array containing the function values for the corresponding
* level-of-detail values.
*
- * @exception IllegalStateException if the length of lod
+ * @exception IllegalStateException if the length of lod
* does not match the length of pts
* @exception RestrictedAccessException if the method is called
* when this object is part of live or compiled scene graph.
@@ -1638,7 +1638,7 @@ public abstract class Texture extends NodeComponent {
* The Point2f x,y values are defined as follows: x is the lod value,
* y is the corresponding function value.
*
- * @param pts array of Point2f containing the lod as well as the
+ * @param pts array of Point2f containing the lod as well as the
* corresponding function value.
*
* @exception RestrictedAccessException if the method is called
@@ -1672,14 +1672,14 @@ public abstract class Texture extends NodeComponent {
}
return ((TextureRetained)this.retained).getSharpenTextureFuncPointsCount();
}
-
+
/**
* Copies the array of sharpen texture LOD function points into the
* specified arrays. The arrays must be large enough to hold all the
* points.
*
* @param lod the array to receive the level-of-detail values.
- * @param pts the array to receive the function values for the
+ * @param pts the array to receive the function values for the
* corresponding level-of-detail values.
*
* @exception CapabilityNotSetException if appropriate capability is
@@ -1720,12 +1720,12 @@ public abstract class Texture extends NodeComponent {
}
((TextureRetained)this.retained).getSharpenTextureFunc(pts);
}
-
+
/**
* sets the filter4 function for this texture object.
* @param weights array containing samples of the filter4 function.
*
- * @exception IllegalArgumentException if the length of
+ * @exception IllegalArgumentException if the length of
* weight
< 4
* @exception RestrictedAccessException if the method is called
* when this object is part of live or compiled scene graph.
@@ -1787,11 +1787,11 @@ public abstract class Texture extends NodeComponent {
/**
- * Copies all node information from originalNodeComponent
+ * Copies all node information from originalNodeComponent
* into the current node. This method is called from the
* duplicateNode
method. This routine does
* the actual duplication of all "local data" (any data defined in
- * this object).
+ * this object).
*
* @param originalNodeComponent the original node to duplicate.
* @param forceDuplicate when set to true
, causes the
@@ -1803,8 +1803,8 @@ public abstract class Texture extends NodeComponent {
* @see Node#cloneTree
* @see NodeComponent#setDuplicateOnCloneTree
*/
- void duplicateAttributes(NodeComponent originalNodeComponent,
- boolean forceDuplicate) {
+ void duplicateAttributes(NodeComponent originalNodeComponent,
+ boolean forceDuplicate) {
super.duplicateAttributes(originalNodeComponent, forceDuplicate);
@@ -1816,7 +1816,7 @@ public abstract class Texture extends NodeComponent {
rt.initBoundaryModeS(tex.getBoundaryModeS());
rt.initBoundaryModeT(tex.getBoundaryModeT());
rt.initMinFilter(tex.getMinFilter());
- rt.initMagFilter(tex.getMagFilter());
+ rt.initMagFilter(tex.getMagFilter());
rt.initMipMapMode(tex.getMipMapMode());
rt.initEnable(tex.getEnable());
rt.initAnisotropicFilterMode(tex.getAnisotropicFilterMode());
@@ -1839,7 +1839,7 @@ public abstract class Texture extends NodeComponent {
// No API available to get the current level
for (int i=tex.maxLevels-1; i>=0; i-- ) {
- ImageComponent image = (ImageComponent)
+ ImageComponent image = (ImageComponent)
getNodeComponent(tex.getImage(i),
forceDuplicate,
hashtable);
@@ -1851,11 +1851,11 @@ public abstract class Texture extends NodeComponent {
// NOTE: This sppears to have already been done
}
- /**
+ /**
* This function is called from getNodeComponent() to see if any of
- * the sub-NodeComponents duplicateOnCloneTree flag is true.
- * If it is the case, current NodeComponent needs to
- * duplicate also even though current duplicateOnCloneTree flag is false.
+ * the sub-NodeComponents duplicateOnCloneTree flag is true.
+ * If it is the case, current NodeComponent needs to
+ * duplicate also even though current duplicateOnCloneTree flag is false.
* This should be overwrite by NodeComponent which contains sub-NodeComponent.
*/
boolean duplicateChild() {
diff --git a/src/classes/share/javax/media/j3d/Texture2D.java b/src/classes/share/javax/media/j3d/Texture2D.java
index 0b121f1..18d0352 100644
--- a/src/classes/share/javax/media/j3d/Texture2D.java
+++ b/src/classes/share/javax/media/j3d/Texture2D.java
@@ -62,7 +62,7 @@ public class Texture2D extends Texture {
public static final int
ALLOW_DETAIL_TEXTURE_READ = CapabilityBits.TEXTURE2D_ALLOW_DETAIL_TEXTURE_READ;
- /**
+ /**
* @deprecated As of Java 3D 1.5 the optional detail texture feature is no
* longer supported.
* Performs linear sampling in both the base level
@@ -78,7 +78,7 @@ public class Texture2D extends Texture {
* @deprecated As of Java 3D 1.5 the optional detail texture feature is no
* longer supported.
* Performs linear detail for the rgb
- * components only. The alpha component is computed using
+ * components only. The alpha component is computed using
* BASE_LEVEL_LINEAR filter.
*
* @since Java 3D 1.3
@@ -90,7 +90,7 @@ public class Texture2D extends Texture {
* @deprecated As of Java 3D 1.5 the optional detail texture feature is no
* longer supported.
* Performs linear detail for the alpha
- * component only. The rgb components are computed using
+ * component only. The rgb components are computed using
* BASE_LEVEL_LINEAR filter.
*
* @since Java 3D 1.3
@@ -224,7 +224,7 @@ public class Texture2D extends Texture {
* function is used when the pixel being rendered maps to an area
* less than or equal to one texel.
* @param magFilter the magnification filter, one of:
- * FASTEST, NICEST, BASE_LEVEL_POINT, BASE_LEVEL_LINEAR,
+ * FASTEST, NICEST, BASE_LEVEL_POINT, BASE_LEVEL_LINEAR,
* LINEAR_DETAIL, LINEAR_DETAIL_RGB, LINEAR_DETAIL_ALPHA,
* LINEAR_SHARPEN, LINEAR_SHARPEN_RGB, LINEAR_SHARPEN_ALPHA, or FILTER4.
*
@@ -233,9 +233,9 @@ public class Texture2D extends Texture {
* @exception IllegalArgumentException if minFilter
* is a value other than FASTEST
, NICEST
,
* BASE_LEVEL_POINT
, BASE_LEVEL_LINEAR
,
- * LINEAR_DETAIL
, LINEAR_DETAIL_RGB
,
- * LINEAR_DETAIL_ALPHA
,
- * LINEAR_SHARPEN
, LINEAR_SHARPEN_RGB
,
+ * LINEAR_DETAIL
, LINEAR_DETAIL_RGB
,
+ * LINEAR_DETAIL_ALPHA
,
+ * LINEAR_SHARPEN
, LINEAR_SHARPEN_RGB
,
* LINEAR_SHARPEN_ALPHA
, or
* FILTER4
.
*
@@ -514,12 +514,12 @@ public class Texture2D extends Texture {
/**
- * @deprecated replaced with cloneNodeComponent(boolean forceDuplicate)
+ * @deprecated replaced with cloneNodeComponent(boolean forceDuplicate)
*/
public NodeComponent cloneNodeComponent() {
Texture2DRetained t2d = (Texture2DRetained) retained;
- Texture2D t = new Texture2D(t2d.getMipMapMode(), t2d.format,
+ Texture2D t = new Texture2D(t2d.getMipMapMode(), t2d.format,
t2d.width, t2d.height);
t.duplicateNodeComponent(this);
return t;
@@ -557,7 +557,7 @@ public class Texture2D extends Texture {
boolean forceDuplicate) {
super.duplicateAttributes(originalNodeComponent, forceDuplicate);
- Texture2DRetained tex = (Texture2DRetained)
+ Texture2DRetained tex = (Texture2DRetained)
originalNodeComponent.retained;
Texture2DRetained rt = (Texture2DRetained) retained;
diff --git a/src/classes/share/javax/media/j3d/Texture2DRetained.java b/src/classes/share/javax/media/j3d/Texture2DRetained.java
index 57b1e48..c7ccd6c 100644
--- a/src/classes/share/javax/media/j3d/Texture2DRetained.java
+++ b/src/classes/share/javax/media/j3d/Texture2DRetained.java
@@ -41,12 +41,12 @@ import javax.vecmath.*;
*/
class Texture2DRetained extends TextureRetained {
- // Note : There is hardly any HW vendor supports detail Image.
+ // Note : There is hardly any HW vendor supports detail Image.
// Detail Image operation is simply no-op in 1.5.
-
+
// currently detail image is only applicable to 2D texture
// detail texture info
-
+
// These members are unused except for public set and get methods.
private ImageComponent2DRetained detailImage = null;
private int detailTextureMode = Texture2D.DETAIL_MODULATE;
@@ -190,8 +190,8 @@ class Texture2DRetained extends TextureRetained {
if (detailTextureFuncPts != null) {
for (int i = 0, j = 0; i < numDetailTextureFuncPts; i++) {
pts[i].x = detailTextureFuncPts[j++];
- pts[i].y = detailTextureFuncPts[j++];
- }
+ pts[i].y = detailTextureFuncPts[j++];
+ }
}
}
diff --git a/src/classes/share/javax/media/j3d/Texture3D.java b/src/classes/share/javax/media/j3d/Texture3D.java
index 14ed438..f64d08b 100644
--- a/src/classes/share/javax/media/j3d/Texture3D.java
+++ b/src/classes/share/javax/media/j3d/Texture3D.java
@@ -33,7 +33,7 @@ package javax.media.j3d;
/**
* Texture3D is a subclass of Texture class. It extends Texture
- * class by adding a third coordinate, constructor and a mutator
+ * class by adding a third coordinate, constructor and a mutator
* method for setting a 3D texture image.
* If 3D texture mapping is not supported on a particular Canvas3D,
* 3D texture mapping is ignored for that canvas.
@@ -61,7 +61,7 @@ public class Texture3D extends Texture {
* boundary mode R : WRAP
*
* duplicateNode
method. This routine does
* the actual duplication of all "local data" (any data defined in
- * this object).
+ * this object).
*
* @param originalNodeComponent the original node to duplicate.
* @param forceDuplicate when set to true
, causes the
@@ -255,8 +255,8 @@ public class Texture3D extends Texture {
* @see Node#cloneTree
* @see NodeComponent#setDuplicateOnCloneTree
*/
- void duplicateAttributes(NodeComponent originalNodeComponent,
- boolean forceDuplicate) {
+ void duplicateAttributes(NodeComponent originalNodeComponent,
+ boolean forceDuplicate) {
super.duplicateAttributes(originalNodeComponent, forceDuplicate);
((Texture3DRetained) retained).initBoundaryModeR(((Texture3DRetained)
diff --git a/src/classes/share/javax/media/j3d/Texture3DRetained.java b/src/classes/share/javax/media/j3d/Texture3DRetained.java
index a8a5f37..5fbfa7b 100644
--- a/src/classes/share/javax/media/j3d/Texture3DRetained.java
+++ b/src/classes/share/javax/media/j3d/Texture3DRetained.java
@@ -35,8 +35,8 @@ import java.util.BitSet;
/**
* Texture3D is a subclass of Texture class. It extends Texture
- * class by adding a third co-ordinate, constructor and a mutator
- * method for setting a 3D texture image.
+ * class by adding a third co-ordinate, constructor and a mutator
+ * method for setting a 3D texture image.
*/
class Texture3DRetained extends TextureRetained {
@@ -74,7 +74,7 @@ class Texture3DRetained extends TextureRetained {
}
/**
- * This method updates the native context.
+ * This method updates the native context.
*/
void bindTexture(Context ctx, int objectId, boolean enable) {
Pipeline.getPipeline().bindTexture3D(ctx, objectId, enable);
@@ -128,7 +128,7 @@ class Texture3DRetained extends TextureRetained {
int width, int height, int depth,
int boundaryWidth, int imageDataType,
Object imageData) {
-
+
Pipeline.getPipeline().updateTexture3DImage(cv.ctx,
numLevels, level,
textureFormat, imageFormat,
@@ -153,8 +153,8 @@ class Texture3DRetained extends TextureRetained {
imageDataType, imageData, useAutoMipMapGeneration(cv));
}
-
- // get an ID for Texture3D
+
+ // get an ID for Texture3D
int getTextureId() {
return (VirtualUniverse.mc.getTexture3DId());
@@ -214,11 +214,11 @@ class Texture3DRetained extends TextureRetained {
/*
System.err.println("Texture3D.reloadTextureImage: level= " + level +
- " image.imageYup= " + image.imageYup + " w= " + image.width +
- " h= " + image.height + " d= " + depth +
+ " image.imageYup= " + image.imageYup + " w= " + image.width +
+ " h= " + image.height + " d= " + depth +
" numLevels= " + numLevels);
*/
-
+
// Texture3D does not need to support Raster
ImageComponentRetained.ImageData imageData = image.getImageData(false);
@@ -241,9 +241,9 @@ class Texture3DRetained extends TextureRetained {
int xoffset = x;
int yoffset = y;
- // Texture3D does not need to support Raster
+ // Texture3D does not need to support Raster
ImageComponentRetained.ImageData imageData = image.getImageData(false);
-
+
updateTextureSubImage(cv,
0, level, xoffset, yoffset, z,
format, image.getImageFormatTypeIntValue(false),
diff --git a/src/classes/share/javax/media/j3d/TextureAttributes.java b/src/classes/share/javax/media/j3d/TextureAttributes.java
index 5610ab1..81f482b 100644
--- a/src/classes/share/javax/media/j3d/TextureAttributes.java
+++ b/src/classes/share/javax/media/j3d/TextureAttributes.java
@@ -77,7 +77,7 @@ import javax.vecmath.Color4f;
*
- *
* C' = C0
* C' = C0 - C1
* C' = C0 C2 + C1 (1 - C2)
* C' = 4 * (
- * (C0r - 0.5) * (C1r - 0.5) +
- * (C0g - 0.5) * (C1g - 0.5) +
+ * (C0r - 0.5) * (C1r - 0.5) +
+ * (C0g - 0.5) * (C1g - 0.5) +
* (C0b - 0.5) * (C1b - 0.5))
@@ -124,7 +124,7 @@ import javax.vecmath.Color4f; *
*
*
*
*
MODULATE
,
+ * @param textureMode the texture mode; one of MODULATE
,
* DECAL
, BLEND
, REPLACE
, or
* COMBINE
* @param transform the transform object, used to transform texture
* coordinates
* @param textureBlendColor the texture constant color
- * @param perspCorrectionMode the perspective correction mode to
+ * @param perspCorrectionMode the perspective correction mode to
* be used for color and/or texture coordinate interpolation;
* one of NICEST
or FASTEST
* @exception IllegalArgumentException if textureMode
@@ -499,7 +499,7 @@ public class TextureAttributes extends NodeComponent {
throw new IllegalArgumentException(J3dI18N.getString("TextureAttributes10"));
}
- if ((perspCorrectionMode != FASTEST) &&
+ if ((perspCorrectionMode != FASTEST) &&
(perspCorrectionMode!= NICEST)) {
throw new IllegalArgumentException(J3dI18N.getString("TextureAttributes9"));
}
@@ -512,7 +512,7 @@ public class TextureAttributes extends NodeComponent {
((TextureAttributesRetained)this.retained).initTextureTransform(transform);
((TextureAttributesRetained)this.retained).initPerspectiveCorrectionMode(perspCorrectionMode);
}
-
+
/**
* Sets the texture mode parameter for this
* appearance component object.
@@ -545,7 +545,7 @@ public class TextureAttributes extends NodeComponent {
* Gets the texture mode parameter for this
* texture attributes object.
* @return textureMode the texture mode
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public int getTextureMode() {
@@ -560,7 +560,7 @@ public class TextureAttributes extends NodeComponent {
* Sets the texture constant color for this
* texture attributes object.
* @param textureBlendColor the texture constant color
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public void setTextureBlendColor(Color4f textureBlendColor) {
@@ -576,12 +576,12 @@ public class TextureAttributes extends NodeComponent {
/**
* Sets the texture blend color for this
- * appearance component object.
+ * appearance component object.
* @param r the red component of the color
* @param g the green component of the color
* @param b the blue component of the color
* @param a the alpha component of the color
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public void setTextureBlendColor(float r, float g, float b, float a) {
@@ -599,8 +599,8 @@ public class TextureAttributes extends NodeComponent {
* Gets the texture blend color for this
* appearance component object.
* @param textureBlendColor the vector that will receive the texture
- * constant color
- * @exception CapabilityNotSetException if appropriate capability is
+ * constant color
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public void getTextureBlendColor(Color4f textureBlendColor) {
@@ -654,7 +654,7 @@ public class TextureAttributes extends NodeComponent {
* correction method should be used.
* @param mode one of NICEST
or FASTEST
* The default value is NICEST
.
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
* @exception IllegalArgumentException if mode value is other
* than FASTEST
or NICEST
.
@@ -676,7 +676,7 @@ public class TextureAttributes extends NodeComponent {
/**
* Gets perspective correction mode value.
* @return mode the value of perspective correction mode
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public int getPerspectiveCorrectionMode() {
@@ -720,7 +720,7 @@ public class TextureAttributes extends NodeComponent {
* is not 3 or 4, or if the arrays for each component are not all
* the same length, or if the texture color table size
* is not a power of 2
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @see Canvas3D#queryProperties
@@ -749,7 +749,7 @@ public class TextureAttributes extends NodeComponent {
* enough to hold the entire table (that is,
* int[numTextureColorTableComponents][textureColorTableSize]
).
*
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @since Java 3D 1.2
@@ -791,21 +791,21 @@ public class TextureAttributes extends NodeComponent {
/**
- * Sets the combine mode for the rgb components of the output color
+ * Sets the combine mode for the rgb components of the output color
* for this object.
*
- * @param combineMode the combine mode, one of:
+ * @param combineMode the combine mode, one of:
* COMBINE_REPLACE
,
- * COMBINE_MODULATE
, COMBINE_ADD
,
+ * COMBINE_MODULATE
, COMBINE_ADD
,
* COMBINE_ADD_SIGNED
, COMBINE_SUBTRACT
,
* COMBINE_INTERPOLATE
, or COMBINE_DOT3
*
* @exception IllegalArgumentException if combineMode
* is a value other than COMBINE_REPLACE
,
- * COMBINE_MODULATE
, COMBINE_ADD
,
+ * COMBINE_MODULATE
, COMBINE_ADD
,
* COMBINE_ADD_SIGNED
, COMBINE_SUBTRACT
,
* COMBINE_INTERPOLATE
, or COMBINE_DOT3
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @see Canvas3D#queryProperties
@@ -833,21 +833,21 @@ public class TextureAttributes extends NodeComponent {
}
/**
- * Sets the combine mode for the alpha component of the output color
+ * Sets the combine mode for the alpha component of the output color
* for this object.
*
- * @param combineMode the combine mode, one of:
+ * @param combineMode the combine mode, one of:
* COMBINE_REPLACE
,
- * COMBINE_MODULATE
, COMBINE_ADD
,
+ * COMBINE_MODULATE
, COMBINE_ADD
,
* COMBINE_ADD_SIGNED
, COMBINE_SUBTRACT
,
* COMBINE_INTERPOLATE
, or COMBINE_DOT3
*
* @exception IllegalArgumentException if combineMode
* is a value other than COMBINE_REPLACE
,
- * COMBINE_MODULATE
, COMBINE_ADD
,
+ * COMBINE_MODULATE
, COMBINE_ADD
,
* COMBINE_ADD_SIGNED
, COMBINE_SUBTRACT
,
* COMBINE_INTERPOLATE
, or COMBINE_DOT3
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @see Canvas3D#queryProperties
@@ -859,7 +859,7 @@ public class TextureAttributes extends NodeComponent {
if (!this.getCapability(ALLOW_COMBINE_WRITE)) {
throw new CapabilityNotSetException(
J3dI18N.getString("TextureAttributes18"));
- }
+ }
}
if ((combineMode < COMBINE_REPLACE) || (combineMode > COMBINE_DOT3)) {
@@ -879,7 +879,7 @@ public class TextureAttributes extends NodeComponent {
* for this object.
* @return the combine mode for the rgb components.
*
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @since Java 3D 1.3
@@ -900,7 +900,7 @@ public class TextureAttributes extends NodeComponent {
* for this object.
* @return the combine mode for the alpha component.
*
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @since Java 3D 1.3
@@ -917,25 +917,25 @@ public class TextureAttributes extends NodeComponent {
}
/**
- * Sets the source for the rgb components of the specified color operand
+ * Sets the source for the rgb components of the specified color operand
* for this object.
*
* @param index color operand in the combine operation
* @param src the color source, one of: COMBINE_OBJECT_COLOR
,
- * COMBINE_TEXTURE_COLOR
,
+ * COMBINE_TEXTURE_COLOR
,
* COMBINE_CONSTANT_COLOR
, or
* COMBINE_PREVIOUS_TEXTURE_UNIT_STATE
*
- * @exception IndexOutOfBoundsException if index
< 0 or
+ * @exception IndexOutOfBoundsException if index
< 0 or
* index
> 2
* @exception IllegalArgumentException if src
* is a value other than COMBINE_OBJECT_COLOR
,
- * COMBINE_TEXTURE_COLOR
,
+ * COMBINE_TEXTURE_COLOR
,
* COMBINE_CONSTANT_COLOR
, or
* COMBINE_PREVIOUS_TEXTURE_UNIT_STATE
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- *
+ *
* @see Canvas3D#queryProperties
*
* @since Java 3D 1.3
@@ -945,7 +945,7 @@ public class TextureAttributes extends NodeComponent {
if (!this.getCapability(ALLOW_COMBINE_WRITE)) {
throw new CapabilityNotSetException(
J3dI18N.getString("TextureAttributes21"));
- }
+ }
}
if ((index < 0) || (index > 2)) {
@@ -953,7 +953,7 @@ public class TextureAttributes extends NodeComponent {
J3dI18N.getString("TextureAttributes25"));
}
- if ((src < COMBINE_OBJECT_COLOR) ||
+ if ((src < COMBINE_OBJECT_COLOR) ||
(src > COMBINE_PREVIOUS_TEXTURE_UNIT_STATE)) {
throw new IllegalArgumentException(
J3dI18N.getString("TextureAttributes26"));
@@ -969,25 +969,25 @@ public class TextureAttributes extends NodeComponent {
}
/**
- * Sets the source for the alpha component of the specified color operand
+ * Sets the source for the alpha component of the specified color operand
* for this object.
*
* @param index color operand in the combine operation
* @param src the color source, one of: COMBINE_OBJECT_COLOR
,
- * COMBINE_TEXTURE_COLOR
,
+ * COMBINE_TEXTURE_COLOR
,
* COMBINE_CONSTANT_COLOR
, or
* COMBINE_PREVIOUS_TEXTURE_UNIT_STATE
*
- * @exception IndexOutOfBoundsException if index
< 0 or
+ * @exception IndexOutOfBoundsException if index
< 0 or
* index
> 2
* @exception IllegalArgumentException if src
* is a value other than COMBINE_OBJECT_COLOR
,
- * COMBINE_TEXTURE_COLOR
,
+ * COMBINE_TEXTURE_COLOR
,
* COMBINE_CONSTANT_COLOR
, or
* COMBINE_PREVIOUS_TEXTURE_UNIT_STATE
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- *
+ *
* @see Canvas3D#queryProperties
*
* @since Java 3D 1.3
@@ -1005,7 +1005,7 @@ public class TextureAttributes extends NodeComponent {
J3dI18N.getString("TextureAttributes25"));
}
- if ((src < COMBINE_OBJECT_COLOR) ||
+ if ((src < COMBINE_OBJECT_COLOR) ||
(src > COMBINE_PREVIOUS_TEXTURE_UNIT_STATE)) {
throw new IllegalArgumentException(
J3dI18N.getString("TextureAttributes26"));
@@ -1029,11 +1029,11 @@ public class TextureAttributes extends NodeComponent {
* @return the source for the rgb components of the specified color
* operand for this object
*
- * @exception IndexOutOfBoundsException if index
< 0 or
+ * @exception IndexOutOfBoundsException if index
< 0 or
* index
> 2
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- *
+ *
* @since Java 3D 1.3
*/
public int getCombineRgbSource(int index) {
@@ -1061,11 +1061,11 @@ public class TextureAttributes extends NodeComponent {
* @return the source for the alpha component of the specified color
* operand for this object
*
- * @exception IndexOutOfBoundsException if index
< 0 or
+ * @exception IndexOutOfBoundsException if index
< 0 or
* index
> 2
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
- *
+ *
* @since Java 3D 1.3
*/
public int getCombineAlphaSource(int index) {
@@ -1089,17 +1089,17 @@ public class TextureAttributes extends NodeComponent {
* for this object.
*
* @param index color operand in the combine operation
- * @param function the color function, one of:
+ * @param function the color function, one of:
* COMBINE_SRC_COLOR
,
- * COMBINE_ONE_MINUS_SRC_COLOR
,
+ * COMBINE_ONE_MINUS_SRC_COLOR
,
* COMBINE_SRC_ALPHA
, or
* COMBINE_ONE_MINUS_SRC_ALPHA
*
- * @exception IndexOutOfBoundsException if index
< 0 or
+ * @exception IndexOutOfBoundsException if index
< 0 or
* index
> 2
* @exception IllegalArgumentException if function
* is a value other than COMBINE_SRC_COLOR
,
- * COMBINE_ONE_MINUS_SRC_COLOR
,
+ * COMBINE_ONE_MINUS_SRC_COLOR
,
* COMBINE_SRC_ALPHA
, or
* COMBINE_ONE_MINUS_SRC_ALPHA
* @exception CapabilityNotSetException if appropriate capability is
@@ -1142,14 +1142,14 @@ public class TextureAttributes extends NodeComponent {
* for this object.
*
* @param index color operand in the combine operation
- * @param function the color function, one of:
+ * @param function the color function, one of:
* COMBINE_SRC_ALPHA
, or
* COMBINE_ONE_MINUS_SRC_ALPHA
*
- * @exception IndexOutOfBoundsException if index
< 0 or
+ * @exception IndexOutOfBoundsException if index
< 0 or
* index
> 2
* @exception IllegalArgumentException if function
- * is a value other than
+ * is a value other than
* COMBINE_SRC_ALPHA
or
* COMBINE_ONE_MINUS_SRC_ALPHA
* @exception CapabilityNotSetException if appropriate capability is
@@ -1196,7 +1196,7 @@ public class TextureAttributes extends NodeComponent {
* @return the function for the rgb components of the specified color
* operand for this object.
*
- * @exception IndexOutOfBoundsException if index
< 0 or
+ * @exception IndexOutOfBoundsException if index
< 0 or
* index
> 2
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
@@ -1228,7 +1228,7 @@ public class TextureAttributes extends NodeComponent {
* @return the function for the alpha component of the specified color
* operand for this object.
*
- * @exception IndexOutOfBoundsException if index
< 0 or
+ * @exception IndexOutOfBoundsException if index
< 0 or
* index
> 2
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
@@ -1255,7 +1255,7 @@ public class TextureAttributes extends NodeComponent {
* Sets the scale factor for the rgb components of the output color
* for this object.
*
- * @param scale the scale factor for the rgb components of the output
+ * @param scale the scale factor for the rgb components of the output
* color. It must be one of the following: 1, 2, or 4.
*
* @exception IllegalArgumentException if scale
is a
@@ -1292,7 +1292,7 @@ public class TextureAttributes extends NodeComponent {
* Sets the scale factor for the alpha component of the output color
* for this object.
*
- * @param scale the scale factor for the alpha component of the output
+ * @param scale the scale factor for the alpha component of the output
* color. It must be one of the following: 1, 2, or 4.
*
* @exception IllegalArgumentException if scale
is a
@@ -1380,7 +1380,7 @@ public class TextureAttributes extends NodeComponent {
/**
- * @deprecated replaced with cloneNodeComponent(boolean forceDuplicate)
+ * @deprecated replaced with cloneNodeComponent(boolean forceDuplicate)
*/
public NodeComponent cloneNodeComponent() {
TextureAttributes ta = new TextureAttributes();
@@ -1394,7 +1394,7 @@ public class TextureAttributes extends NodeComponent {
* the current node. This method is called from the
* duplicateNode
method. This routine does
* the actual duplication of all "local data" (any data defined in
- * this object).
+ * this object).
*
* @param originalNodeComponent the original node to duplicate.
* @param forceDuplicate when set to true
, causes the
@@ -1406,14 +1406,14 @@ public class TextureAttributes extends NodeComponent {
* @see Node#cloneTree
* @see NodeComponent#setDuplicateOnCloneTree
*/
- void duplicateAttributes(NodeComponent originalNodeComponent,
- boolean forceDuplicate) {
+ void duplicateAttributes(NodeComponent originalNodeComponent,
+ boolean forceDuplicate) {
super.duplicateAttributes(originalNodeComponent, forceDuplicate);
-
- TextureAttributesRetained attr =
+
+ TextureAttributesRetained attr =
(TextureAttributesRetained) originalNodeComponent.retained;
- TextureAttributesRetained rt = (TextureAttributesRetained) retained;
+ TextureAttributesRetained rt = (TextureAttributesRetained) retained;
Color4f c = new Color4f();
attr.getTextureBlendColor(c);
@@ -1435,10 +1435,10 @@ public class TextureAttributes extends NodeComponent {
// start fix issue 636
rt.initCombineRgbMode(attr.getCombineRgbMode());
rt.initCombineAlphaMode(attr.getCombineAlphaMode());
-
+
rt.initCombineRgbScale(attr.getCombineRgbScale());
rt.initCombineAlphaScale(attr.getCombineAlphaScale());
-
+
// Check one of the combine source or function arrays
if (attr.combineRgbSrc != null) {
for (int i=0; i < 3; i++) {
diff --git a/src/classes/share/javax/media/j3d/TextureAttributesRetained.java b/src/classes/share/javax/media/j3d/TextureAttributesRetained.java
index 235ceb0..4bf31ae 100644
--- a/src/classes/share/javax/media/j3d/TextureAttributesRetained.java
+++ b/src/classes/share/javax/media/j3d/TextureAttributesRetained.java
@@ -101,7 +101,7 @@ class TextureAttributesRetained extends NodeComponentRetained {
static final void initTextureEnums() {
// create some of the enums Integer to be used in the messages
- // this can be eliminated if the message is modified to take
+ // this can be eliminated if the message is modified to take
// integer itself
//
// NOTE: check with the actual enum value before using this
@@ -287,7 +287,7 @@ class TextureAttributesRetained extends NodeComponentRetained {
if (table == null) {
sendMessage(TEXTURE_COLOR_TABLE_CHANGED, null, null);
} else {
- int ctable[] = new int[textureColorTableSize *
+ int ctable[] = new int[textureColorTableSize *
numTextureColorTableComponents];
System.arraycopy(textureColorTable, 0, ctable, 0,
textureColorTable.length);
@@ -362,10 +362,10 @@ class TextureAttributesRetained extends NodeComponentRetained {
final int getTextureColorTableSize() {
return textureColorTableSize;
}
-
+
final void initCombineRgbMode(int mode) {
- combineRgbMode = mode;
+ combineRgbMode = mode;
}
final void setCombineRgbMode(int mode) {
@@ -399,7 +399,7 @@ class TextureAttributesRetained extends NodeComponentRetained {
}
combineRgbSrc[index] = src;
}
-
+
final void setCombineRgbSource(int index, int src) {
initCombineRgbSource(index, src);
sendMessage(COMBINE_RGB_SRC_CHANGED, enums[index], enums[src]);
@@ -424,7 +424,7 @@ class TextureAttributesRetained extends NodeComponentRetained {
}
combineAlphaSrc[index] = src;
}
-
+
final void setCombineAlphaSource(int index, int src) {
initCombineAlphaSource(index, src);
sendMessage(COMBINE_ALPHA_SRC_CHANGED, enums[index], enums[src]);
@@ -519,8 +519,8 @@ class TextureAttributesRetained extends NodeComponentRetained {
void updateNative(Canvas3D cv, boolean simulate, int textureFormat) {
//System.err.println("TextureAttributes/updateNative: simulate= " + simulate + " " + this);
-
- //if ((cv.textureExtendedFeatures & Canvas3D.TEXTURE_COLOR_TABLE)
+
+ //if ((cv.textureExtendedFeatures & Canvas3D.TEXTURE_COLOR_TABLE)
// == 0) && textureColorTable != null) {
// System.err.println("TextureColorTable Not supported");
//}
@@ -528,10 +528,10 @@ class TextureAttributesRetained extends NodeComponentRetained {
//System.err.println("textureMode= " + textureMode);
boolean isIdentity =
((transform.getType() & Transform3D.IDENTITY) != 0);
-
+
if (simulate == false) {
if (VirtualUniverse.mc.useCombiners &&
- (cv.textureExtendedFeatures &
+ (cv.textureExtendedFeatures &
Canvas3D.TEXTURE_REGISTER_COMBINERS) != 0) {
Pipeline.getPipeline().updateRegisterCombiners(cv.ctx,
transform.mat, isIdentity, textureMode, perspCorrectionMode,
@@ -544,7 +544,7 @@ class TextureAttributesRetained extends NodeComponentRetained {
} else {
if (textureMode == TextureAttributes.COMBINE) {
- if ((cv.textureExtendedFeatures &
+ if ((cv.textureExtendedFeatures &
Canvas3D.TEXTURE_COMBINE) != 0) {
// Texture COMBINE is supported by the underlying layer
@@ -561,26 +561,26 @@ class TextureAttributesRetained extends NodeComponentRetained {
if (((combineRgbMode == TextureAttributes.COMBINE_DOT3) &&
- ((cv.textureExtendedFeatures &
- Canvas3D.TEXTURE_COMBINE_DOT3) == 0)) ||
+ ((cv.textureExtendedFeatures &
+ Canvas3D.TEXTURE_COMBINE_DOT3) == 0)) ||
((combineRgbMode == TextureAttributes.COMBINE_SUBTRACT) &&
- ((cv.textureExtendedFeatures &
+ ((cv.textureExtendedFeatures &
Canvas3D.TEXTURE_COMBINE_SUBTRACT) == 0))) {
- // Combine DOT3/SUBTRACT is not supported by the
+ // Combine DOT3/SUBTRACT is not supported by the
// underlying layer, fallback to COMBINE_REPLACE
_combineRgbMode = TextureAttributes.COMBINE_REPLACE;
}
if (((combineAlphaMode == TextureAttributes.COMBINE_DOT3) &&
- ((cv.textureExtendedFeatures &
+ ((cv.textureExtendedFeatures &
Canvas3D.TEXTURE_COMBINE_DOT3) == 0)) ||
((combineAlphaMode == TextureAttributes.COMBINE_SUBTRACT) &&
- ((cv.textureExtendedFeatures &
+ ((cv.textureExtendedFeatures &
Canvas3D.TEXTURE_COMBINE_SUBTRACT) == 0))) {
- // Combine DOT3/SUBTRACT is not supported by the
+ // Combine DOT3/SUBTRACT is not supported by the
// underlying layer, fallback to COMBINE_REPLACE
_combineAlphaMode = TextureAttributes.COMBINE_REPLACE;
@@ -616,10 +616,10 @@ class TextureAttributesRetained extends NodeComponentRetained {
}
- if (((cv.textureExtendedFeatures & Canvas3D.TEXTURE_COLOR_TABLE)
+ if (((cv.textureExtendedFeatures & Canvas3D.TEXTURE_COLOR_TABLE)
!= 0) && textureColorTable != null) {
- Pipeline.getPipeline().updateTextureColorTable(cv.ctx,
+ Pipeline.getPipeline().updateTextureColorTable(cv.ctx,
numTextureColorTableComponents,
textureColorTableSize, textureColorTable);
}
@@ -633,7 +633,7 @@ class TextureAttributesRetained extends NodeComponentRetained {
textureBlendColor.x, textureBlendColor.y,
textureBlendColor.z, textureBlendColor.w, textureFormat);
- if (((cv.textureExtendedFeatures & Canvas3D.TEXTURE_COLOR_TABLE)
+ if (((cv.textureExtendedFeatures & Canvas3D.TEXTURE_COLOR_TABLE)
!= 0) && textureColorTable != null) {
Pipeline.getPipeline().updateTextureColorTable(cv.ctx, numTextureColorTableComponents,
@@ -676,7 +676,7 @@ class TextureAttributesRetained extends NodeComponentRetained {
/**
- * Creates and initializes a mirror object, point the mirror object
+ * Creates and initializes a mirror object, point the mirror object
* to the retained object if the object is not editable
*/
synchronized void createMirrorObject() {
@@ -706,10 +706,10 @@ class TextureAttributesRetained extends NodeComponentRetained {
/**
- * Update the "component" field of the mirror object with the
+ * Update the "component" field of the mirror object with the
* given "value"
*/
- synchronized void updateMirrorObject(int component, Object value,
+ synchronized void updateMirrorObject(int component, Object value,
Object value2) {
TextureAttributesRetained mirrorTa = (TextureAttributesRetained)mirror;
mirrorTa.mirrorCompDirty = true;
@@ -730,7 +730,7 @@ class TextureAttributesRetained extends NodeComponentRetained {
}
else if ((component & CORRECTION_CHANGED) != 0) {
mirrorTa.perspCorrectionMode = ((Integer)value).intValue();
- }
+ }
else if ((component & TEXTURE_COLOR_TABLE_CHANGED) != 0) {
if (value == null) {
mirrorTa.textureColorTable = null;
@@ -739,9 +739,9 @@ class TextureAttributesRetained extends NodeComponentRetained {
} else {
Object args[] = (Object[])value;
mirrorTa.textureColorTable = (int[])args[2];
- mirrorTa.numTextureColorTableComponents =
+ mirrorTa.numTextureColorTableComponents =
((Integer)args[0]).intValue();
- mirrorTa.textureColorTableSize =
+ mirrorTa.textureColorTableSize =
((Integer)args[1]).intValue();
}
}
@@ -855,7 +855,7 @@ class TextureAttributesRetained extends NodeComponentRetained {
// tr.textureColorTable != null
return false;
} else {
- if (tr.textureColorTable.length != this.textureColorTable.length)
+ if (tr.textureColorTable.length != this.textureColorTable.length)
return false;
for (int i = 0; i < this.textureColorTable.length; i++) {
@@ -895,7 +895,7 @@ class TextureAttributesRetained extends NodeComponentRetained {
tr.combineAlphaFcn[i] = combineAlphaFcn[i];
}
}
-
+
// other attributes are copied in super.clone()
return tr;
}
@@ -921,7 +921,7 @@ class TextureAttributesRetained extends NodeComponentRetained {
}
numTextureColorTableComponents = tr.numTextureColorTableComponents;
textureColorTableSize = tr.textureColorTableSize;
-
+
// set the combine mode attributes
@@ -951,7 +951,7 @@ class TextureAttributesRetained extends NodeComponentRetained {
final void sendMessage(int attrMask, Object attr1, Object attr2) {
ArrayList univList = new ArrayList();
- ArrayList gaList = Shape3DRetained.getGeomAtomsList(mirror.users, univList);
+ ArrayList gaList = Shape3DRetained.getGeomAtomsList(mirror.users, univList);
// Send to rendering attribute structure, regardless of
@@ -973,7 +973,7 @@ class TextureAttributesRetained extends NodeComponentRetained {
createMessage = new J3dMessage();
createMessage.threads = J3dThread.UPDATE_RENDER;
createMessage.type = J3dMessage.TEXTUREATTRIBUTES_CHANGED;
-
+
createMessage.universe = (VirtualUniverse) univList.get(i);
createMessage.args[0] = this;
createMessage.args[1] = new Integer(attrMask);
@@ -983,7 +983,7 @@ class TextureAttributesRetained extends NodeComponentRetained {
GeometryAtom[] gaArr = new GeometryAtom[gL.size()];
gL.toArray(gaArr);
createMessage.args[3] = gaArr;
-
+
VirtualUniverse.mc.processMessage(createMessage);
}
}
diff --git a/src/classes/share/javax/media/j3d/TextureBin.java b/src/classes/share/javax/media/j3d/TextureBin.java
index 01219c6..b5d2778 100644
--- a/src/classes/share/javax/media/j3d/TextureBin.java
+++ b/src/classes/share/javax/media/j3d/TextureBin.java
@@ -102,10 +102,10 @@ class TextureBin extends Object implements ObjectUpdate {
* TextureUnitState dirty bit. The ith bit set means the (i-1)
* texture unit state is modified. Note, this mask only supports
* 30 texture unit states. If the appearance uses more than 31
- * texture unit states, then the modification of the 32nd texture
+ * texture unit states, then the modification of the 32nd texture
* unit state and up will have the first bit set, that means
* the TextureBin will be reset, rather than only the particular
- * texture unit state will be reset.
+ * texture unit state will be reset.
*/
int soleUserCompDirty;
@@ -137,7 +137,7 @@ class TextureBin extends Object implements ObjectUpdate {
int numRenderMolecules = 0;
int numEditingRenderMolecules = 0;
-
+
int tbFlag = 0; // a general bitmask for TextureBin
// Following are the bits used in flag
@@ -148,12 +148,12 @@ class TextureBin extends Object implements ObjectUpdate {
final static int CONTIGUOUS_ACTIVE_UNITS = 0x0008;
final static int RESORT = 0x0010;
final static int ON_UPDATE_CHECK_LIST = 0x0020;
-
+
final static int USE_DISPLAYLIST = -2;
final static int USE_VERTEXARRAY = -1;
TextureBin(TextureUnitStateRetained[] state, AppearanceRetained app,
- RenderBin rb) {
+ RenderBin rb) {
renderBin = rb;
tbFlag = 0;
reset(state, app);
@@ -176,8 +176,8 @@ class TextureBin extends Object implements ObjectUpdate {
// TextureBin
tbFlag &= ~TextureBin.SOLE_USER;
if (VirtualUniverse.mc.allowSoleUser) {
- if ((app != null) &&
- (app.changedFrequent &
+ if ((app != null) &&
+ (app.changedFrequent &
(AppearanceRetained.TEXTURE |
AppearanceRetained.TEXCOORD_GEN |
AppearanceRetained.TEXTURE_ATTR |
@@ -192,7 +192,7 @@ class TextureBin extends Object implements ObjectUpdate {
} else {
this.app = null;
}
-
+
resetTextureState(state);
if ((tbFlag & TextureBin.ON_RENDER_BIN_LIST) == 0) {
@@ -243,7 +243,7 @@ class TextureBin extends Object implements ObjectUpdate {
texUnitState[i].mirror = state[i];
}
- // for the lowest level of node component in
+ // for the lowest level of node component in
// TextureBin, clone it only if it is not
// changedFrequent; in other words, if the
// lowest level of texture related node components
@@ -261,18 +261,18 @@ class TextureBin extends Object implements ObjectUpdate {
if (soleUser &&
(tex.getTextureBinRefCount(this) == 0) &&
(tex != state[i].texture)) {
- // In this case texture change but
+ // In this case texture change but
// TextureBin will not invoke clear() to reset.
// So we need to free the texture resource here.
- renderBin.addTextureResourceFreeList(tex);
+ renderBin.addTextureResourceFreeList(tex);
}
}
-
+
texUnitState[i].texture = state[i].texture;
// increment the TextureBin ref count of the new
// texture
-
+
if (texUnitState[i].texture != null) {
texUnitState[i].texture.incTextureBinRefCount(this);
}
@@ -291,9 +291,9 @@ class TextureBin extends Object implements ObjectUpdate {
if (texUnitState[i].texAttrs == null ||
texUnitState[i].texAttrs.source != null) {
- texUnitState[i].texAttrs =
+ texUnitState[i].texAttrs =
new TextureAttributesRetained();
- }
+ }
texUnitState[i].texAttrs.set(
state[i].texAttrs);
texUnitState[i].texAttrs.mirrorCompDirty = true;
@@ -302,7 +302,7 @@ class TextureBin extends Object implements ObjectUpdate {
// the mirror node component in the mirror
// reference in the clone object. This
// will be used in state download to
- // avoid redundant download
+ // avoid redundant download
if (soleUser) {
texUnitState[i].texAttrs.mirror =
@@ -329,9 +329,9 @@ class TextureBin extends Object implements ObjectUpdate {
if (texUnitState[i].texGen == null ||
texUnitState[i].texGen.source != null) {
- texUnitState[i].texGen =
+ texUnitState[i].texGen =
new TexCoordGenerationRetained();
- }
+ }
texUnitState[i].texGen.set(state[i].texGen);
texUnitState[i].texGen.mirrorCompDirty = true;
@@ -341,7 +341,7 @@ class TextureBin extends Object implements ObjectUpdate {
// the mirror node component in the mirror
// reference in the clone object. This
// will be used in state download to
- // avoid redundant download
+ // avoid redundant download
if (soleUser) {
texUnitState[i].texGen.mirror = state[i].texGen;
@@ -379,7 +379,7 @@ class TextureBin extends Object implements ObjectUpdate {
// resorting is needed
if ((texUnitState[0] == null && prevFirstTexture != null) ||
- (texUnitState[0] != null &&
+ (texUnitState[0] != null &&
texUnitState[0].texture != prevFirstTexture)) {
tbFlag |= TextureBin.RESORT;
}
@@ -413,7 +413,7 @@ class TextureBin extends Object implements ObjectUpdate {
// the reference count. If the reference count == 0, tell
// the renderer to free up the resource
if (texUnitState != null) {
-
+
TextureRetained tex;
for (int i = 0; i < texUnitState.length; i++) {
@@ -445,7 +445,7 @@ class TextureBin extends Object implements ObjectUpdate {
}
}
}
-
+
/**
@@ -455,13 +455,13 @@ class TextureBin extends Object implements ObjectUpdate {
int i, j, k = 0;
TextureRetained texture;
-
+
// if this TextureBin is a soleUser case or the incoming
// app has changedFrequent bit set for any of the texture
// related component, then either the current TextureBin
// or the incoming app requires the same app match
- if (((tbFlag & TextureBin.SOLE_USER) != 0) ||
- ((ra.app != null) &&
+ if (((tbFlag & TextureBin.SOLE_USER) != 0) ||
+ ((ra.app != null) &&
(ra.app.changedFrequent &
(AppearanceRetained.TEXTURE |
AppearanceRetained.TEXCOORD_GEN |
@@ -500,8 +500,8 @@ class TextureBin extends Object implements ObjectUpdate {
if (texUnitState == null || state == null)
return (false);
-
- if (state.length != texUnitState.length)
+
+ if (state.length != texUnitState.length)
return (false);
for (i = 0; i < texUnitState.length; i++) {
@@ -531,7 +531,7 @@ class TextureBin extends Object implements ObjectUpdate {
/*
- // updateNodeComponentCheck is called for each soleUser TextureBin
+ // updateNodeComponentCheck is called for each soleUser TextureBin
// into which new renderAtom has been added. This method is called before
// updateNodeComponent() to allow TextureBin to catch any node
// component changes that have been missed because the changes
@@ -602,9 +602,9 @@ class TextureBin extends Object implements ObjectUpdate {
}
}
*/
-
-
+
+
/**
* updateNodeComponent is called from RenderBin to update the
@@ -616,18 +616,18 @@ class TextureBin extends Object implements ObjectUpdate {
// don't bother to update if the TextureBin is already
// removed from RenderBin
- if ((tbFlag & TextureBin.ON_RENDER_BIN_LIST) == 0)
+ if ((tbFlag & TextureBin.ON_RENDER_BIN_LIST) == 0)
return;
// if any of the texture reference in the appearance referenced
// by a sole user TextureBin is being modified, just do a reset
- if (((tbFlag & TextureBin.SOLE_USER) != 0) &&
- ((soleUserCompDirty & TextureBin.SOLE_USER_DIRTY_REF) != 0)) {
+ if (((tbFlag & TextureBin.SOLE_USER) != 0) &&
+ ((soleUserCompDirty & TextureBin.SOLE_USER_DIRTY_REF) != 0)) {
resetTextureState(app.texUnitState);
return;
- }
+ }
if (texUnitState == null) {
soleUserCompDirty = 0;
@@ -646,7 +646,7 @@ class TextureBin extends Object implements ObjectUpdate {
if (tus.mirror != null) {
mirrorTUS = (TextureUnitStateRetained)tus.mirror;
-
+
if (tus.texture != mirrorTUS.texture) {
if (tus.texture != null) {
tus.texture.decTextureBinRefCount(this);
@@ -663,7 +663,7 @@ class TextureBin extends Object implements ObjectUpdate {
tbFlag |= TextureBin.RESORT;
}
}
-
+
if (mirrorTUS.texAttrs != null) {
if (mirrorTUS.texAttrs.changedFrequent != 0) {
@@ -671,11 +671,11 @@ class TextureBin extends Object implements ObjectUpdate {
} else {
if (tus.texAttrs == null ||
tus.texAttrs.source != null) {
- tus.texAttrs =
+ tus.texAttrs =
new TextureAttributesRetained();
}
tus.texAttrs.set(mirrorTUS.texAttrs);
- tus.texAttrs.mirrorCompDirty = true;
+ tus.texAttrs.mirrorCompDirty = true;
if (soleUser) {
tus.texAttrs.mirror = mirrorTUS.texAttrs;
@@ -686,19 +686,19 @@ class TextureBin extends Object implements ObjectUpdate {
} else {
tus.texAttrs = null;
}
-
+
if (mirrorTUS.texGen != null) {
if (mirrorTUS.texGen.changedFrequent != 0) {
tus.texGen = mirrorTUS.texGen;
} else {
if (tus.texGen == null ||
tus.texGen.source != null) {
- tus.texGen =
+ tus.texGen =
new TexCoordGenerationRetained();
}
tus.texGen.set(mirrorTUS.texGen);
tus.texGen.mirrorCompDirty = true;
-
+
if (soleUser) {
tus.texGen.mirror = mirrorTUS.texGen;
} else {
@@ -720,7 +720,7 @@ class TextureBin extends Object implements ObjectUpdate {
soleUserCompDirty &= ~(TextureBin.SOLE_USER_DIRTY_TA |
TextureBin.SOLE_USER_DIRTY_TC);
- }
+ }
if ((soleUserCompDirty & TextureBin.SOLE_USER_DIRTY_TEXTURE) != 0) {
@@ -783,17 +783,17 @@ class TextureBin extends Object implements ObjectUpdate {
public void updateObject() {
if (!addOpaqueRMs.isEmpty()) {
- opaqueRMList = addAll(opaqueRenderMoleculeMap, addOpaqueRMs,
+ opaqueRMList = addAll(opaqueRenderMoleculeMap, addOpaqueRMs,
opaqueRMList, true);
}
if (!addTransparentRMs.isEmpty()) {
- // If transparent and not in bg geometry and inodepth
+ // If transparent and not in bg geometry and inodepth
// sorted transparency
if (transparentRMList == null &&
(renderBin.transpSortMode == View.TRANSPARENCY_SORT_NONE ||
environmentSet.lightBin.geometryBackground != null)) {
- // System.err.println("========> addTransparentTextureBin "+this);
- transparentRMList = addAll(transparentRenderMoleculeMap,
+ // System.err.println("========> addTransparentTextureBin "+this);
+ transparentRMList = addAll(transparentRenderMoleculeMap,
addTransparentRMs, transparentRMList, false);
// Eventhough we are adding to transparentList , if all the RMS
// have been switched already due to changeLists, then there is
@@ -804,9 +804,9 @@ class TextureBin extends Object implements ObjectUpdate {
}
else {
- transparentRMList = addAll(transparentRenderMoleculeMap,
+ transparentRMList = addAll(transparentRenderMoleculeMap,
addTransparentRMs, transparentRMList, false);
- }
+ }
}
tbFlag &= ~TextureBin.ON_UPDATE_LIST;
@@ -823,24 +823,24 @@ class TextureBin extends Object implements ObjectUpdate {
* to access another list and use rm.next to continue
* until both rm.next and rm.nextMap are null.
*
- * renderMoleculeMap is use to assist faster location of
+ * renderMoleculeMap is use to assist faster location of
* renderMolecule List with the same localToVWorld. The
- * start of renderMolecule in the list with same
+ * start of renderMolecule in the list with same
* localToVworld is insert in renderMoleculeMap. This
* map is clean up at removeRenderMolecule(). TextureBin
* also use the map for quick location of renderMolecule
* with the same localToVworld and attributes in
* findRenderMolecule().
*/
- RenderMolecule addAll(HashMap renderMoleculeMap, HashMap addRMs,
- RenderMolecule startList,
+ RenderMolecule addAll(HashMap renderMoleculeMap, HashMap addRMs,
+ RenderMolecule startList,
boolean opaqueList) {
int i;
RenderMolecule r;
Collection c = addRMs.values();
Iterator listIterator = c.iterator();
RenderMolecule renderMoleculeList, head;
-
+
while (listIterator.hasNext()) {
boolean changed = false;
ArrayList curList = (ArrayList)listIterator.next();
@@ -875,10 +875,10 @@ class TextureBin extends Object implements ObjectUpdate {
startList.nextMap.checkEquivalenceWithLeftNeighbor(r,
RenderMolecule.ALL_DIRTY_BITS);
}
-
+
}
else {
- // Insert the renderMolecule next to a RM that has equivalent
+ // Insert the renderMolecule next to a RM that has equivalent
// texture unit state
if ((head = insertRenderMolecule(r, renderMoleculeList)) != null) {
if (renderMoleculeList.prevMap != null) {
@@ -921,12 +921,12 @@ class TextureBin extends Object implements ObjectUpdate {
}
else {
startList = renderMoleculeList;
- startList.dirtyAttrsAcrossRms =
+ startList.dirtyAttrsAcrossRms =
RenderMolecule.ALL_DIRTY_BITS;
}
}
}
-
+
addRMs.clear();
return startList;
}
@@ -935,7 +935,7 @@ class TextureBin extends Object implements ObjectUpdate {
// XXXX: Could the analysis be done during insertRenderMolecule?
// Return the head of the list,
// if the insertion occurred at beginning of the list
- RenderMolecule insertRenderMolecule(RenderMolecule r,
+ RenderMolecule insertRenderMolecule(RenderMolecule r,
RenderMolecule renderMoleculeList) {
RenderMolecule rm, retval;
@@ -991,13 +991,13 @@ class TextureBin extends Object implements ObjectUpdate {
map = addOpaqueRMs;
else
map = addTransparentRMs;
-
+
if ((list = (ArrayList)map.get(r.localToVworld)) == null) {
list = new ArrayList();
map.put(r.localToVworld, list);
}
list.add(r);
-
+
if ((tbFlag & TextureBin.ON_UPDATE_LIST) == 0) {
tbFlag |= TextureBin.ON_UPDATE_LIST;
rb.objUpdateList.add(this);
@@ -1036,7 +1036,7 @@ class TextureBin extends Object implements ObjectUpdate {
if (list.isEmpty()) {
addMap.remove(r.localToVworld);
}
-
+
r.prev = null;
r.next = null;
found = true;
@@ -1070,7 +1070,7 @@ class TextureBin extends Object implements ObjectUpdate {
if (r.definingTransparency != null &&
(r.definingTransparency.changedFrequent != 0))
r.definingTransparency = null;
-
+
renderBin.removeRenderMolecule(r);
if (r.isOpaqueOrInOG) {
opaqueRMList = head;
@@ -1078,7 +1078,7 @@ class TextureBin extends Object implements ObjectUpdate {
else {
transparentRMList = head;
}
-
+
}
// If the renderMolecule removed is not opaque then ..
if (!r.isOpaqueOrInOG && transparentRMList == null && (renderBin.transpSortMode == View.TRANSPARENCY_SORT_NONE ||
@@ -1105,7 +1105,7 @@ class TextureBin extends Object implements ObjectUpdate {
texUnitState = null;
}
}
-
+
/**
* This method is called to update the state for this
* TextureBin. This is only applicable in the single-pass case.
@@ -1122,7 +1122,7 @@ class TextureBin extends Object implements ObjectUpdate {
}
cv.textureBin = this;
-
+
// save the current number of active texture unit so as
// to be able to reset the one that is not enabled in this bin
@@ -1180,18 +1180,18 @@ class TextureBin extends Object implements ObjectUpdate {
if (j >= cv.texUnitState.length) {
// We finish enabling the texture state.
// Note that it is possible
- // texUnitState.length > cv.texUnitState.length
+ // texUnitState.length > cv.texUnitState.length
break;
}
if ((texUnitState[i] != null) &&
texUnitState[i].isTextureEnabled()) {
- if (dirty ||
+ if (dirty ||
cv.texUnitState[j].mirror == null ||
cv.texUnitState[j].mirror != texUnitState[i].mirror) {
// update the texture unit state
- texUnitState[i].updateNative(j, cv, false, false);
+ texUnitState[i].updateNative(j, cv, false, false);
cv.texUnitState[j].mirror = texUnitState[i].mirror;
}
@@ -1200,11 +1200,11 @@ class TextureBin extends Object implements ObjectUpdate {
lastActiveTexUnitIdx = j;
} else {
- if (j <= cv.getLastActiveTexUnit()) {
+ if (j <= cv.getLastActiveTexUnit()) {
cv.resetTexture(cv.ctx, j);
}
}
-
+
j++;
}
@@ -1239,7 +1239,7 @@ class TextureBin extends Object implements ObjectUpdate {
/*
System.err.println("TextureBin/render " + this +
- " numActiveTexUnit= " + numActiveTexUnit +
+ " numActiveTexUnit= " + numActiveTexUnit +
" maxTextureUnits= " + cv.maxTextureUnits);
*/
@@ -1280,17 +1280,17 @@ class TextureBin extends Object implements ObjectUpdate {
/**
- * render list of RenderMolecule
+ * render list of RenderMolecule
*/
void renderList(Canvas3D cv, int pass, RenderMolecule rlist) {
assert pass < 0;
- // bit mask of all attr fields that are equivalent across
+ // bit mask of all attr fields that are equivalent across
// renderMolecules thro. ORing of invisible RMs.
int combinedDirtyBits = 0;
boolean rmVisible = true;
RenderMolecule rm = rlist;
-
+
while (rm != null) {
if(rmVisible) {
combinedDirtyBits = rm.dirtyAttrsAcrossRms;
@@ -1300,7 +1300,7 @@ class TextureBin extends Object implements ObjectUpdate {
}
rmVisible = rm.render(cv, pass, combinedDirtyBits);
-
+
// next render molecule or the nextmap
if (rm.next == null) {
@@ -1311,10 +1311,10 @@ class TextureBin extends Object implements ObjectUpdate {
}
}
}
-
+
/**
- * render sorted transparent list
+ * render sorted transparent list
*/
void renderList(Canvas3D cv, int pass, TransparentRenderingInfo tinfo) {
assert pass < 0;
@@ -1344,7 +1344,7 @@ class TextureBin extends Object implements ObjectUpdate {
rmlist = opaqueRMList;
allMap = opaqueRenderMoleculeMap;
}
-
+
}
else {
if (transparentRMList == null &&
@@ -1380,7 +1380,7 @@ class TextureBin extends Object implements ObjectUpdate {
}
HashMap renderMoleculeMap;
RenderMolecule startList;
-
+
// Now insert in the other bin
r.evalAlphaUsage(shaderBin.attributeBin.definingRenderingAttributes, texUnitState);
r.isOpaqueOrInOG = r.isOpaque() ||r.inOrderedGroup;
@@ -1396,7 +1396,7 @@ class TextureBin extends Object implements ObjectUpdate {
renderBin.transpSortMode != View.TRANSPARENCY_SORT_NONE) {
renderBin.addDisplayListResourceFreeList(r);
renderBin.removeDirtyRenderMolecule(r);
-
+
r.vwcBounds.set(null);
r.displayListId = 0;
r.displayListIdObj = null;
@@ -1422,10 +1422,10 @@ class TextureBin extends Object implements ObjectUpdate {
else {
markDlistAsDirty(r);
}
-
+
}
renderMoleculeList = (RenderMolecule)renderMoleculeMap.get(r.localToVworld);
-
+
if (renderMoleculeList == null) {
renderMoleculeList = r;
renderMoleculeMap.put(r.localToVworld, renderMoleculeList);
@@ -1446,7 +1446,7 @@ class TextureBin extends Object implements ObjectUpdate {
startList.dirtyAttrsAcrossRms = RenderMolecule.ALL_DIRTY_BITS;
}
else {
- // Insert the renderMolecule next to a RM that has equivalent
+ // Insert the renderMolecule next to a RM that has equivalent
// texture unit state
if ((head = insertRenderMolecule(r, renderMoleculeList)) != null) {
if (renderMoleculeList.prevMap != null) {
@@ -1525,7 +1525,7 @@ class TextureBin extends Object implements ObjectUpdate {
// Update the maps and remove this entry from the map list
else if (r.prev == null && r.next == null) {
if (r.prevMap != null) {
- r.prevMap.nextMap = r.nextMap;
+ r.prevMap.nextMap = r.nextMap;
}
else {
@@ -1539,9 +1539,9 @@ class TextureBin extends Object implements ObjectUpdate {
if (r.prevMap != null) {
r.nextMap.checkEquivalenceWithLeftNeighbor(r.prevMap,RenderMolecule.ALL_DIRTY_BITS);
}
-
+
}
-
+
allMap.remove(r.localToVworld);
@@ -1590,7 +1590,7 @@ class TextureBin extends Object implements ObjectUpdate {
shaderBin.incrActiveTextureBin();
}
-
+
numEditingRenderMolecules++;
}
}
diff --git a/src/classes/share/javax/media/j3d/TextureCubeMap.java b/src/classes/share/javax/media/j3d/TextureCubeMap.java
index bca8144..2a36943 100644
--- a/src/classes/share/javax/media/j3d/TextureCubeMap.java
+++ b/src/classes/share/javax/media/j3d/TextureCubeMap.java
@@ -46,7 +46,7 @@ import javax.vecmath.*;
*
* The TextureCubeMap image is defined by specifying the images for each
* face of the cube. The cube map texture can be thought of as centered at
- * the orgin of and aligned to an XYZ coordinate system. The names
+ * the orgin of and aligned to an XYZ coordinate system. The names
* of the cube faces are:
*
*
* Note that as of Java 3D 1.5, the texture width and height are no longer
@@ -74,39 +74,39 @@ public class TextureCubeMap extends Texture {
// TODO KCR : NPOT
/**
- * Specifies the face of the cube that is pierced by the positive x axis
+ * Specifies the face of the cube that is pierced by the positive x axis
*/
public static final int POSITIVE_X = 0;
/**
- * Specifies the face of the cube that is pierced by the negative x axis
+ * Specifies the face of the cube that is pierced by the negative x axis
*/
public static final int NEGATIVE_X = 1;
-
+
/**
- * Specifies the face of the cube that is pierced by the positive y axis
+ * Specifies the face of the cube that is pierced by the positive y axis
*/
public static final int POSITIVE_Y = 2;
/**
- * Specifies the face of the cube that is pierced by the negative y axis
+ * Specifies the face of the cube that is pierced by the negative y axis
*/
public static final int NEGATIVE_Y = 3;
/**
- * Specifies the face of the cube that is pierced by the positive z axis
+ * Specifies the face of the cube that is pierced by the positive z axis
*/
public static final int POSITIVE_Z = 4;
-
+
/**
- * Specifies the face of the cube that is pierced by the negative z axis
+ * Specifies the face of the cube that is pierced by the negative z axis
*/
public static final int NEGATIVE_Z = 5;
/**
* Constructs a texture object using default values.
- * Note that the default constructor creates a texture object with
+ * Note that the default constructor creates a texture object with
* a width of 0 and is, therefore, not useful.
*/
public TextureCubeMap() {
@@ -115,12 +115,12 @@ public class TextureCubeMap extends Texture {
/**
* Constructs an empty TextureCubeMap object with specified mipmapMode
- * format, and width. Image at base level
- * must be set by
+ * format, and width. Image at base level
+ * must be set by
* the application using 'setImage' method. If mipmapMode is
* set to MULTI_LEVEL_MIPMAP, images for base level through maximum level
* must be set.
- * Note that cube map is square in dimensions, hence specifying width
+ * Note that cube map is square in dimensions, hence specifying width
* is sufficient.
* Note also that a texture with a non-power-of-two width will
* only be rendered on a graphics device that supports non-power-of-two
@@ -144,12 +144,12 @@ public class TextureCubeMap extends Texture {
/**
* Constructs an empty TextureCubeMap object with specified mipmapMode
- * format, width, and boundary width. Image at base level
- * must be set by
+ * format, width, and boundary width. Image at base level
+ * must be set by
* the application using 'setImage' method. If mipmapMode is
* set to MULTI_LEVEL_MIPMAP, images for base level through maximum level
* must be set.
- * Note that cube map is square in dimensions, hence specifying width
+ * Note that cube map is square in dimensions, hence specifying width
* is sufficient.
* Note also that a texture with a non-power-of-two width will
* only be rendered on a graphics device that supports non-power-of-two
@@ -180,15 +180,15 @@ public class TextureCubeMap extends Texture {
* of the cube map
*
* @param level mipmap level
- * @param face face of the cube map. One of:
- *
- * The specified transformation must be affine. Further, if the
- * TransformGroup node is used as an ancestor of a ViewPlatform node
- * in the scene graph, the transformation must be congruent-only
+ * The specified transformation must be affine. Further, if the
+ * TransformGroup node is used as an ancestor of a ViewPlatform node
+ * in the scene graph, the transformation must be congruent-only
* rotations, translations, and uniform scales are allowed in
* a direct path from a Locale to a ViewPlatform node.
*
@@ -47,34 +47,34 @@ package javax.media.j3d;
* within a branch graph are congruent, containing only rotations
* translation, and uniform scale.
*
- * The effects of transformations in the scene graph are cumulative.
- * The concatenation of the transformations of each TransformGroup in
- * a direct path from the Locale to a Leaf node defines a composite
- * model transformation (CMT) that takes points in that Leaf node's
- * local coordinates and transforms them into Virtual World (Vworld)
+ * The effects of transformations in the scene graph are cumulative.
+ * The concatenation of the transformations of each TransformGroup in
+ * a direct path from the Locale to a Leaf node defines a composite
+ * model transformation (CMT) that takes points in that Leaf node's
+ * local coordinates and transforms them into Virtual World (Vworld)
* coordinates. This composite transformation is used to
- * transform points, normals, and distances into Vworld coordinates.
- * Points are transformed by the CMT. Normals are transformed by the
- * inverse-transpose of the CMT. Distances are transformed by the scale
- * of the CMT. In the case of a transformation containing a nonuniform
+ * transform points, normals, and distances into Vworld coordinates.
+ * Points are transformed by the CMT. Normals are transformed by the
+ * inverse-transpose of the CMT. Distances are transformed by the scale
+ * of the CMT. In the case of a transformation containing a nonuniform
* scale or shear, the maximum scale value in
- * any direction is used. This ensures, for example, that a transformed
- * bounding sphere, which is specified as a point and a radius,
- * continues to enclose all objects that are also transformed using
+ * any direction is used. This ensures, for example, that a transformed
+ * bounding sphere, which is specified as a point and a radius,
+ * continues to enclose all objects that are also transformed using
* a nonuniform scale.
*
*/
public class TransformGroup extends Group {
/**
- * Specifies that the node allows access to
+ * Specifies that the node allows access to
* its object's transform information.
*/
public static final int
ALLOW_TRANSFORM_READ = CapabilityBits.TRANSFORM_GROUP_ALLOW_TRANSFORM_READ;
/**
- * Specifies that the node allows writing
+ * Specifies that the node allows writing
* its object's transform information.
*/
public static final int
@@ -91,7 +91,7 @@ public class TransformGroup extends Group {
*/
public TransformGroup() {
// set default read capabilities
- setDefaultReadCapabilities(readCapabilities);
+ setDefaultReadCapabilities(readCapabilities);
}
/**
@@ -100,14 +100,14 @@ public class TransformGroup extends Group {
* @param t1 the transform3D object
* @exception BadTransformException if the transform is not affine.
*/
- public TransformGroup(Transform3D t1) {
+ public TransformGroup(Transform3D t1) {
if (!t1.isAffine()) {
throw new BadTransformException(J3dI18N.getString("TransformGroup0"));
}
-
+
// set default read capabilities
setDefaultReadCapabilities(readCapabilities);
-
+
((TransformGroupRetained)this.retained).setTransform(t1);
}
@@ -151,11 +151,11 @@ public class TransformGroup extends Group {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_TRANSFORM_READ))
throw new CapabilityNotSetException(J3dI18N.getString("TransformGroup2"));
-
+
((TransformGroupRetained)this.retained).getTransform(t1);
}
-
+
/**
* Creates a new instance of the node. This routine is called
* by
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
+ *
*
* @param originalNode the original node to duplicate.
* @param forceDuplicate when set to
*
- *
- *
*
*
* There are two forms of constructor to specify the
- * type of transparency interpolation. The first constructor takes
+ * type of transparency interpolation. The first constructor takes
* an Alpha and a TransparencyAttributes object and creates a transparency
* interpolator that maps an Alpha value of 1.0 to a transparency
* value of 1.0, and an Alpha value of 0.0 and maps it to a
@@ -64,12 +64,12 @@ public class TransparencyInterpolator extends Interpolator {
float minimumTransparency;
float maximumTransparency;
- // We can't use a boolean flag since it is possible
+ // We can't use a boolean flag since it is possible
// that after alpha change, this procedure only run
// once at alpha.finish(). So the best way is to
// detect alpha value change.
private float prevAlphaValue = Float.NaN;
- private WakeupCriterion passiveWakeupCriterion =
+ private WakeupCriterion passiveWakeupCriterion =
(WakeupCriterion) new WakeupOnElapsedFrames(0, true);
// non-public, default constructor used by cloneNode
@@ -80,7 +80,7 @@ public class TransparencyInterpolator extends Interpolator {
* Constructs a trivial transparency interpolator with a specified target,
* a minimum transparency of 0.0f and a maximum transparency of 1.0f.
* @param alpha the alpha object for this interpolator
- * @param target the TransparencyAttributes component object affected
+ * @param target the TransparencyAttributes component object affected
* by this interpolator
*/
public TransparencyInterpolator(Alpha alpha,
@@ -97,7 +97,7 @@ public class TransparencyInterpolator extends Interpolator {
* Constructs a new transparency interpolator that varies the target
* material's transparency between the two transparency values.
* @param alpha the alpha object for this Interpolator
- * @param target the TransparencyAttributes component object affected
+ * @param target the TransparencyAttributes component object affected
* by this interpolator
* @param minimumTransparency the starting transparency
* @param maximumTransparency the ending transparency
@@ -113,7 +113,7 @@ public class TransparencyInterpolator extends Interpolator {
this.minimumTransparency = minimumTransparency;
this.maximumTransparency = maximumTransparency;
}
-
+
/**
* This method sets the minimumTransparency for this interpolator.
* @param transparency the new minimum transparency
@@ -163,7 +163,7 @@ public class TransparencyInterpolator extends Interpolator {
return target;
}
- // The TransparencyInterpolator's initialize routine uses the default
+ // The TransparencyInterpolator's initialize routine uses the default
// initialization routine.
/**
diff --git a/src/classes/share/javax/media/j3d/TransparentRenderingInfo.java b/src/classes/share/javax/media/j3d/TransparentRenderingInfo.java
index bb0f1c2..9e0e3ea 100644
--- a/src/classes/share/javax/media/j3d/TransparentRenderingInfo.java
+++ b/src/classes/share/javax/media/j3d/TransparentRenderingInfo.java
@@ -47,14 +47,14 @@ class TransparentRenderingInfo extends Object implements com.sun.j3d.utils.scene
// XXXX: Add Dirty info
/**
- * update state before rendering transparent objects
+ * update state before rendering transparent objects
*/
boolean updateState(Canvas3D cv) {
TextureBin textureBin = rm.textureBin;
AttributeBin attributeBin = textureBin.attributeBin;
ShaderBin shaderBin = textureBin.shaderBin;
-
+
// Get a collection to check if switch is on
RenderMolecule rm = textureBin.transparentRMList ;
@@ -72,7 +72,7 @@ class TransparentRenderingInfo extends Object implements com.sun.j3d.utils.scene
rm = rm.nextMap;
}
}
-
+
if (rm == null) {
return false;
}
@@ -80,18 +80,18 @@ class TransparentRenderingInfo extends Object implements com.sun.j3d.utils.scene
// XXXX : Code cleanup needed : The following code segment should simply test
// each bin independently and update it if necessary.
if (cv.environmentSet != attributeBin.environmentSet) {
-
+
boolean visible = (attributeBin.definingRenderingAttributes == null ||
attributeBin.definingRenderingAttributes.visible);
-
+
if ( (attributeBin.environmentSet.renderBin.view.viewCache.visibilityPolicy
== View.VISIBILITY_DRAW_VISIBLE && !visible) ||
(attributeBin.environmentSet.renderBin.view.viewCache.visibilityPolicy
== View.VISIBILITY_DRAW_INVISIBLE && visible)) {
return false;
}
-
- // Fix to issue 314. Set the appropriate bits for the dirty bins
+
+ // Fix to issue 314. Set the appropriate bits for the dirty bins
// and call the update state method.
cv.setStateToUpdate(Canvas3D.LIGHTBIN_BIT, attributeBin.environmentSet.lightBin);
cv.setStateToUpdate(Canvas3D.ENVIRONMENTSET_BIT, attributeBin.environmentSet);
@@ -102,34 +102,34 @@ class TransparentRenderingInfo extends Object implements com.sun.j3d.utils.scene
} else if (cv.attributeBin != attributeBin) {
boolean visible = (attributeBin.definingRenderingAttributes == null ||
attributeBin.definingRenderingAttributes.visible);
-
+
if ( (attributeBin.environmentSet.renderBin.view.viewCache.visibilityPolicy
== View.VISIBILITY_DRAW_VISIBLE && !visible) ||
(attributeBin.environmentSet.renderBin.view.viewCache.visibilityPolicy
== View.VISIBILITY_DRAW_INVISIBLE && visible)) {
return false;
}
-
- // Fix to issue 314. Set the appropriate bits for the dirty bins
+
+ // Fix to issue 314. Set the appropriate bits for the dirty bins
// and call the update state method.
cv.setStateToUpdate(Canvas3D.ATTRIBUTEBIN_BIT, attributeBin);
cv.setStateToUpdate(Canvas3D.SHADERBIN_BIT, shaderBin);
cv.updateEnvState();
-
+
} else if (cv.shaderBin != shaderBin) {
- // Fix to issue 314. Set the appropriate bits for the dirty bins
+ // Fix to issue 314. Set the appropriate bits for the dirty bins
// and call the update state method.
cv.setStateToUpdate(Canvas3D.SHADERBIN_BIT, shaderBin);
cv.updateEnvState();
-
- }
+
+ }
return true;
}
void render(Canvas3D cv) {
- if (updateState(cv)) {
+ if (updateState(cv)) {
rm.textureBin.render(cv, rm.textureBin.transparentRMList);
}
}
@@ -146,8 +146,8 @@ class TransparentRenderingInfo extends Object implements com.sun.j3d.utils.scene
}
public Geometry getGeometry() {
- // XXXX: verify 0 is always the correct index. Assumption is that for
- // Shape3D with multiple geometry each geometry is put in it's
+ // XXXX: verify 0 is always the correct index. Assumption is that for
+ // Shape3D with multiple geometry each geometry is put in it's
// own geometryAtom.
if (geometryAtom.geometryArray[0]==null)
return null;
diff --git a/src/classes/share/javax/media/j3d/TriangleArrayRetained.java b/src/classes/share/javax/media/j3d/TriangleArrayRetained.java
index 41c58ef..392d57c 100644
--- a/src/classes/share/javax/media/j3d/TriangleArrayRetained.java
+++ b/src/classes/share/javax/media/j3d/TriangleArrayRetained.java
@@ -53,13 +53,13 @@ class TriangleArrayRetained extends GeometryArrayRetained {
double minDist = Double.MAX_VALUE;
double x = 0, y = 0, z = 0;
int[] vtxIndexArr = new int[3];
-
+
int i = ((vertexFormat & GeometryArray.BY_REFERENCE) == 0 ?
initialVertexIndex : initialCoordIndex);
pnts[0] = new Point3d();
pnts[1] = new Point3d();
pnts[2] = new Point3d();
-
+
switch (pickShape.getPickType()) {
case PickShape.PICKRAY:
PickRay pickRay= (PickRay) pickShape;
@@ -74,17 +74,17 @@ class TriangleArrayRetained extends GeometryArrayRetained {
return true;
}
if (sdist[0] < minDist) {
- minDist = sdist[0];
+ minDist = sdist[0];
x = iPnt.x;
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
@@ -109,21 +109,21 @@ class TriangleArrayRetained extends GeometryArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
break;
case PickShape.PICKBOUNDINGBOX:
- BoundingBox bbox = (BoundingBox)
+ BoundingBox bbox = (BoundingBox)
((PickBounds) pickShape).bounds;
-
+
while (i < validVertexCount) {
for(int j=0; j<3; j++) {
vtxIndexArr[j] = i;
@@ -139,21 +139,21 @@ class TriangleArrayRetained extends GeometryArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
break;
case PickShape.PICKBOUNDINGSPHERE:
- BoundingSphere bsphere = (BoundingSphere)
+ BoundingSphere bsphere = (BoundingSphere)
((PickBounds) pickShape).bounds;
-
+
while (i < validVertexCount) {
for(int j=0; j<3; j++) {
vtxIndexArr[j] = i;
@@ -169,28 +169,28 @@ class TriangleArrayRetained extends GeometryArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
break;
case PickShape.PICKBOUNDINGPOLYTOPE:
- BoundingPolytope bpolytope = (BoundingPolytope)
+ BoundingPolytope bpolytope = (BoundingPolytope)
((PickBounds) pickShape).bounds;
-
+
while (i < validVertexCount) {
for(int j=0; j<3; j++) {
vtxIndexArr[j] = i;
getVertexData(i++, pnts[j]);
}
if (intersectBoundingPolytope(pnts, bpolytope,
- sdist,iPnt)) {
+ sdist,iPnt)) {
if (flags == 0) {
return true;
}
@@ -200,13 +200,13 @@ class TriangleArrayRetained extends GeometryArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
@@ -229,20 +229,20 @@ class TriangleArrayRetained extends GeometryArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
break;
case PickShape.PICKCONE:
PickCone pickCone= (PickCone) pickShape;
-
+
while (i < validVertexCount) {
for(int j=0; j<3; j++) {
vtxIndexArr[j] = i;
@@ -258,13 +258,13 @@ class TriangleArrayRetained extends GeometryArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
}
@@ -273,10 +273,10 @@ class TriangleArrayRetained extends GeometryArrayRetained {
// Should not happen since API already check for this
throw new IllegalArgumentException(J3dI18N.getString("TriangleArrayRetained0"));
default:
- throw new RuntimeException ("PickShape not supported for intersection");
- }
+ throw new RuntimeException ("PickShape not supported for intersection");
+ }
+
-
if (minDist < Double.MAX_VALUE) {
iPnt.x = x;
iPnt.y = y;
@@ -285,17 +285,17 @@ class TriangleArrayRetained extends GeometryArrayRetained {
}
return false;
}
-
-
+
+
boolean intersect(Point3d[] pnts) {
Point3d[] points = new Point3d[3];
double dist[] = new double[1];
int i = ((vertexFormat & GeometryArray.BY_REFERENCE) == 0 ?
initialVertexIndex : initialCoordIndex);
-
+
points[0] = new Point3d();
- points[1] = new Point3d();
- points[2] = new Point3d();
+ points[1] = new Point3d();
+ points[2] = new Point3d();
switch (pnts.length) {
case 3: // Triangle
@@ -346,11 +346,11 @@ class TriangleArrayRetained extends GeometryArrayRetained {
break;
}
return false;
- }
-
+ }
+
boolean intersect(Transform3D thisToOtherVworld,
GeometryRetained geom) {
-
+
Point3d[] pnts = new Point3d[3];
int i = ((vertexFormat & GeometryArray.BY_REFERENCE) == 0 ?
initialVertexIndex : initialCoordIndex);
@@ -384,7 +384,7 @@ class TriangleArrayRetained extends GeometryArrayRetained {
switch(targetBound.getPickType()) {
case PickShape.PICKBOUNDINGBOX:
BoundingBox box = (BoundingBox) targetBound;
-
+
while (i < validVertexCount) {
getVertexData(i++, pnts[0]);
getVertexData(i++, pnts[1]);
@@ -396,7 +396,7 @@ class TriangleArrayRetained extends GeometryArrayRetained {
break;
case PickShape.PICKBOUNDINGSPHERE:
BoundingSphere bsphere = (BoundingSphere) targetBound;
-
+
while (i < validVertexCount) {
getVertexData(i++, pnts[0]);
getVertexData(i++, pnts[1]);
@@ -409,7 +409,7 @@ class TriangleArrayRetained extends GeometryArrayRetained {
break;
case PickShape.PICKBOUNDINGPOLYTOPE:
BoundingPolytope bpolytope = (BoundingPolytope) targetBound;
-
+
while (i < validVertexCount) {
getVertexData(i++, pnts[0]);
getVertexData(i++, pnts[1]);
@@ -422,7 +422,7 @@ class TriangleArrayRetained extends GeometryArrayRetained {
break;
default:
throw new RuntimeException("Bounds not supported for intersection "
- + targetBound);
+ + targetBound);
}
return false;
@@ -449,8 +449,8 @@ class TriangleArrayRetained extends GeometryArrayRetained {
while(i < validVertexCount) {
- getVertexData(i++, pnt0);
- getVertexData(i++, pnt1);
+ getVertexData(i++, pnt0);
+ getVertexData(i++, pnt1);
getVertexData(i++, pnt2);
// Determine the normal
diff --git a/src/classes/share/javax/media/j3d/TriangleFanArray.java b/src/classes/share/javax/media/j3d/TriangleFanArray.java
index 59a2ac3..df8fdae 100644
--- a/src/classes/share/javax/media/j3d/TriangleFanArray.java
+++ b/src/classes/share/javax/media/j3d/TriangleFanArray.java
@@ -188,7 +188,7 @@ public class TriangleFanArray extends GeometryStripArray {
this.retained.setSource(this);
}
-
+
/**
* @deprecated replaced with cloneNodeComponent(boolean forceDuplicate)
*/
diff --git a/src/classes/share/javax/media/j3d/TriangleFanArrayRetained.java b/src/classes/share/javax/media/j3d/TriangleFanArrayRetained.java
index 288499c..33b76c5 100644
--- a/src/classes/share/javax/media/j3d/TriangleFanArrayRetained.java
+++ b/src/classes/share/javax/media/j3d/TriangleFanArrayRetained.java
@@ -67,8 +67,8 @@ class TriangleFanArrayRetained extends GeometryStripArrayRetained {
switch (pickShape.getPickType()) {
case PickShape.PICKRAY:
PickRay pickRay= (PickRay) pickShape;
-
- while (i < stripVertexCounts.length) {
+
+ while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
for(int k=0; k<2; k++) {
@@ -105,7 +105,7 @@ class TriangleFanArrayRetained extends GeometryStripArrayRetained {
case PickShape.PICKSEGMENT:
PickSegment pickSegment = (PickSegment) pickShape;
- while (i < stripVertexCounts.length) {
+ while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
for(int k=0; k<2; k++) {
@@ -115,7 +115,7 @@ class TriangleFanArrayRetained extends GeometryStripArrayRetained {
while (j < end) {
vtxIndexArr[2] = j;
getVertexData(j++, pnts[2]);
- if (intersectSegment(pnts, pickSegment.start,
+ if (intersectSegment(pnts, pickSegment.start,
pickSegment.end, sdist, iPnt)) {
if (flags == 0) {
return true;
@@ -141,10 +141,10 @@ class TriangleFanArrayRetained extends GeometryStripArrayRetained {
}
break;
case PickShape.PICKBOUNDINGBOX:
- BoundingBox bbox = (BoundingBox)
+ BoundingBox bbox = (BoundingBox)
((PickBounds) pickShape).bounds;
- while (i < stripVertexCounts.length) {
+ while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
for(int k=0; k<2; k++) {
@@ -179,10 +179,10 @@ class TriangleFanArrayRetained extends GeometryStripArrayRetained {
}
break;
case PickShape.PICKBOUNDINGSPHERE:
- BoundingSphere bsphere = (BoundingSphere)
+ BoundingSphere bsphere = (BoundingSphere)
((PickBounds) pickShape).bounds;
- while (i < stripVertexCounts.length) {
+ while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
for(int k=0; k<2; k++) {
@@ -193,7 +193,7 @@ class TriangleFanArrayRetained extends GeometryStripArrayRetained {
vtxIndexArr[2] = j;
getVertexData(j++, pnts[2]);
if (intersectBoundingSphere(pnts, bsphere, sdist,
- iPnt)) {
+ iPnt)) {
if (flags == 0) {
return true;
}
@@ -218,10 +218,10 @@ class TriangleFanArrayRetained extends GeometryStripArrayRetained {
}
break;
case PickShape.PICKBOUNDINGPOLYTOPE:
- BoundingPolytope bpolytope = (BoundingPolytope)
+ BoundingPolytope bpolytope = (BoundingPolytope)
((PickBounds) pickShape).bounds;
- while (i < stripVertexCounts.length) {
+ while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
for(int k=0; k<2; k++) {
@@ -259,7 +259,7 @@ class TriangleFanArrayRetained extends GeometryStripArrayRetained {
case PickShape.PICKCYLINDER:
PickCylinder pickCylinder= (PickCylinder) pickShape;
- while (i < stripVertexCounts.length) {
+ while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
for(int k=0; k<2; k++) {
@@ -296,7 +296,7 @@ class TriangleFanArrayRetained extends GeometryStripArrayRetained {
case PickShape.PICKCONE:
PickCone pickCone= (PickCone) pickShape;
- while (i < stripVertexCounts.length) {
+ while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
for(int k=0; k<2; k++) {
@@ -334,8 +334,8 @@ class TriangleFanArrayRetained extends GeometryStripArrayRetained {
// Should not happen since API already check for this
throw new IllegalArgumentException(J3dI18N.getString("TriangleFanArrayRetained0"));
default:
- throw new RuntimeException ("PickShape not supported for intersection");
- }
+ throw new RuntimeException ("PickShape not supported for intersection");
+ }
if (minDist < Double.MAX_VALUE) {
iPnt.x = x;
@@ -344,8 +344,8 @@ class TriangleFanArrayRetained extends GeometryStripArrayRetained {
return true;
}
return false;
- }
-
+ }
+
// intersect pnts[] with every triangle in this object
boolean intersect(Point3d[] pnts) {
int j, end;
@@ -364,10 +364,10 @@ class TriangleFanArrayRetained extends GeometryStripArrayRetained {
while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
- getVertexData(j++, points[0]);
- getVertexData(j++, points[1]);
+ getVertexData(j++, points[0]);
+ getVertexData(j++, points[1]);
while (j < end) {
- getVertexData(j++, points[2]);
+ getVertexData(j++, points[2]);
if (intersectTriTri(points[0], points[1], points[2],
pnts[0], pnts[1], pnts[2])) {
return true;
@@ -380,10 +380,10 @@ class TriangleFanArrayRetained extends GeometryStripArrayRetained {
while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
- getVertexData(j++, points[0]);
- getVertexData(j++, points[1]);
+ getVertexData(j++, points[0]);
+ getVertexData(j++, points[1]);
while (j < end) {
- getVertexData(j++, points[2]);
+ getVertexData(j++, points[2]);
if (intersectTriTri(points[0], points[1], points[2],
pnts[0], pnts[1], pnts[2]) ||
intersectTriTri(points[0], points[1], points[2],
@@ -398,10 +398,10 @@ class TriangleFanArrayRetained extends GeometryStripArrayRetained {
while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
- getVertexData(j++, points[0]);
- getVertexData(j++, points[1]);
+ getVertexData(j++, points[0]);
+ getVertexData(j++, points[1]);
while (j < end) {
- getVertexData(j++, points[2]);
+ getVertexData(j++, points[2]);
if (intersectSegment(points, pnts[0], pnts[1],
dist, null)) {
return true;
@@ -414,10 +414,10 @@ class TriangleFanArrayRetained extends GeometryStripArrayRetained {
while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
- getVertexData(j++, points[0]);
- getVertexData(j++, points[1]);
+ getVertexData(j++, points[0]);
+ getVertexData(j++, points[1]);
while (j < end) {
- getVertexData(j++, points[2]);
+ getVertexData(j++, points[2]);
if (intersectTriPnt(points[0], points[1], points[2],
pnts[0])) {
return true;
@@ -429,7 +429,7 @@ class TriangleFanArrayRetained extends GeometryStripArrayRetained {
}
return false;
}
-
+
boolean intersect(Transform3D thisToOtherVworld, GeometryRetained geom) {
int i = 0, j, end;
Point3d[] pnts = new Point3d[3];
@@ -440,12 +440,12 @@ class TriangleFanArrayRetained extends GeometryStripArrayRetained {
while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
- getVertexData(j++, pnts[0]);
- getVertexData(j++, pnts[1]);
+ getVertexData(j++, pnts[0]);
+ getVertexData(j++, pnts[1]);
thisToOtherVworld.transform(pnts[0]);
thisToOtherVworld.transform(pnts[1]);
while (j < end) {
- getVertexData(j++, pnts[2]);
+ getVertexData(j++, pnts[2]);
thisToOtherVworld.transform(pnts[2]);
if (geom.intersect(pnts)) {
return true;
@@ -473,11 +473,11 @@ class TriangleFanArrayRetained extends GeometryStripArrayRetained {
while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
- getVertexData(j++, pnts[0]);
- getVertexData(j++, pnts[1]);
+ getVertexData(j++, pnts[0]);
+ getVertexData(j++, pnts[1]);
end = j + stripVertexCounts[i++];
while ( j < end) {
- getVertexData(j++, pnts[2]);
+ getVertexData(j++, pnts[2]);
if (intersectBoundingBox(pnts, box, null, null)) {
return true;
}
@@ -491,10 +491,10 @@ class TriangleFanArrayRetained extends GeometryStripArrayRetained {
while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
- getVertexData(j++, pnts[0]);
- getVertexData(j++, pnts[1]);
+ getVertexData(j++, pnts[0]);
+ getVertexData(j++, pnts[1]);
while ( j < end) {
- getVertexData(j++, pnts[2]);
+ getVertexData(j++, pnts[2]);
if (intersectBoundingSphere(pnts, bsphere, null, null)) {
return true;
}
@@ -508,10 +508,10 @@ class TriangleFanArrayRetained extends GeometryStripArrayRetained {
while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
- getVertexData(j++, pnts[0]);
- getVertexData(j++, pnts[1]);
+ getVertexData(j++, pnts[0]);
+ getVertexData(j++, pnts[1]);
while ( j < end) {
- getVertexData(j++, pnts[2]);
+ getVertexData(j++, pnts[2]);
if (intersectBoundingPolytope(pnts, bpolytope, null, null)) {
return true;
}
@@ -521,7 +521,7 @@ class TriangleFanArrayRetained extends GeometryStripArrayRetained {
break;
default:
throw new RuntimeException("Bounds not supported for intersection "
- + targetBound);
+ + targetBound);
}
return false;
}
@@ -531,9 +531,9 @@ class TriangleFanArrayRetained extends GeometryStripArrayRetained {
Vector3d vec = new Vector3d();
Vector3d normal = new Vector3d();
Vector3d tmpvec = new Vector3d();
- Point3d pnt0 = new Point3d();
- Point3d pnt1 = new Point3d();
- Point3d pnt2 = new Point3d();
+ Point3d pnt0 = new Point3d();
+ Point3d pnt1 = new Point3d();
+ Point3d pnt2 = new Point3d();
double area, totalarea = 0;
int end, replaceIndex, j, i = 0;
centroid.x = 0;
@@ -543,11 +543,11 @@ class TriangleFanArrayRetained extends GeometryStripArrayRetained {
while( i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
- getVertexData(j++, pnt0);
+ getVertexData(j++, pnt0);
getVertexData(j++, pnt1);
replaceIndex = 2;
while (j < end) {
- area = 0;
+ area = 0;
if (replaceIndex == 2) {
getVertexData(j++, pnt2);
replaceIndex = 1;
@@ -556,20 +556,20 @@ class TriangleFanArrayRetained extends GeometryStripArrayRetained {
replaceIndex = 2;
}
- // Determine the normal
- vec.sub(pnt0, pnt1);
- tmpvec.sub(pnt1, pnt2);
+ // Determine the normal
+ vec.sub(pnt0, pnt1);
+ tmpvec.sub(pnt1, pnt2);
// Do the cross product
- normal.cross(vec, tmpvec);
+ normal.cross(vec, tmpvec);
normal.normalize();
// If a degenerate triangle, don't include
if (Double.isNaN(normal.x + normal.y + normal.z))
continue;
tmpvec.set(0,0,0);
-
- // compute the area
+
+ // compute the area
getCrossValue(pnt0, pnt1, tmpvec);
getCrossValue(pnt1, pnt2, tmpvec);
getCrossValue(pnt2, pnt0, tmpvec);
diff --git a/src/classes/share/javax/media/j3d/TriangleStripArrayRetained.java b/src/classes/share/javax/media/j3d/TriangleStripArrayRetained.java
index 98c44ed..e11c5fb 100644
--- a/src/classes/share/javax/media/j3d/TriangleStripArrayRetained.java
+++ b/src/classes/share/javax/media/j3d/TriangleStripArrayRetained.java
@@ -49,7 +49,7 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
TriangleStripArrayRetained() {
this.geoType = GEO_TYPE_TRI_STRIP_SET;
}
-
+
boolean intersect(PickShape pickShape, PickInfo pickInfo, int flags, Point3d iPnt,
GeometryRetained geom, int geomIndex) {
Point3d pnts[] = new Point3d[3];
@@ -66,8 +66,8 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
switch (pickShape.getPickType()) {
case PickShape.PICKRAY:
PickRay pickRay= (PickRay) pickShape;
-
- while (i < stripVertexCounts.length) {
+
+ while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
for(int k=0; k<2; k++) {
@@ -76,7 +76,7 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
}
while (j < end) {
vtxIndexArr[2] = j;
- getVertexData(j++, pnts[2]);
+ getVertexData(j++, pnts[2]);
if (intersectRay(pnts, pickRay, sdist, iPnt)) {
if (flags == 0) {
return true;
@@ -87,13 +87,13 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
pnts[0].set(pnts[1]);
@@ -106,7 +106,7 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
case PickShape.PICKSEGMENT:
PickSegment pickSegment = (PickSegment) pickShape;
- while (i < stripVertexCounts.length) {
+ while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
for(int k=0; k<2; k++) {
@@ -116,7 +116,7 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
while (j < end) {
vtxIndexArr[2] = j;
getVertexData(j++, pnts[2]);
- if (intersectSegment(pnts, pickSegment.start,
+ if (intersectSegment(pnts, pickSegment.start,
pickSegment.end, sdist, iPnt)) {
if (flags == 0) {
return true;
@@ -127,13 +127,13 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
pnts[0].set(pnts[1]);
@@ -144,10 +144,10 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
}
break;
case PickShape.PICKBOUNDINGBOX:
- BoundingBox bbox = (BoundingBox)
+ BoundingBox bbox = (BoundingBox)
((PickBounds) pickShape).bounds;
- while (i < stripVertexCounts.length) {
+ while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
for(int k=0; k<2; k++) {
@@ -167,13 +167,13 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
pnts[0].set(pnts[1]);
@@ -184,10 +184,10 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
}
break;
case PickShape.PICKBOUNDINGSPHERE:
- BoundingSphere bsphere = (BoundingSphere)
+ BoundingSphere bsphere = (BoundingSphere)
((PickBounds) pickShape).bounds;
- while (i < stripVertexCounts.length) {
+ while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
for(int k=0; k<2; k++) {
@@ -198,7 +198,7 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
vtxIndexArr[2] = j;
getVertexData(j++, pnts[2]);
if (intersectBoundingSphere(pnts, bsphere, sdist,
- iPnt)) {
+ iPnt)) {
if (flags == 0) {
return true;
}
@@ -208,13 +208,13 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
pnts[0].set(pnts[1]);
@@ -225,10 +225,10 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
}
break;
case PickShape.PICKBOUNDINGPOLYTOPE:
- BoundingPolytope bpolytope = (BoundingPolytope)
+ BoundingPolytope bpolytope = (BoundingPolytope)
((PickBounds) pickShape).bounds;
- while (i < stripVertexCounts.length) {
+ while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
for(int k=0; k<2; k++) {
@@ -249,13 +249,13 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
pnts[0].set(pnts[1]);
@@ -268,7 +268,7 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
case PickShape.PICKCYLINDER:
PickCylinder pickCylinder= (PickCylinder) pickShape;
- while (i < stripVertexCounts.length) {
+ while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
for(int k=0; k<2; k++) {
@@ -288,13 +288,13 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
pnts[0].set(pnts[1]);
@@ -307,7 +307,7 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
case PickShape.PICKCONE:
PickCone pickCone= (PickCone) pickShape;
- while (i < stripVertexCounts.length) {
+ while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
for(int k=0; k<2; k++) {
@@ -327,13 +327,13 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
y = iPnt.y;
z = iPnt.z;
if((flags & PickInfo.CLOSEST_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
+ storeInterestData(pickInfo, flags, geom, geomIndex,
vtxIndexArr, iPnt, sdist[0]);
}
}
if((flags & PickInfo.ALL_GEOM_INFO) != 0) {
- storeInterestData(pickInfo, flags, geom, geomIndex,
- vtxIndexArr, iPnt, sdist[0]);
+ storeInterestData(pickInfo, flags, geom, geomIndex,
+ vtxIndexArr, iPnt, sdist[0]);
}
}
pnts[0].set(pnts[1]);
@@ -347,8 +347,8 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
// Should not happen since API already check for this
throw new IllegalArgumentException(J3dI18N.getString("TriangleStripArrayRetained0"));
default:
- throw new RuntimeException ("PickShape not supported for intersection");
- }
+ throw new RuntimeException ("PickShape not supported for intersection");
+ }
if (minDist < Double.MAX_VALUE) {
iPnt.x = x;
@@ -358,7 +358,7 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
}
return false;
}
-
+
// intersect pnts[] with every triangle in this object
boolean intersect(Point3d[] pnts) {
int j, end;
@@ -375,10 +375,10 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
- getVertexData(j++, points[0]);
- getVertexData(j++, points[1]);
+ getVertexData(j++, points[0]);
+ getVertexData(j++, points[1]);
while (j < end) {
- getVertexData(j++, points[2]);
+ getVertexData(j++, points[2]);
if (intersectTriTri(points[0], points[1], points[2],
pnts[0], pnts[1], pnts[2])) {
return true;
@@ -392,10 +392,10 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
- getVertexData(j++, points[0]);
- getVertexData(j++, points[1]);
+ getVertexData(j++, points[0]);
+ getVertexData(j++, points[1]);
while (j < end) {
- getVertexData(j++, points[2]);
+ getVertexData(j++, points[2]);
if (intersectTriTri(points[0], points[1], points[2],
pnts[0], pnts[1], pnts[2]) ||
intersectTriTri(points[0], points[1], points[2],
@@ -411,10 +411,10 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
- getVertexData(j++, points[0]);
- getVertexData(j++, points[1]);
+ getVertexData(j++, points[0]);
+ getVertexData(j++, points[1]);
while (j < end) {
- getVertexData(j++, points[2]);
+ getVertexData(j++, points[2]);
if (intersectSegment(points, pnts[0], pnts[1],
dist, null)) {
return true;
@@ -428,10 +428,10 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
- getVertexData(j++, points[0]);
- getVertexData(j++, points[1]);
+ getVertexData(j++, points[0]);
+ getVertexData(j++, points[1]);
while (j < end) {
- getVertexData(j++, points[2]);
+ getVertexData(j++, points[2]);
if (intersectTriPnt(points[0], points[1], points[2],
pnts[0])) {
return true;
@@ -444,7 +444,7 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
}
return false;
}
-
+
boolean intersect(Transform3D thisToOtherVworld, GeometryRetained geom) {
int i = 0, j, end;
Point3d[] pnts = new Point3d[3];
@@ -455,12 +455,12 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
- getVertexData(j++, pnts[0]);
- getVertexData(j++, pnts[1]);
+ getVertexData(j++, pnts[0]);
+ getVertexData(j++, pnts[1]);
thisToOtherVworld.transform(pnts[0]);
thisToOtherVworld.transform(pnts[1]);
while (j < end) {
- getVertexData(j++, pnts[2]);
+ getVertexData(j++, pnts[2]);
thisToOtherVworld.transform(pnts[2]);
if (geom.intersect(pnts)) {
return true;
@@ -489,10 +489,10 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
- getVertexData(j++, pnts[0]);
- getVertexData(j++, pnts[1]);
+ getVertexData(j++, pnts[0]);
+ getVertexData(j++, pnts[1]);
while ( j < end) {
- getVertexData(j++, pnts[2]);
+ getVertexData(j++, pnts[2]);
if (intersectBoundingBox(pnts, box, null, null)) {
return true;
}
@@ -507,10 +507,10 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
- getVertexData(j++, pnts[0]);
- getVertexData(j++, pnts[1]);
+ getVertexData(j++, pnts[0]);
+ getVertexData(j++, pnts[1]);
while ( j < end) {
- getVertexData(j++, pnts[2]);
+ getVertexData(j++, pnts[2]);
if (intersectBoundingSphere(pnts, bsphere, null, null)) {
return true;
}
@@ -525,10 +525,10 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
while (i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
- getVertexData(j++, pnts[0]);
- getVertexData(j++, pnts[1]);
+ getVertexData(j++, pnts[0]);
+ getVertexData(j++, pnts[1]);
while ( j < end) {
- getVertexData(j++, pnts[2]);
+ getVertexData(j++, pnts[2]);
if (intersectBoundingPolytope(pnts, bpolytope, null, null)) {
return true;
}
@@ -539,7 +539,7 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
break;
default:
throw new RuntimeException("Bounds not supported for intersection "
- + targetBound);
+ + targetBound);
}
return false;
}
@@ -562,11 +562,11 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
while( i < stripVertexCounts.length) {
j = stripStartVertexIndices[i];
end = j + stripVertexCounts[i++];
- getVertexData(j++, pnt0);
+ getVertexData(j++, pnt0);
getVertexData(j++, pnt1);
replaceIndex = 2;
while (j < end) {
- area = 0;
+ area = 0;
switch (replaceIndex) {
case 0:
getVertexData(j++, pnt0);
@@ -581,20 +581,20 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
replaceIndex = 0;
}
- // Determine the normal
- vec.sub(pnt0, pnt1);
- tmpvec.sub(pnt1, pnt2);
+ // Determine the normal
+ vec.sub(pnt0, pnt1);
+ tmpvec.sub(pnt1, pnt2);
// Do the cross product
- normal.cross(vec, tmpvec);
+ normal.cross(vec, tmpvec);
normal.normalize();
// If a degenerate triangle, don't include
if (Double.isNaN(normal.x + normal.y + normal.z))
continue;
tmpvec.set(0,0,0);
-
- // compute the area
+
+ // compute the area
getCrossValue(pnt0, pnt1, tmpvec);
getCrossValue(pnt1, pnt2, tmpvec);
getCrossValue(pnt2, pnt0, tmpvec);
@@ -612,7 +612,7 @@ class TriangleStripArrayRetained extends GeometryStripArrayRetained {
centroid.x *= area;
centroid.y *= area;
centroid.z *= area;
- }
+ }
}
diff --git a/src/classes/share/javax/media/j3d/UnorderList.java b/src/classes/share/javax/media/j3d/UnorderList.java
index 67c23c8..0720111 100644
--- a/src/classes/share/javax/media/j3d/UnorderList.java
+++ b/src/classes/share/javax/media/j3d/UnorderList.java
@@ -36,7 +36,7 @@ import java.util.Arrays;
* A strongly type unorder array list.
* The operation add(Object o) & remove(int i) take O(1) time.
* The class is designed to optimize speed. So many reductance
- * procedures call and range check as found in ArrayList are
+ * procedures call and range check as found in ArrayList are
* removed.
*
*
@@ -75,7 +75,7 @@ class UnorderList implements Cloneable, java.io.Serializable {
* set(), remove() when -O flag turn on.
*/
transient Object elementData[];
-
+
/**
* Clone copy of elementData return by toArray(true);
*/
@@ -139,7 +139,7 @@ class UnorderList implements Cloneable, java.io.Serializable {
UnorderList() {
this(10, Object.class);
}
-
+
/**
* Returns the number of elements in this list.
*
@@ -149,9 +149,9 @@ class UnorderList implements Cloneable, java.io.Serializable {
return size;
}
-
+
/**
- * Returns the size of entry use in toArray() number of elements
+ * Returns the size of entry use in toArray() number of elements
* in this list.
*
* @return the number of elements in this list.
@@ -205,8 +205,8 @@ class UnorderList implements Cloneable, java.io.Serializable {
}
/**
- * Searches for the last occurence of the given argument, testing
- * for equality using the equals method.
+ * Searches for the last occurence of the given argument, testing
+ * for equality using the equals method.
*
* @param o an object.
* @return the index of the first occurrence of the argument in this
@@ -233,14 +233,14 @@ class UnorderList implements Cloneable, java.io.Serializable {
* @return a clone of this ArrayList instance.
*/
synchronized protected final Object clone() {
- try {
+ try {
UnorderList v = (UnorderList)super.clone();
v.elementData = (Object[])java.lang.reflect.Array.newInstance(
componentType, size);
System.arraycopy(elementData, 0, v.elementData, 0, size);
isDirty = true; // can't use the old cloneData reference
return v;
- } catch (CloneNotSupportedException e) {
+ } catch (CloneNotSupportedException e) {
// this shouldn't happen, since we are Cloneable
throw new InternalError();
}
@@ -250,7 +250,7 @@ class UnorderList implements Cloneable, java.io.Serializable {
/**
* Returns an array containing all of the elements in this list.
* The size of the array may longer than the actual size. Use
- * arraySize() to retrieve the size.
+ * arraySize() to retrieve the size.
* The array return is a copied of internal array. if copy
* is true.
*
@@ -272,13 +272,13 @@ class UnorderList implements Cloneable, java.io.Serializable {
cloneSize = size;
return elementData;
}
-
+
}
/**
* Returns an array containing all of the elements in this list.
* The size of the array may longer than the actual size. Use
- * arraySize() to retrieve the size.
+ * arraySize() to retrieve the size.
* The array return is a copied of internal array. So another
* thread can continue add/delete the current list. However,
* it should be noticed that two call to toArray() may return
@@ -293,10 +293,10 @@ class UnorderList implements Cloneable, java.io.Serializable {
/**
* Returns an array containing elements starting from startElement
- * all of the elements in this list. A new array of exact size
+ * all of the elements in this list. A new array of exact size
* is always allocated.
*
- * @param startElement starting element to copy
+ * @param startElement starting element to copy
*
* @return an array containing elements starting from
* startElement, null if element not found.
@@ -319,7 +319,7 @@ class UnorderList implements Cloneable, java.io.Serializable {
System.arraycopy(elementData, 0, objs, 0, size);
Arrays.fill(elementData, 0, size, null);
size = 0;
- isDirty = true;
+ isDirty = true;
}
@@ -337,7 +337,7 @@ class UnorderList implements Cloneable, java.io.Serializable {
System.arraycopy(oldData, 0, elementData, 0, size);
}
}
-
+
// Positional Access Operations
@@ -388,7 +388,7 @@ class UnorderList implements Cloneable, java.io.Serializable {
isDirty = true;
}
-
+
/**
* Removes the element at the specified position in this list.
* Replace the removed element by the last one.
@@ -398,7 +398,7 @@ class UnorderList implements Cloneable, java.io.Serializable {
* < 0 || index >= size()).
*/
synchronized final void remove(int index) {
- elementData[index] = elementData[--size];
+ elementData[index] = elementData[--size];
elementData[size] = null;
isDirty = true;
/*
@@ -408,7 +408,7 @@ class UnorderList implements Cloneable, java.io.Serializable {
*/
}
-
+
/**
* Removes the element at the specified position in this list.
* The order is keep.
@@ -420,7 +420,7 @@ class UnorderList implements Cloneable, java.io.Serializable {
synchronized final void removeOrdered(int index) {
size--;
if (index < size) {
- System.arraycopy(elementData, index+1,
+ System.arraycopy(elementData, index+1,
elementData, index, size-index);
}
@@ -429,7 +429,7 @@ class UnorderList implements Cloneable, java.io.Serializable {
isDirty = true;
}
-
+
/**
* Removes the element at the last position in this list.
* @return The element remove
@@ -491,7 +491,7 @@ class UnorderList implements Cloneable, java.io.Serializable {
for (int i=size; i >= 0; i--)
if (elementData[i]==null) {
elementData[i] = elementData[size];
- elementData[size] = null;
+ elementData[size] = null;
/*
if ((cloneData != null) && (i < cloneData.length)) {
cloneData[i] = null; // for gc
@@ -520,7 +520,7 @@ class UnorderList implements Cloneable, java.io.Serializable {
synchronized final void clearMirror() {
if (cloneData != null) {
- Arrays.fill(cloneData, 0, cloneData.length, null);
+ Arrays.fill(cloneData, 0, cloneData.length, null);
}
cloneSize = 0;
isDirty = true;
@@ -534,7 +534,7 @@ class UnorderList implements Cloneable, java.io.Serializable {
StringBuffer sb = new StringBuffer("Size = " + size + "\n[");
int len = size-1;
Object obj;
-
+
for (int i=0; i < size; i++) {
obj = elementData[i];
if (obj != null) {
diff --git a/src/classes/share/javax/media/j3d/UpdateTargets.java b/src/classes/share/javax/media/j3d/UpdateTargets.java
index bd0b6a2..0011b72 100644
--- a/src/classes/share/javax/media/j3d/UpdateTargets.java
+++ b/src/classes/share/javax/media/j3d/UpdateTargets.java
@@ -80,16 +80,16 @@ class UpdateTargets {
targetList[targetType].add(node);
}
-
+
void addNodeArray(Object[] nodeArr, int targetType) {
if(targetList[targetType] == null)
targetList[targetType] = new UnorderList(1);
-
+
targetList[targetType].add(nodeArr);
}
- void clearNodes() {
+ void clearNodes() {
for(int i=0; i
*
@@ -286,7 +286,7 @@ import com.sun.j3d.utils.universe.Viewer; // Needed for Support of DVR.
* The following methods control the traversal, the rendering, and
* the execution of the behavior scheduler for this view:
*
*
@@ -316,8 +316,8 @@ import com.sun.j3d.utils.universe.Viewer; // Needed for Support of DVR.
*
*
*
*
@@ -397,12 +397,12 @@ import com.sun.j3d.utils.universe.Viewer; // Needed for Support of DVR.
* The View object provides the following compatibility-mode
* methods that operate on the projection transform:
*
- *
- * The
*
* The ViewPlatform's activation radius defines an activation
* volume surrounding the center of the ViewPlatform. This activation
- * volume is a spherical region that intersects with the scheduling regions
+ * volume is a spherical region that intersects with the scheduling regions
* and application regions
* of other leaf node objects to determine which of those objects may
* affect rendering. Only active view platforms--that is, view platforms
@@ -92,12 +92,12 @@ package javax.media.j3d;
* (Background, Clip, or Soundscape) intersects an active ViewPlatform's
* activation volume, the "most appropriate" node is selected for that View.
* Sound leaf objects and Behavior objects become active when
- * their scheduling region intersects an active ViewPlatform's activation
- * volume.
+ * their scheduling region intersects an active ViewPlatform's activation
+ * volume.
*
* The activation radius is in view platform coordinates. For the
- * default screen scale policy of SCALE_SCREEN_SIZE, the
- * activationRadius parameter value is multiplied by half the
+ * default screen scale policy of SCALE_SCREEN_SIZE, the
+ * activationRadius parameter value is multiplied by half the
* monitor screen size to derive the actual activation radius. For example,
* for the default screen size of 0.35 meters, and the default activation
* radius value of 62, the actual activation radius would be 10.85
@@ -131,7 +131,7 @@ public class ViewPlatform extends Leaf {
private static final int[] readCapabilities = {
ALLOW_POLICY_READ
};
-
+
/**
* Constructs a ViewPlatform object with default parameters.
* The default values are as follows:
@@ -153,7 +153,7 @@ public class ViewPlatform extends Leaf {
this.retained = new ViewPlatformRetained();
this.retained.setSource(this);
}
-
+
/**
* Sets the view attach policy that determines the coexistence center
@@ -201,7 +201,7 @@ public class ViewPlatform extends Leaf {
return ((ViewPlatformRetained)this.retained).getViewAttachPolicy();
}
- /**
+ /**
* Set the ViewPlatform's activation radius which defines an activation
* volume around the view platform.
* @param activationRadius the new activation radius
@@ -210,7 +210,7 @@ public class ViewPlatform extends Leaf {
((ViewPlatformRetained)this.retained).setActivationRadius(activationRadius);
}
- /**
+ /**
* Get the ViewPlatform's activation radius.
* @return the ViewPlatform activation radius
*/
@@ -248,7 +248,7 @@ public class ViewPlatform extends Leaf {
return v;
}
-
+
/**
* Copies all ViewPlatform information from
* Note that a unique WakeupCriterion object must be used
@@ -62,20 +62,20 @@ public final class WakeupAnd extends WakeupCondition {
// this.conditionsMet[i] = false;
}
}
-
+
/**
* This sets the bit for the given child, then checks if the full condition is met
*/
void setConditionMet(int id, Boolean checkSchedulingRegion) {
conditionsMet[id] = true;
-
+
for (int i=0; i
@@ -89,7 +89,7 @@ class WakeupIndexedList implements Cloneable, java.io.Serializable {
* set(), remove() when -O flag turn on.
*/
transient WakeupCondition elementData[];
-
+
/**
* Clone copy of elementData return by toArray(true);
*/
@@ -183,9 +183,9 @@ class WakeupIndexedList implements Cloneable, java.io.Serializable {
final int size() {
return size;
}
-
+
/**
- * Returns the size of entry use in toArray() number of elements
+ * Returns the size of entry use in toArray() number of elements
* in this list.
*
* @return the number of elements in this list.
@@ -215,8 +215,8 @@ class WakeupIndexedList implements Cloneable, java.io.Serializable {
/**
- * Searches for the last occurence of the given argument, testing
- * for equality using the equals method.
+ * Searches for the last occurence of the given argument, testing
+ * for equality using the equals method.
*
* @param o an object.
* @return the index of the first occurrence of the argument in this
@@ -234,14 +234,14 @@ class WakeupIndexedList implements Cloneable, java.io.Serializable {
* @return a clone of this ArrayList instance.
*/
synchronized protected final Object clone() {
- try {
+ try {
WakeupIndexedList v = (WakeupIndexedList)super.clone();
v.elementData = (WakeupCondition[])java.lang.reflect.Array.newInstance(
componentType, size);
System.arraycopy(elementData, 0, v.elementData, 0, size);
isDirty = true; // can't use the old cloneData reference
return v;
- } catch (CloneNotSupportedException e) {
+ } catch (CloneNotSupportedException e) {
// this shouldn't happen, since we are Cloneable
throw new InternalError();
}
@@ -251,7 +251,7 @@ class WakeupIndexedList implements Cloneable, java.io.Serializable {
/**
* Returns an array containing all of the elements in this list.
* The size of the array may longer than the actual size. Use
- * arraySize() to retrieve the size.
+ * arraySize() to retrieve the size.
* The array return is a copied of internal array. if copy
* is true.
*
@@ -273,13 +273,13 @@ class WakeupIndexedList implements Cloneable, java.io.Serializable {
cloneSize = size;
return elementData;
}
-
+
}
/**
* Returns an array containing all of the elements in this list.
* The size of the array may longer than the actual size. Use
- * arraySize() to retrieve the size.
+ * arraySize() to retrieve the size.
* The array return is a copied of internal array. So another
* thread can continue add/delete the current list. However,
* it should be noticed that two call to toArray() may return
@@ -294,10 +294,10 @@ class WakeupIndexedList implements Cloneable, java.io.Serializable {
/**
* Returns an array containing elements starting from startElement
- * all of the elements in this list. A new array of exact size
+ * all of the elements in this list. A new array of exact size
* is always allocated.
*
- * @param startElement starting element to copy
+ * @param startElement starting element to copy
*
* @return an array containing elements starting from
* startElement, null if element not found.
@@ -329,7 +329,7 @@ class WakeupIndexedList implements Cloneable, java.io.Serializable {
System.arraycopy(oldData, 0, elementData, 0, size);
}
}
-
+
// Positional Access Operations
@@ -367,7 +367,7 @@ class WakeupIndexedList implements Cloneable, java.io.Serializable {
if (debug) {
if (o.listIdx[univIdx][listType] != -1) {
- System.err.println("Illegal use of UnorderIndexedList idx in set " +
+ System.err.println("Illegal use of UnorderIndexedList idx in set " +
o.listIdx[univIdx][listType]);
Thread.dumpStack();
}
@@ -393,7 +393,7 @@ class WakeupIndexedList implements Cloneable, java.io.Serializable {
System.arraycopy(oldData, 0, elementData, 0, size);
}
-
+
int univIdx = o.behav.getIdxUsed(univ);
// System.err.println(this + " add " + o + " univ " + univIdx);
if (debug) {
@@ -412,7 +412,7 @@ class WakeupIndexedList implements Cloneable, java.io.Serializable {
isDirty = true;
}
-
+
/**
* Removes the element at the specified position in this list.
* Replace the removed element by the last one.
@@ -427,19 +427,19 @@ class WakeupIndexedList implements Cloneable, java.io.Serializable {
if (debug) {
if (elm.listIdx[univIdx][listType] != index) {
- System.err.println("Inconsistent idx in remove, expect " + index +
+ System.err.println("Inconsistent idx in remove, expect " + index +
" actual " + elm.listIdx[univIdx][listType]);
- Thread.dumpStack();
- }
+ Thread.dumpStack();
+ }
}
elm.listIdx[univIdx][listType] = -1;
size--;
if (index != size) {
- elm = elementData[size];
+ elm = elementData[size];
elm.listIdx[univIdx][listType] = index;
elementData[index] = elm;
- }
+ }
elementData[size] = null;
isDirty = true;
/*
@@ -449,7 +449,7 @@ class WakeupIndexedList implements Cloneable, java.io.Serializable {
*/
}
-
+
/**
* Removes the element at the last position in this list.
* @return The element remove
@@ -502,7 +502,7 @@ class WakeupIndexedList implements Cloneable, java.io.Serializable {
o.listIdx[univIdx][listType] = -1;
isDirty = true;
return true;
- }
+ }
return false;
}
@@ -544,7 +544,7 @@ class WakeupIndexedList implements Cloneable, java.io.Serializable {
StringBuffer sb = new StringBuffer(hashCode() + " Size = " + size + "[");
int len = size-1;
Object obj;
-
+
for (int i=0; i < size; i++) {
obj = elementData[i];
if (obj != null) {
diff --git a/src/classes/share/javax/media/j3d/WakeupOnAWTEvent.java b/src/classes/share/javax/media/j3d/WakeupOnAWTEvent.java
index 6627616..34a42ad 100644
--- a/src/classes/share/javax/media/j3d/WakeupOnAWTEvent.java
+++ b/src/classes/share/javax/media/j3d/WakeupOnAWTEvent.java
@@ -54,7 +54,7 @@ public final class WakeupOnAWTEvent extends WakeupCriterion {
/**
* Constructs a new WakeupOnAWTEvent object that informs the Java 3D
- * scheduler to wake up the specified Behavior object whenever the
+ * scheduler to wake up the specified Behavior object whenever the
* specified AWT event occurs.
* @param AWTId the AWT ids that this behavior wishes to intercept
*/
@@ -87,7 +87,7 @@ public final class WakeupOnAWTEvent extends WakeupCriterion {
synchronized (events) {
eventArray = new AWTEvent[events.size()];
events.copyInto(eventArray);
- events.removeAllElements();
+ events.removeAllElements();
}
return eventArray;
@@ -103,9 +103,9 @@ public final class WakeupOnAWTEvent extends WakeupCriterion {
this.setTriggered();
}
-
+
/**
- * This is a callback from BehaviorStructure. It is
+ * This is a callback from BehaviorStructure. It is
* used to add wakeupCondition to behavior structure.
*/
void addBehaviorCondition(BehaviorStructure bs) {
@@ -115,7 +115,7 @@ public final class WakeupOnAWTEvent extends WakeupCriterion {
/**
- * This is a callback from BehaviorStructure. It is
+ * This is a callback from BehaviorStructure. It is
* used to remove wakeupCondition from behavior structure.
*/
void removeBehaviorCondition(BehaviorStructure bs) {
@@ -141,9 +141,9 @@ public final class WakeupOnAWTEvent extends WakeupCriterion {
(EventMask & AWTEvent.KEY_EVENT_MASK) != 0) {
behav.universe.enableKeyEvents();
}
- if ((AwtId >= MouseEvent.MOUSE_FIRST) &&
+ if ((AwtId >= MouseEvent.MOUSE_FIRST) &&
(AwtId <= MouseEvent.MOUSE_LAST)) {
- if ((AwtId == MouseEvent.MOUSE_DRAGGED) ||
+ if ((AwtId == MouseEvent.MOUSE_DRAGGED) ||
(AwtId == MouseEvent.MOUSE_MOVED)) {
behav.universe.enableMouseMotionEvents();
}
diff --git a/src/classes/share/javax/media/j3d/WakeupOnActivation.java b/src/classes/share/javax/media/j3d/WakeupOnActivation.java
index c977c92..67262a9 100644
--- a/src/classes/share/javax/media/j3d/WakeupOnActivation.java
+++ b/src/classes/share/javax/media/j3d/WakeupOnActivation.java
@@ -35,7 +35,7 @@ package javax.media.j3d;
* Class specifying a wakeup the first time an active Viewplatform's
* activation
* volume intersects with this object's scheduling region.
- * This gives the behavior an explicit means of executing code when
+ * This gives the behavior an explicit means of executing code when
* it is activated.
*/
public final class WakeupOnActivation extends WakeupCriterion {
@@ -54,7 +54,7 @@ public final class WakeupOnActivation extends WakeupCriterion {
}
/**
- * This is a callback from BehaviorStructure. It is
+ * This is a callback from BehaviorStructure. It is
* used to add wakeupCondition to behavior structure.
*/
void addBehaviorCondition(BehaviorStructure bs) {
@@ -65,7 +65,7 @@ public final class WakeupOnActivation extends WakeupCriterion {
/**
- * This is a callback from BehaviorStructure. It is
+ * This is a callback from BehaviorStructure. It is
* used to remove wakeupCondition from behavior structure.
*/
void removeBehaviorCondition(BehaviorStructure bs) {
diff --git a/src/classes/share/javax/media/j3d/WakeupOnBehaviorPost.java b/src/classes/share/javax/media/j3d/WakeupOnBehaviorPost.java
index 1018222..4de3977 100644
--- a/src/classes/share/javax/media/j3d/WakeupOnBehaviorPost.java
+++ b/src/classes/share/javax/media/j3d/WakeupOnBehaviorPost.java
@@ -50,10 +50,10 @@ public final class WakeupOnBehaviorPost extends WakeupCriterion {
/**
* Constructs a new WakeupOnBehaviorPost criterion. A behavior of null
* specifies a wakeup from any behavior on the specified postId. A postId
- * of 0 specifies a wakeup on any postId from the specified behavior.
+ * of 0 specifies a wakeup on any postId from the specified behavior.
* A behavior of null AND a postId of 0 specify a wakeup on any postId
* from any behavior.
- * @param behavior the behavior that must be the source of the post,
+ * @param behavior the behavior that must be the source of the post,
* if behavior == null, then any behavior posting the postId will cause
* the wakeup.
* @param postId the postId that will trigger a wakeup if posted by the
@@ -67,7 +67,7 @@ public final class WakeupOnBehaviorPost extends WakeupCriterion {
triggeringBehavior = null;
WakeupIndexedList.init(this, TOTAL_INDEXED_UNORDER_SET_TYPES);
}
-
+
/**
* Retrieve the WakeupCriterion's specified postId
* @return the post id specified in this object's construction.
@@ -88,8 +88,8 @@ public final class WakeupOnBehaviorPost extends WakeupCriterion {
/**
* Returns the postId that caused the behavior to wakeup. If the postId
- * used to construct this wakeup criterion was not zero, then the
- * triggering postId will always be equal to the postId used in the
+ * used to construct this wakeup criterion was not zero, then the
+ * triggering postId will always be equal to the postId used in the
* constructor.
*/
public int getTriggeringPostId() {
@@ -98,17 +98,17 @@ public final class WakeupOnBehaviorPost extends WakeupCriterion {
/**
- * Returns the behavior that triggered this wakeup. If the arming
- * behavior used to construct this object was not null, then the
+ * Returns the behavior that triggered this wakeup. If the arming
+ * behavior used to construct this object was not null, then the
* triggering behavior will be the same as the arming behavior.
*/
public Behavior getTriggeringBehavior() {
return triggeringBehavior;
}
-
+
/**
- * This is a callback from BehaviorStructure. It is
+ * This is a callback from BehaviorStructure. It is
* used to add wakeupCondition to behavior structure.
*/
void addBehaviorCondition(BehaviorStructure bs) {
@@ -117,7 +117,7 @@ public final class WakeupOnBehaviorPost extends WakeupCriterion {
/**
- * This is a callback from BehaviorStructure. It is
+ * This is a callback from BehaviorStructure. It is
* used to remove wakeupCondition from behavior structure.
*/
void removeBehaviorCondition(BehaviorStructure bs) {
diff --git a/src/classes/share/javax/media/j3d/WakeupOnCollisionEntry.java b/src/classes/share/javax/media/j3d/WakeupOnCollisionEntry.java
index 95733cf..651f847 100644
--- a/src/classes/share/javax/media/j3d/WakeupOnCollisionEntry.java
+++ b/src/classes/share/javax/media/j3d/WakeupOnCollisionEntry.java
@@ -35,7 +35,7 @@ import java.util.*;
/**
* Class specifying a wakeup when the specified object
- * collides with any other object in the scene graph.
+ * collides with any other object in the scene graph.
*
*/
public final class WakeupOnCollisionEntry extends WakeupCriterion {
@@ -72,7 +72,7 @@ public final class WakeupOnCollisionEntry extends WakeupCriterion {
// Cached the arming Node being used when it is not BOUND
NodeRetained armingNode;
- // A transformed Bounds of Group/Bounds, use by
+ // A transformed Bounds of Group/Bounds, use by
// BOUND, GROUP
Bounds vwcBounds = null;
@@ -91,19 +91,19 @@ public final class WakeupOnCollisionEntry extends WakeupCriterion {
SceneGraphPath armingPath = null;
Bounds armingBounds = null;
-
+
// the following two references are set only after a collision
// has occurred
Bounds collidingBounds = null;
SceneGraphPath collidingPath = null;
/**
- * Constructs a new WakeupOnCollisionEntry criterion with
+ * Constructs a new WakeupOnCollisionEntry criterion with
* USE_BOUNDS for a speed hint.
* @param armingPath the path used to arm collision
* detection
- * @exception IllegalArgumentException if object associated with the
- * SceneGraphPath is other than a Group, Shape3D, Morph, or
+ * @exception IllegalArgumentException if object associated with the
+ * SceneGraphPath is other than a Group, Shape3D, Morph, or
* BoundingLeaf node.
*/
public WakeupOnCollisionEntry(SceneGraphPath armingPath) {
@@ -118,11 +118,11 @@ public final class WakeupOnCollisionEntry extends WakeupCriterion {
* accurately Java 3D will perform collision detection
* @exception IllegalArgumentException if hint is not one of
* USE_GEOMETRY or USE_BOUNDS.
- * @exception IllegalArgumentException if object associated with the
- * SceneGraphPath is other than a Group, Shape3D, Morph, or
+ * @exception IllegalArgumentException if object associated with the
+ * SceneGraphPath is other than a Group, Shape3D, Morph, or
* BoundingLeaf node.
*/
- public WakeupOnCollisionEntry(SceneGraphPath armingPath,
+ public WakeupOnCollisionEntry(SceneGraphPath armingPath,
int speedHint) {
this(new SceneGraphPath(armingPath), speedHint, null);
}
@@ -133,7 +133,7 @@ public final class WakeupOnCollisionEntry extends WakeupCriterion {
* arm collision detection
* @exception IllegalArgumentException if object is under a
* SharedGroup node or object is other than a Group, Shape3D,
- * Morph or BoundingLeaf node.
+ * Morph or BoundingLeaf node.
*/
public WakeupOnCollisionEntry(Node armingNode) {
this(armingNode, USE_BOUNDS);
@@ -149,7 +149,7 @@ public final class WakeupOnCollisionEntry extends WakeupCriterion {
* USE_GEOMETRY or USE_BOUNDS.
* @exception IllegalArgumentException if object is under a
* SharedGroup node or object is other than a Group, Shape3D,
- * Morph or BoundingLeaf node.
+ * Morph or BoundingLeaf node.
*/
public WakeupOnCollisionEntry(Node armingNode, int speedHint) {
this(new SceneGraphPath(null, armingNode), speedHint, null);
@@ -175,16 +175,16 @@ public final class WakeupOnCollisionEntry extends WakeupCriterion {
* detection
* @exception IllegalArgumentException if hint is not one of
* USE_GEOMETRY or USE_BOUNDS.
- * @exception IllegalArgumentException if object associated with the
- * SceneGraphPath is other than a Group, Shape3D, Morph, or
+ * @exception IllegalArgumentException if object associated with the
+ * SceneGraphPath is other than a Group, Shape3D, Morph, or
* BoundingLeaf node.
*/
- WakeupOnCollisionEntry(SceneGraphPath armingPath,
+ WakeupOnCollisionEntry(SceneGraphPath armingPath,
int speedHint, Bounds armingBounds) {
if (armingPath != null) {
this.armingNode = (NodeRetained) armingPath.getObject().retained;
- nodeType = getNodeType(armingNode, armingPath,
- "WakeupOnCollisionEntry");
+ nodeType = getNodeType(armingNode, armingPath,
+ "WakeupOnCollisionEntry");
this.armingPath = armingPath;
validateSpeedHint(speedHint, "WakeupOnCollisionEntry4");
} else {
@@ -201,7 +201,7 @@ public final class WakeupOnCollisionEntry extends WakeupCriterion {
* criterion---null implies that a bounds object armed this criteria
*/
public SceneGraphPath getArmingPath() {
- return (armingPath != null ?
+ return (armingPath != null ?
new SceneGraphPath(armingPath) : null);
}
@@ -211,7 +211,7 @@ public final class WakeupOnCollisionEntry extends WakeupCriterion {
* criterion---null implies that a SceneGraphPath armed this criteria
*/
public Bounds getArmingBounds() {
- return (armingBounds != null ?
+ return (armingBounds != null ?
(Bounds)armingBounds.clone() : null);
}
@@ -239,7 +239,7 @@ public final class WakeupOnCollisionEntry extends WakeupCriterion {
/**
* Retrieves the Bounds object that caused the collision
* @return the colliding Bounds object.
- * @exception IllegalStateException if not called from within the
+ * @exception IllegalStateException if not called from within the
* a behavior's processStimulus method which was awoken by a collision.
*/
public Bounds getTriggeringBounds() {
@@ -263,11 +263,11 @@ public final class WakeupOnCollisionEntry extends WakeupCriterion {
* throw Exception if node is not legal.
* @return nodeType
*/
- static int getNodeType(NodeRetained armingNode,
+ static int getNodeType(NodeRetained armingNode,
SceneGraphPath armingPath, String s)
throws IllegalArgumentException {
- // check if SceneGraphPath is unique
+ // check if SceneGraphPath is unique
// Note that graph may not live at this point so we
// can't use node.inSharedGroup.
if (!armingPath.validate()) {
@@ -277,7 +277,7 @@ public final class WakeupOnCollisionEntry extends WakeupCriterion {
if (armingNode.inBackgroundGroup) {
throw new IllegalArgumentException(J3dI18N.getString(s + "1"));
}
-
+
// This should come before Shape3DRetained check
if (armingNode instanceof OrientedShape3DRetained) {
return ORIENTEDSHAPE3D;
@@ -294,7 +294,7 @@ public final class WakeupOnCollisionEntry extends WakeupCriterion {
if (armingNode instanceof GroupRetained) {
return GROUP;
}
-
+
if (armingNode instanceof BoundingLeafRetained) {
return BOUNDINGLEAF;
}
@@ -306,7 +306,7 @@ public final class WakeupOnCollisionEntry extends WakeupCriterion {
* speedHint legality checker
* throw Exception if speedHint is not legal
*/
- static void validateSpeedHint(int speedHint, String s)
+ static void validateSpeedHint(int speedHint, String s)
throws IllegalArgumentException {
if ((speedHint != USE_GEOMETRY) && (speedHint != USE_BOUNDS)) {
throw new IllegalArgumentException(J3dI18N.getString(s));
@@ -316,11 +316,11 @@ public final class WakeupOnCollisionEntry extends WakeupCriterion {
/**
- * This is a callback from BehaviorStructure. It is
+ * This is a callback from BehaviorStructure. It is
* used to add wakeupCondition to behavior structure.
*/
void addBehaviorCondition(BehaviorStructure bs) {
-
+
switch (nodeType) {
case SHAPE: // Use geometryAtoms[].collisionBounds
case ORIENTEDSHAPE3D:
@@ -330,7 +330,7 @@ public final class WakeupOnCollisionEntry extends WakeupCriterion {
if (geometryAtoms == null) {
geometryAtoms = new UnorderList(1, GeometryAtom.class);
}
- Shape3DRetained shape = (Shape3DRetained) armingNode;
+ Shape3DRetained shape = (Shape3DRetained) armingNode;
geometryAtoms.add(Shape3DRetained.getGeomAtom(shape.getMirrorShape(armingPath)));
break;
case MORPH: // Use geometryAtoms[].collisionBounds
@@ -362,16 +362,16 @@ public final class WakeupOnCollisionEntry extends WakeupCriterion {
geometryAtoms = new UnorderList(1, GeometryAtom.class);
}
((GroupRetained) armingNode).searchGeometryAtoms(geometryAtoms);
- }
+ }
// else use this.vwcBounds
- default:
+ default:
}
behav.universe.geometryStructure.addWakeupOnCollision(this);
}
/**
- * This is a callback from BehaviorStructure. It is
+ * This is a callback from BehaviorStructure. It is
* used to remove wakeupCondition from behavior structure.
*/
void removeBehaviorCondition(BehaviorStructure bs) {
@@ -384,21 +384,21 @@ public final class WakeupOnCollisionEntry extends WakeupCriterion {
}
- // Set collidingPath & collidingBounds
+ // Set collidingPath & collidingBounds
void setTarget(BHLeafInterface leaf) {
SceneGraphPath path;
Bounds bound;
-
+
if (leaf instanceof GeometryAtom) {
// Find the triggered Path & Bounds for this geometry Atom
GeometryAtom geomAtom = (GeometryAtom) leaf;
Shape3DRetained shape = geomAtom.source;
- path = getSceneGraphPath(shape.sourceNode,
+ path = getSceneGraphPath(shape.sourceNode,
shape.key,
shape.getCurrentLocalToVworld(0));
bound = getTriggeringBounds(shape);
-
+
} else {
// Find the triggered Path & Bounds for this alternative
// collision target
@@ -414,7 +414,7 @@ public final class WakeupOnCollisionEntry extends WakeupCriterion {
collidingBounds = bound;
}
}
-
+
// Invoke from GeometryStructure to update vwcBounds of GROUP
void updateCollisionBounds(boolean reEvaluateGAs){
@@ -426,21 +426,21 @@ public final class WakeupOnCollisionEntry extends WakeupCriterion {
// this may involve recursive tree traverse if
// BoundsAutoCompute is true, we can't avoid
// since the bound under it may change by transform
- vwcBounds = group.getEffectiveBounds();
+ vwcBounds = group.getEffectiveBounds();
}
group.transformBounds(armingPath, vwcBounds);
} else if (nodeType == BOUND) {
vwcBounds.transform(armingBounds, behav.getCurrentLocalToVworld());
}
-
- if (reEvaluateGAs &&
- (nodeType == GROUP) &&
+
+ if (reEvaluateGAs &&
+ (nodeType == GROUP) &&
(accuracyMode == USE_GEOMETRY)) {
geometryAtoms.clear();
- ((GroupRetained) armingNode).searchGeometryAtoms(geometryAtoms);
+ ((GroupRetained) armingNode).searchGeometryAtoms(geometryAtoms);
}
- }
-
+ }
+
/**
* Return the TriggeringBounds for node
@@ -451,19 +451,19 @@ public final class WakeupOnCollisionEntry extends WakeupCriterion {
if (node instanceof Shape3DRetained) {
Shape3DRetained shape = (Shape3DRetained) node;
if (shape.collisionBound == null) {
- // TODO: get bounds by copy
+ // TODO: get bounds by copy
return shape.getEffectiveBounds();
- }
- return shape.collisionBound;
- }
+ }
+ return shape.collisionBound;
+ }
MorphRetained morph = (MorphRetained) node;
if (morph.collisionBound == null) {
- // TODO: get bounds by copy
+ // TODO: get bounds by copy
return morph.getEffectiveBounds();
- }
- return morph.collisionBound;
+ }
+ return morph.collisionBound;
}
@@ -472,10 +472,10 @@ public final class WakeupOnCollisionEntry extends WakeupCriterion {
*/
static Bounds getTriggeringBounds(GroupRetained group) {
if (group.collisionBound == null) {
- // TODO: get bounds by copy
+ // TODO: get bounds by copy
return group.getEffectiveBounds();
- }
- return group.collisionBound;
+ }
+ return group.collisionBound;
}
static SceneGraphPath getSceneGraphPath(GroupRetained group) {
@@ -501,7 +501,7 @@ public final class WakeupOnCollisionEntry extends WakeupCriterion {
}
/**
- * return the SceneGraphPath of the geomAtom.
+ * return the SceneGraphPath of the geomAtom.
* Find the alternative Collision target closest to the locale.
*/
static SceneGraphPath getSceneGraphPath(NodeRetained startNode,
@@ -516,7 +516,7 @@ public final class WakeupOnCollisionEntry extends WakeupCriterion {
String nodeId;
Vector parents;
NodeRetained linkR;
-
+
if (nodeR.inSharedGroup) {
// getlastNodeId() will destroy this key
if (key != null) {
@@ -525,14 +525,14 @@ public final class WakeupOnCollisionEntry extends WakeupCriterion {
key = new HashKey(startNode.localToVworldKeys[0]);
}
}
-
+
do {
if (nodeR.source.getCapability(Node.ENABLE_COLLISION_REPORTING)){
- path.add(nodeR.source);
+ path.add(nodeR.source);
}
if (nodeR instanceof SharedGroupRetained) {
-
+
// retrieve the last node ID
nodeId = key.getLastNodeId();
parents = ((SharedGroupRetained) nodeR).parents;
@@ -563,14 +563,14 @@ public final class WakeupOnCollisionEntry extends WakeupCriterion {
}
nodeR = nodeR.parent;
} while (nodeR != null); // reach Locale
-
+
Node nodes[];
if (target == startNode) { // in most case
nodes = (Node []) path.toArray(false);
} else { // alternativeCollisionTarget is set
nodes = (Node []) path.toArray(target);
}
- SceneGraphPath sgpath = new SceneGraphPath(locale,
+ SceneGraphPath sgpath = new SceneGraphPath(locale,
nodes,
(Node) target.source);
sgpath.setTransform(transform);
diff --git a/src/classes/share/javax/media/j3d/WakeupOnCollisionExit.java b/src/classes/share/javax/media/j3d/WakeupOnCollisionExit.java
index 83b8ea8..cf22d4e 100644
--- a/src/classes/share/javax/media/j3d/WakeupOnCollisionExit.java
+++ b/src/classes/share/javax/media/j3d/WakeupOnCollisionExit.java
@@ -63,7 +63,7 @@ public final class WakeupOnCollisionExit extends WakeupCriterion {
// Cached the arming Node being used when it is not BOUND
NodeRetained armingNode;
- // A transformed Bounds of Group/Bounds
+ // A transformed Bounds of Group/Bounds
// use by BOUND, GROUP
Bounds vwcBounds;
@@ -80,7 +80,7 @@ public final class WakeupOnCollisionExit extends WakeupCriterion {
* Only use by SHAPE, MORPH, GROUP, ORIENTEDSHAPE
*/
UnorderList geometryAtoms = null;
-
+
// one of GROUP, BOUNDINGLEAF, SHAPE, MORPH, BOUND
int nodeType;
@@ -124,7 +124,7 @@ public final class WakeupOnCollisionExit extends WakeupCriterion {
* arm collision detection
* @exception IllegalArgumentException if object is under a
* SharedGroup node or object is other than a Group, Shape3D,
- * Morph or BoundingLeaf node.
+ * Morph or BoundingLeaf node.
*/
public WakeupOnCollisionExit(Node armingNode) {
this(armingNode, USE_BOUNDS);
@@ -140,7 +140,7 @@ public final class WakeupOnCollisionExit extends WakeupCriterion {
* USE_GEOMETRY or USE_BOUNDS.
* @exception IllegalArgumentException if object is under a
* SharedGroup node or object is other than a Group, Shape3D,
- * Morph or BoundingLeaf node.
+ * Morph or BoundingLeaf node.
*/
public WakeupOnCollisionExit(Node armingNode, int speedHint) {
this(new SceneGraphPath(null, armingNode), speedHint, null);
@@ -169,7 +169,7 @@ public final class WakeupOnCollisionExit extends WakeupCriterion {
* @exception IllegalArgumentException if object associated with the
* SceneGraphPath is other than a Group, Shape3D, Morph, or BoundingLeaf node.
*/
- WakeupOnCollisionExit(SceneGraphPath armingPath,
+ WakeupOnCollisionExit(SceneGraphPath armingPath,
int speedHint, Bounds armingBounds) {
if (armingPath != null) {
this.armingNode = (NodeRetained) armingPath.getObject().retained;
@@ -179,8 +179,8 @@ public final class WakeupOnCollisionExit extends WakeupCriterion {
WakeupOnCollisionEntry.validateSpeedHint(speedHint,
"WakeupOnCollisionExit4");
} else {
- this.armingBounds = armingBounds;
- nodeType = WakeupOnCollisionEntry.BOUND;
+ this.armingBounds = armingBounds;
+ nodeType = WakeupOnCollisionEntry.BOUND;
}
accuracyMode = speedHint;
WakeupIndexedList.init(this, TOTAL_INDEXED_UNORDER_SET_TYPES);
@@ -192,7 +192,7 @@ public final class WakeupOnCollisionExit extends WakeupCriterion {
* criterion---null implies that a bounds object armed this criteria
*/
public SceneGraphPath getArmingPath() {
- return (armingPath != null ?
+ return (armingPath != null ?
new SceneGraphPath(armingPath) : null);
}
@@ -202,14 +202,14 @@ public final class WakeupOnCollisionExit extends WakeupCriterion {
* criterion---null implies that a SceneGraphPath armed this criteria
*/
public Bounds getArmingBounds() {
- return (armingBounds != null ?
+ return (armingBounds != null ?
(Bounds)armingBounds.clone() : null);
}
/**
* Retrieves the path describing the object causing the collision.
* @return the SceneGraphPath that describes the triggering object.
- * @exception IllegalStateException if not called from within the
+ * @exception IllegalStateException if not called from within the
* a behavior's processStimulus method which was awoken by a collision.
*/
public SceneGraphPath getTriggeringPath() {
@@ -230,7 +230,7 @@ public final class WakeupOnCollisionExit extends WakeupCriterion {
/**
* Retrieves the Bounds object that caused the collision
* @return the colliding Bounds object.
- * @exception IllegalStateException if not called from within the
+ * @exception IllegalStateException if not called from within the
* a behavior's processStimulus method which was awoken by a collision.
*/
public Bounds getTriggeringBounds() {
@@ -249,7 +249,7 @@ public final class WakeupOnCollisionExit extends WakeupCriterion {
}
/**
- * This is a callback from BehaviorStructure. It is
+ * This is a callback from BehaviorStructure. It is
* used to add wakeupCondition to behavior structure.
*/
void addBehaviorCondition(BehaviorStructure bs) {
@@ -263,7 +263,7 @@ public final class WakeupOnCollisionExit extends WakeupCriterion {
if (geometryAtoms == null) {
geometryAtoms = new UnorderList(1, GeometryAtom.class);
}
- Shape3DRetained shape = (Shape3DRetained) armingNode;
+ Shape3DRetained shape = (Shape3DRetained) armingNode;
geometryAtoms.add(Shape3DRetained.getGeomAtom(shape.getMirrorShape(armingPath)));
break;
case WakeupOnCollisionEntry.MORPH: // Use geometryAtoms[].collisionBounds
@@ -295,9 +295,9 @@ public final class WakeupOnCollisionExit extends WakeupCriterion {
geometryAtoms = new UnorderList(1, GeometryAtom.class);
}
((GroupRetained) armingNode).searchGeometryAtoms(geometryAtoms);
- }
+ }
// else use this.vwcBounds
- default:
+ default:
}
behav.universe.geometryStructure.addWakeupOnCollision(this);
@@ -305,7 +305,7 @@ public final class WakeupOnCollisionExit extends WakeupCriterion {
/**
- * This is a callback from BehaviorStructure. It is
+ * This is a callback from BehaviorStructure. It is
* used to remove wakeupCondition from behavior structure.
*/
void removeBehaviorCondition(BehaviorStructure bs) {
@@ -319,7 +319,7 @@ public final class WakeupOnCollisionExit extends WakeupCriterion {
- // Set collidingPath & collidingBounds
+ // Set collidingPath & collidingBounds
void setTarget(BHLeafInterface leaf) {
SceneGraphPath path;
Bounds bound;
@@ -329,12 +329,12 @@ public final class WakeupOnCollisionExit extends WakeupCriterion {
GeometryAtom geomAtom = (GeometryAtom) leaf;
Shape3DRetained shape = geomAtom.source;
path = WakeupOnCollisionEntry.getSceneGraphPath(
- shape.sourceNode,
+ shape.sourceNode,
shape.key,
shape.getCurrentLocalToVworld(0));
bound = WakeupOnCollisionEntry.getTriggeringBounds(shape);
-
+
} else {
// Find the triggered Path & Bounds for this alternative
// collision target
@@ -362,21 +362,21 @@ public final class WakeupOnCollisionExit extends WakeupCriterion {
// this may involve recursive tree traverse if
// BoundsAutoCompute is true, we can't avoid
// since the bound under it may change by transform
- vwcBounds = group.getEffectiveBounds();
+ vwcBounds = group.getEffectiveBounds();
}
group.transformBounds(armingPath, vwcBounds);
} else if (nodeType == WakeupOnCollisionEntry.BOUND) {
vwcBounds.transform(armingBounds, behav.getCurrentLocalToVworld());
}
-
- if (reEvaluateGAs &&
- (nodeType == WakeupOnCollisionEntry.GROUP) &&
+
+ if (reEvaluateGAs &&
+ (nodeType == WakeupOnCollisionEntry.GROUP) &&
(accuracyMode == USE_GEOMETRY)) {
geometryAtoms.clear();
- ((GroupRetained) armingNode).searchGeometryAtoms(geometryAtoms);
+ ((GroupRetained) armingNode).searchGeometryAtoms(geometryAtoms);
}
- }
-
+ }
+
void setTriggered(){
// if path not set, probably the branch is just detach.
if (collidingPath != null) {
diff --git a/src/classes/share/javax/media/j3d/WakeupOnCollisionMovement.java b/src/classes/share/javax/media/j3d/WakeupOnCollisionMovement.java
index 608974e..919966b 100644
--- a/src/classes/share/javax/media/j3d/WakeupOnCollisionMovement.java
+++ b/src/classes/share/javax/media/j3d/WakeupOnCollisionMovement.java
@@ -63,7 +63,7 @@ public final class WakeupOnCollisionMovement extends WakeupCriterion {
// Cached the arming Node being used when it is not BOUND
NodeRetained armingNode;
- // transformed Bounds of Group/Bounds, use by
+ // transformed Bounds of Group/Bounds, use by
// BOUND, BOUNDINGLEAF, GROUP
Bounds vwcBounds;
@@ -77,7 +77,7 @@ public final class WakeupOnCollisionMovement extends WakeupCriterion {
Bounds lastSrcBounds = null;
Bounds lastDstBounds = null;
boolean duplicateEvent = false;
-
+
// Use by BoundingLeaf, point to mirror BoundingLeaf
// transformedRegion under this leaf is used.
BoundingLeafRetained boundingLeaf = null;
@@ -103,11 +103,11 @@ public final class WakeupOnCollisionMovement extends WakeupCriterion {
* Constructs a new WakeupOnCollisionMovement criterion.
* @param armingPath the path used to arm collision
* detection
- * @exception IllegalArgumentException if object associated with the
+ * @exception IllegalArgumentException if object associated with the
* SceneGraphPath is other than a Group, Shape3D, Morph, or BoundingLeaf node.
*/
public WakeupOnCollisionMovement(SceneGraphPath armingPath) {
- this(armingPath, USE_BOUNDS);
+ this(armingPath, USE_BOUNDS);
}
/**
@@ -118,10 +118,10 @@ public final class WakeupOnCollisionMovement extends WakeupCriterion {
* accurately Java 3D will perform collision detection
* @exception IllegalArgumentException if hint is not one of
* USE_GEOMETRY or USE_BOUNDS.
- * @exception IllegalArgumentException if object associated with the
+ * @exception IllegalArgumentException if object associated with the
* SceneGraphPath is other than a Group, Shape3D, Morph, or BoundingLeaf node.
*/
- public WakeupOnCollisionMovement(SceneGraphPath armingPath,
+ public WakeupOnCollisionMovement(SceneGraphPath armingPath,
int speedHint) {
this(new SceneGraphPath(armingPath), speedHint, null);
}
@@ -132,7 +132,7 @@ public final class WakeupOnCollisionMovement extends WakeupCriterion {
* arm collision detection
* @exception IllegalArgumentException if object is under a
* SharedGroup node or object is other than a Group, Shape3D,
- * Morph or BoundingLeaf node.
+ * Morph or BoundingLeaf node.
*/
public WakeupOnCollisionMovement(Node armingNode) {
this(armingNode, USE_BOUNDS);
@@ -148,7 +148,7 @@ public final class WakeupOnCollisionMovement extends WakeupCriterion {
* USE_GEOMETRY or USE_BOUNDS.
* @exception IllegalArgumentException if object is under a
* SharedGroup node or object is other than a Group, Shape3D,
- * Morph or BoundingLeaf node.
+ * Morph or BoundingLeaf node.
*/
public WakeupOnCollisionMovement(Node armingNode, int speedHint) {
this(new SceneGraphPath(null, armingNode), speedHint, null);
@@ -174,7 +174,7 @@ public final class WakeupOnCollisionMovement extends WakeupCriterion {
* detection
* @exception IllegalArgumentException if hint is not one of
* USE_GEOMETRY or USE_BOUNDS.
- * @exception IllegalArgumentException if object associated with the
+ * @exception IllegalArgumentException if object associated with the
* SceneGraphPath is other than a Group, Shape3D, Morph, or BoundingLeaf node.
*/
WakeupOnCollisionMovement(SceneGraphPath armingPath,
@@ -184,13 +184,13 @@ public final class WakeupOnCollisionMovement extends WakeupCriterion {
nodeType = WakeupOnCollisionEntry.getNodeType(armingNode, armingPath,
"WakeupOnCollisionMovement");
this.armingPath = armingPath;
- WakeupOnCollisionEntry.validateSpeedHint(speedHint,
+ WakeupOnCollisionEntry.validateSpeedHint(speedHint,
"WakeupOnCollisionMovement4");
} else {
this.armingBounds = armingBounds;
- nodeType = WakeupOnCollisionEntry.BOUND;
+ nodeType = WakeupOnCollisionEntry.BOUND;
}
- accuracyMode = speedHint;
+ accuracyMode = speedHint;
WakeupIndexedList.init(this, TOTAL_INDEXED_UNORDER_SET_TYPES);
}
@@ -200,7 +200,7 @@ public final class WakeupOnCollisionMovement extends WakeupCriterion {
* criterion---null implies that a bounds object armed this criteria
*/
public SceneGraphPath getArmingPath() {
- return (armingPath != null ?
+ return (armingPath != null ?
new SceneGraphPath(armingPath) : null);
}
@@ -210,14 +210,14 @@ public final class WakeupOnCollisionMovement extends WakeupCriterion {
* criterion---null implies that a SceneGraphPath armed this criteria
*/
public Bounds getArmingBounds() {
- return (armingBounds != null ?
+ return (armingBounds != null ?
(Bounds)armingBounds.clone() : null);
}
/**
* Retrieves the path describing the object causing the collision.
* @return the SceneGraphPath that describes the triggering object.
- * @exception IllegalStateException if not called from within the
+ * @exception IllegalStateException if not called from within the
* a behavior's processStimulus method which was awoken by a collision.
*/
public SceneGraphPath getTriggeringPath() {
@@ -238,7 +238,7 @@ public final class WakeupOnCollisionMovement extends WakeupCriterion {
/**
* Retrieves the Bounds object that caused the collision
* @return the colliding Bounds object.
- * @exception IllegalStateException if not called from within the
+ * @exception IllegalStateException if not called from within the
* a behavior's processStimulus method which was awoken by a collision.
*/
public Bounds getTriggeringBounds() {
@@ -256,9 +256,9 @@ public final class WakeupOnCollisionMovement extends WakeupCriterion {
(Bounds)(collidingBounds.clone()): null);
}
-
+
/**
- * This is a callback from BehaviorStructure. It is
+ * This is a callback from BehaviorStructure. It is
* used to add wakeupCondition to behavior structure.
*/
void addBehaviorCondition(BehaviorStructure bs) {
@@ -272,7 +272,7 @@ public final class WakeupOnCollisionMovement extends WakeupCriterion {
if (geometryAtoms == null) {
geometryAtoms = new UnorderList(1, GeometryAtom.class);
}
- Shape3DRetained shape = (Shape3DRetained) armingNode;
+ Shape3DRetained shape = (Shape3DRetained) armingNode;
geometryAtoms.add(Shape3DRetained.getGeomAtom(shape.getMirrorShape(armingPath)));
break;
case WakeupOnCollisionEntry.MORPH: // Use geometryAtoms[].collisionBounds
@@ -304,9 +304,9 @@ public final class WakeupOnCollisionMovement extends WakeupCriterion {
geometryAtoms = new UnorderList(1, GeometryAtom.class);
}
((GroupRetained) armingNode).searchGeometryAtoms(geometryAtoms);
- }
+ }
// else use this.vwcBounds
- default:
+ default:
}
behav.universe.geometryStructure.addWakeupOnCollision(this);
@@ -314,7 +314,7 @@ public final class WakeupOnCollisionMovement extends WakeupCriterion {
/**
- * This is a callback from BehaviorStructure. It is
+ * This is a callback from BehaviorStructure. It is
* used to remove wakeupCondition from behavior structure.
*/
void removeBehaviorCondition(BehaviorStructure bs) {
@@ -327,7 +327,7 @@ public final class WakeupOnCollisionMovement extends WakeupCriterion {
}
- // Set collidingPath & collidingBounds
+ // Set collidingPath & collidingBounds
void setTarget(BHLeafInterface leaf) {
SceneGraphPath path;
Bounds bound;
@@ -337,11 +337,11 @@ public final class WakeupOnCollisionMovement extends WakeupCriterion {
GeometryAtom geomAtom = (GeometryAtom) leaf;
Shape3DRetained shape = geomAtom.source;
path = WakeupOnCollisionEntry.getSceneGraphPath(
- shape.sourceNode,
+ shape.sourceNode,
shape.key,
shape.getCurrentLocalToVworld(0));
bound = WakeupOnCollisionEntry.getTriggeringBounds(shape);
-
+
} else {
// Find the triggered Path & Bounds for this alternative
// collision target
@@ -368,21 +368,21 @@ public final class WakeupOnCollisionMovement extends WakeupCriterion {
// this may involve recursive tree traverse if
// BoundsAutoCompute is true, we can't avoid
// since the bound under it may change by transform
- vwcBounds = group.getEffectiveBounds();
+ vwcBounds = group.getEffectiveBounds();
}
group.transformBounds(armingPath, vwcBounds);
} else if (nodeType == WakeupOnCollisionEntry.BOUND) {
vwcBounds.transform(armingBounds, behav.getCurrentLocalToVworld());
}
-
- if (reEvaluateGAs &&
- (nodeType == WakeupOnCollisionEntry.GROUP) &&
+
+ if (reEvaluateGAs &&
+ (nodeType == WakeupOnCollisionEntry.GROUP) &&
(accuracyMode == USE_GEOMETRY)) {
geometryAtoms.clear();
- ((GroupRetained) armingNode).searchGeometryAtoms(geometryAtoms);
+ ((GroupRetained) armingNode).searchGeometryAtoms(geometryAtoms);
}
- }
+ }
void setTriggered(){
// if path not set, probably the branch is just detach.
diff --git a/src/classes/share/javax/media/j3d/WakeupOnDeactivation.java b/src/classes/share/javax/media/j3d/WakeupOnDeactivation.java
index 467345e..e819aa1 100644
--- a/src/classes/share/javax/media/j3d/WakeupOnDeactivation.java
+++ b/src/classes/share/javax/media/j3d/WakeupOnDeactivation.java
@@ -34,7 +34,7 @@ package javax.media.j3d;
/**
* Class specifying a wakeup on first detection of a Viewplatform's
* activation volume no longer intersecting with this object's scheduling
- * region. This gives the behavior an explicit means of executing code
+ * region. This gives the behavior an explicit means of executing code
* when it is deactivated.
*/
public final class WakeupOnDeactivation extends WakeupCriterion {
@@ -67,7 +67,7 @@ public final class WakeupOnDeactivation extends WakeupCriterion {
}
/**
- * This is a callback from BehaviorStructure. It is
+ * This is a callback from BehaviorStructure. It is
* used to add wakeupCondition to behavior structure.
*/
void addBehaviorCondition(BehaviorStructure bs) {
@@ -78,7 +78,7 @@ public final class WakeupOnDeactivation extends WakeupCriterion {
/**
- * This is a callback from BehaviorStructure. It is
+ * This is a callback from BehaviorStructure. It is
* used to remove wakeupCondition from behavior structure.
*/
void removeBehaviorCondition(BehaviorStructure bs) {
@@ -88,7 +88,7 @@ public final class WakeupOnDeactivation extends WakeupCriterion {
}
bs.wakeupOnDeactivation.remove(this);
}
-
+
/**
* Perform task in addBehaviorCondition() that has to be
* set every time the condition met.
diff --git a/src/classes/share/javax/media/j3d/WakeupOnElapsedFrames.java b/src/classes/share/javax/media/j3d/WakeupOnElapsedFrames.java
index 90b65d3..a3da0f1 100644
--- a/src/classes/share/javax/media/j3d/WakeupOnElapsedFrames.java
+++ b/src/classes/share/javax/media/j3d/WakeupOnElapsedFrames.java
@@ -139,11 +139,11 @@ public final class WakeupOnElapsedFrames extends WakeupCriterion {
this.countdown--;
}
}
-
-
+
+
/**
- * This is a callback from BehaviorStructure. It is
+ * This is a callback from BehaviorStructure. It is
* used to add wakeupCondition to behavior structure.
*/
void addBehaviorCondition(BehaviorStructure bs) {
@@ -155,13 +155,13 @@ public final class WakeupOnElapsedFrames extends WakeupCriterion {
// This is necessary to invoke this condition next time
// Otherwise jftc won't work for static scene.
- VirtualUniverse.mc.sendRunMessage(bs.universe,
+ VirtualUniverse.mc.sendRunMessage(bs.universe,
J3dThread.UPDATE_BEHAVIOR);
}
/**
- * This is a callback from BehaviorStructure. It is
+ * This is a callback from BehaviorStructure. It is
* used to remove wakeupCondition from behavior structure.
*/
void removeBehaviorCondition(BehaviorStructure bs) {
diff --git a/src/classes/share/javax/media/j3d/WakeupOnElapsedTime.java b/src/classes/share/javax/media/j3d/WakeupOnElapsedTime.java
index 44ff9b7..6f762c6 100644
--- a/src/classes/share/javax/media/j3d/WakeupOnElapsedTime.java
+++ b/src/classes/share/javax/media/j3d/WakeupOnElapsedTime.java
@@ -61,12 +61,12 @@ public final class WakeupOnElapsedTime extends WakeupCriterion {
* constructing this object.
* @return the elapsed time specified when constructing this object
*/
- public long getElapsedFrameTime(){
+ public long getElapsedFrameTime(){
return wait;
}
/**
- * This is a callback from BehaviorStructure. It is
+ * This is a callback from BehaviorStructure. It is
* used to add wakeupCondition to behavior structure.
*/
void addBehaviorCondition(BehaviorStructure bs) {
@@ -78,7 +78,7 @@ public final class WakeupOnElapsedTime extends WakeupCriterion {
/**
- * This is a callback from BehaviorStructure. It is
+ * This is a callback from BehaviorStructure. It is
* used to remove wakeupCondition from behavior structure.
*/
void removeBehaviorCondition(BehaviorStructure bs) {
@@ -92,8 +92,8 @@ public final class WakeupOnElapsedTime extends WakeupCriterion {
/**
* This is invoked when Behavior processStimulus can't schedule
* to run because behav.active = false. In this case we must
- * reinsert the wakeupOnElapseTime condition back to the
- * TimerThread wakeup heap
+ * reinsert the wakeupOnElapseTime condition back to the
+ * TimerThread wakeup heap
*/
void reInsertElapseTimeCond() {
super.reInsertElapseTimeCond();
diff --git a/src/classes/share/javax/media/j3d/WakeupOnElapsedTimeHeap.java b/src/classes/share/javax/media/j3d/WakeupOnElapsedTimeHeap.java
index 9ca3d03..637ec63 100644
--- a/src/classes/share/javax/media/j3d/WakeupOnElapsedTimeHeap.java
+++ b/src/classes/share/javax/media/j3d/WakeupOnElapsedTimeHeap.java
@@ -32,16 +32,16 @@
package javax.media.j3d;
/**
- * A Binary heap to store WakeupOnElapsedTime. It is arranged so that the
+ * A Binary heap to store WakeupOnElapsedTime. It is arranged so that the
* smallest triggeredTime of the wakeup object is put at the top of the heap.
- * Add/deletion takes O(log n) time.
+ * Add/deletion takes O(log n) time.
* For better performance we can consider to use Fibonacci Heaps.
*
*/
class WakeupOnElapsedTimeHeap implements Cloneable {
// entry 0 is not used so index can be calculated more efficiently
- WakeupOnElapsedTime data[];
+ WakeupOnElapsedTime data[];
int size = 0;
/**
@@ -77,9 +77,9 @@ class WakeupOnElapsedTimeHeap implements Cloneable {
* User has to make sure that size > 0 before it is called.
*/
final WakeupOnElapsedTime getMin() {
- return data[1];
+ return data[1];
}
-
+
/**
* Insert the key into the heap
@@ -158,13 +158,13 @@ class WakeupOnElapsedTimeHeap implements Cloneable {
l = i << 1;
r = l+1;
- if ((l <= size) &&
+ if ((l <= size) &&
(data[l].triggeredTime < data[i].triggeredTime)) {
smallest = l;
} else {
smallest = i;
}
- if ((r <= size) &&
+ if ((r <= size) &&
(data[r].triggeredTime < data[smallest].triggeredTime)) {
smallest = r;
}
@@ -176,14 +176,14 @@ class WakeupOnElapsedTimeHeap implements Cloneable {
data[i] = temp;
i = smallest;
} while (true);
-
+
return min;
}
/***
* Trims the capacity of this instance to be the
- * list's current size.
+ * list's current size.
*/
final void trimToSize() {
if (data.length > size+1) {
@@ -197,22 +197,22 @@ class WakeupOnElapsedTimeHeap implements Cloneable {
* Clone this heap
*/
protected final Object clone() {
- try {
+ try {
WakeupOnElapsedTimeHeap heap = (WakeupOnElapsedTimeHeap)super.clone();
heap.data = new WakeupOnElapsedTime[size+1];
System.arraycopy(data, 0, heap.data, 0, size+1);
return heap;
- } catch (CloneNotSupportedException e) {
+ } catch (CloneNotSupportedException e) {
// this shouldn't happen, since we are Cloneable
throw new InternalError();
}
}
-
+
public String toString() {
StringBuffer sb = new StringBuffer("[ ");
-
+
if (size > 0) {
sb.append(data[1]);
}
diff --git a/src/classes/share/javax/media/j3d/WakeupOnSensorEntry.java b/src/classes/share/javax/media/j3d/WakeupOnSensorEntry.java
index ecd6141..ab12793 100644
--- a/src/classes/share/javax/media/j3d/WakeupOnSensorEntry.java
+++ b/src/classes/share/javax/media/j3d/WakeupOnSensorEntry.java
@@ -45,7 +45,7 @@ public final class WakeupOnSensorEntry extends WakeupCriterion {
static final int TOTAL_INDEXED_UNORDER_SET_TYPES = 2;
Bounds region;
-
+
// Transformed region used by BehaviorStructure
Bounds transformedRegion;
@@ -68,7 +68,7 @@ public final class WakeupOnSensorEntry extends WakeupCriterion {
public Bounds getBounds() {
return (Bounds) region.clone();
}
-
+
/**
* Update the cached Transfrom Region, call from BehaviorStructure
*/
@@ -85,7 +85,7 @@ public final class WakeupOnSensorEntry extends WakeupCriterion {
/**
- * This is a callback from BehaviorStructure. It is
+ * This is a callback from BehaviorStructure. It is
* used to add wakeupCondition to behavior structure.
*/
void addBehaviorCondition(BehaviorStructure bs) {
@@ -97,7 +97,7 @@ public final class WakeupOnSensorEntry extends WakeupCriterion {
/**
- * This is a callback from BehaviorStructure. It is
+ * This is a callback from BehaviorStructure. It is
* used to remove wakeupCondition from behavior structure.
*/
void removeBehaviorCondition(BehaviorStructure bs) {
@@ -119,7 +119,7 @@ public final class WakeupOnSensorEntry extends WakeupCriterion {
*
* @return the triggering Sensor object
*
- * @exception IllegalStateException if not called from within
+ * @exception IllegalStateException if not called from within
* a behavior's processStimulus method which was awoken by a sensor
* entry.
*
diff --git a/src/classes/share/javax/media/j3d/WakeupOnSensorExit.java b/src/classes/share/javax/media/j3d/WakeupOnSensorExit.java
index de71d0d..5f0ba6a 100644
--- a/src/classes/share/javax/media/j3d/WakeupOnSensorExit.java
+++ b/src/classes/share/javax/media/j3d/WakeupOnSensorExit.java
@@ -32,7 +32,7 @@
package javax.media.j3d;
/**
- * Class specifying a wakeup on first detection of sensors no
+ * Class specifying a wakeup on first detection of sensors no
* longer intersecting the specified boundary.
*/
public final class WakeupOnSensorExit extends WakeupCriterion {
@@ -59,7 +59,7 @@ public final class WakeupOnSensorExit extends WakeupCriterion {
this.region = (Bounds)region.clone();
WakeupIndexedList.init(this, TOTAL_INDEXED_UNORDER_SET_TYPES);
}
-
+
/**
* Returns this object's bounds specification
* @return the bounds used in constructing this WakeupCriterion.
@@ -83,7 +83,7 @@ public final class WakeupOnSensorExit extends WakeupCriterion {
}
/**
- * This is a callback from BehaviorStructure. It is
+ * This is a callback from BehaviorStructure. It is
* used to add wakeupCondition to behavior structure.
*/
void addBehaviorCondition(BehaviorStructure bs) {
@@ -95,7 +95,7 @@ public final class WakeupOnSensorExit extends WakeupCriterion {
/**
- * This is a callback from BehaviorStructure. It is
+ * This is a callback from BehaviorStructure. It is
* used to remove wakeupCondition from behavior structure.
*/
void removeBehaviorCondition(BehaviorStructure bs) {
@@ -118,7 +118,7 @@ public final class WakeupOnSensorExit extends WakeupCriterion {
*
* @return the triggering Sensor object
*
- * @exception IllegalStateException if not called from within
+ * @exception IllegalStateException if not called from within
* a behavior's processStimulus method which was awoken by a sensor
* exit.
*
diff --git a/src/classes/share/javax/media/j3d/WakeupOnTransformChange.java b/src/classes/share/javax/media/j3d/WakeupOnTransformChange.java
index 34e0cbb..fd53d17 100644
--- a/src/classes/share/javax/media/j3d/WakeupOnTransformChange.java
+++ b/src/classes/share/javax/media/j3d/WakeupOnTransformChange.java
@@ -58,7 +58,7 @@ public final class WakeupOnTransformChange extends WakeupCriterion {
if (transform.transformChange == null) {
transform.transformChange = new WakeupIndexedList(1,
WakeupOnTransformChange.class,
- WakeupOnTransformChange.COND_IN_BS_LIST,
+ WakeupOnTransformChange.COND_IN_BS_LIST,
transform.universe);
}
}
@@ -74,7 +74,7 @@ public final class WakeupOnTransformChange extends WakeupCriterion {
}
/**
- * This is a callback from BehaviorStructure. It is
+ * This is a callback from BehaviorStructure. It is
* used to add wakeupCondition to behavior structure.
*/
void addBehaviorCondition(BehaviorStructure bs) {
@@ -83,7 +83,7 @@ public final class WakeupOnTransformChange extends WakeupCriterion {
/**
- * This is a callback from BehaviorStructure. It is
+ * This is a callback from BehaviorStructure. It is
* used to remove wakeupCondition from behavior structure.
*/
void removeBehaviorCondition(BehaviorStructure bs) {
diff --git a/src/classes/share/javax/media/j3d/WakeupOnViewPlatformEntry.java b/src/classes/share/javax/media/j3d/WakeupOnViewPlatformEntry.java
index f981fd1..ae4ad6c 100644
--- a/src/classes/share/javax/media/j3d/WakeupOnViewPlatformEntry.java
+++ b/src/classes/share/javax/media/j3d/WakeupOnViewPlatformEntry.java
@@ -55,7 +55,7 @@ public final class WakeupOnViewPlatformEntry extends WakeupCriterion {
* ViewPlatform that triggered this wakeup condition.
*/
ViewPlatformRetained triggeredVP;
-
+
/**
* Constructs a new WakeupOnEntry criterion.
* @param region the region that will trigger a wakeup if a ViewPlatform
@@ -65,7 +65,7 @@ public final class WakeupOnViewPlatformEntry extends WakeupCriterion {
this.region = (Bounds)region.clone();
WakeupIndexedList.init(this, TOTAL_INDEXED_UNORDER_SET_TYPES);
}
-
+
/**
* Returns this object's bounds specification
* @return the bounds used in constructing this WakeupCriterion.
@@ -79,7 +79,7 @@ public final class WakeupOnViewPlatformEntry extends WakeupCriterion {
*
* @return the triggering ViewPlatform node
*
- * @exception IllegalStateException if not called from within
+ * @exception IllegalStateException if not called from within
* a behavior's processStimulus method that was awoken by a
* view platform entry.
*
@@ -115,7 +115,7 @@ public final class WakeupOnViewPlatformEntry extends WakeupCriterion {
}
/**
- * This is a callback from BehaviorStructure. It is
+ * This is a callback from BehaviorStructure. It is
* used to add wakeupCondition to behavior structure.
*/
void addBehaviorCondition(BehaviorStructure bs) {
@@ -127,7 +127,7 @@ public final class WakeupOnViewPlatformEntry extends WakeupCriterion {
/**
- * This is a callback from BehaviorStructure. It is
+ * This is a callback from BehaviorStructure. It is
* used to remove wakeupCondition from behavior structure.
*/
void removeBehaviorCondition(BehaviorStructure bs) {
diff --git a/src/classes/share/javax/media/j3d/WakeupOnViewPlatformExit.java b/src/classes/share/javax/media/j3d/WakeupOnViewPlatformExit.java
index 73836b2..ba2b753 100644
--- a/src/classes/share/javax/media/j3d/WakeupOnViewPlatformExit.java
+++ b/src/classes/share/javax/media/j3d/WakeupOnViewPlatformExit.java
@@ -81,7 +81,7 @@ public final class WakeupOnViewPlatformExit extends WakeupCriterion {
*
* @return the triggering ViewPlatform node
*
- * @exception IllegalStateException if not called from within
+ * @exception IllegalStateException if not called from within
* a behavior's processStimulus method that was awoken by a
* view platform exit.
*
@@ -116,9 +116,9 @@ public final class WakeupOnViewPlatformExit extends WakeupCriterion {
transformedRegion.transform(b.getCurrentLocalToVworld(null));
}
-
+
/**
- * This is a callback from BehaviorStructure. It is
+ * This is a callback from BehaviorStructure. It is
* used to add wakeupCondition to behavior structure.
*/
void addBehaviorCondition(BehaviorStructure bs) {
@@ -130,7 +130,7 @@ public final class WakeupOnViewPlatformExit extends WakeupCriterion {
/**
- * This is a callback from BehaviorStructure. It is
+ * This is a callback from BehaviorStructure. It is
* used to remove wakeupCondition from behavior structure.
*/
void removeBehaviorCondition(BehaviorStructure bs) {
diff --git a/src/classes/share/javax/media/j3d/WakeupOr.java b/src/classes/share/javax/media/j3d/WakeupOr.java
index 56fe129..823d252 100644
--- a/src/classes/share/javax/media/j3d/WakeupOr.java
+++ b/src/classes/share/javax/media/j3d/WakeupOr.java
@@ -35,8 +35,8 @@ import java.util.Vector;
/**
* Class specifying any number of wakeup conditions ORed together.
- * This WakeupCondition object specifies that Java 3D should awaken
- * this Behavior when any of the WakeupCondition's constituent wakeup
+ * This WakeupCondition object specifies that Java 3D should awaken
+ * this Behavior when any of the WakeupCondition's constituent wakeup
* criteria becomes valid.
*
* Note that a unique WakeupCriterion object must be used
@@ -58,7 +58,7 @@ public final class WakeupOr extends WakeupCondition {
this.conditions[i] = conditions[i];
}
}
-
+
/**
* This sets the bit for the given child, then checks if the full condition is met
*/
@@ -69,21 +69,21 @@ public final class WakeupOr extends WakeupCondition {
parent.setConditionMet(this.id, checkSchedulingRegion);
}
}
-
+
/**
* This gets called when this condition is added to the AndOr tree.
*/
void buildTree(WakeupCondition parent, int id, BehaviorRetained b) {
super.buildTree(parent, id, b);
-
+
for(int i = 0; i < conditions.length; i++) {
if (conditions[i] != null) {
conditions[i].buildTree(this, i, b);
}
}
}
-
+
/**
* This goes through the AndOr tree to remove the various criterion from the
* BehaviorStructure lists
@@ -104,7 +104,7 @@ public final class WakeupOr extends WakeupCondition {
}
/**
- * This goes through the AndOr tree to remove the various criterion from the
+ * This goes through the AndOr tree to remove the various criterion from the
* BehaviorStructure.
*/
void resetTree() {
@@ -115,5 +115,5 @@ public final class WakeupOr extends WakeupCondition {
}
}
}
-
+
}
diff --git a/src/classes/share/javax/media/j3d/WakeupOrOfAnds.java b/src/classes/share/javax/media/j3d/WakeupOrOfAnds.java
index 59c254f..5caa89a 100644
--- a/src/classes/share/javax/media/j3d/WakeupOrOfAnds.java
+++ b/src/classes/share/javax/media/j3d/WakeupOrOfAnds.java
@@ -35,7 +35,7 @@ import java.util.Vector;
/**
* Class specifying any number of AND wakeup conditions ORed together.
- * This WakeupCondition object specifies that Java 3D should awaken
+ * This WakeupCondition object specifies that Java 3D should awaken
* this Behavior when any of the WakeupCondition's constituent WakeupAnd
* conditions becomes valid.
*
@@ -59,7 +59,7 @@ public final class WakeupOrOfAnds extends WakeupCondition {
}
}
-
+
/**
* This sets the bit for the given child, then checks if the full condition is met
*/
@@ -70,20 +70,20 @@ public final class WakeupOrOfAnds extends WakeupCondition {
parent.setConditionMet(this.id, checkSchedulingRegion);
}
}
-
+
/**
* This gets called when this condition is added to the AndOr tree.
*/
void buildTree(WakeupCondition parent, int id, BehaviorRetained b) {
super.buildTree(parent, id, b);
-
+
for(int i = 0; i < conditions.length; i++) {
if (conditions[i] != null) {
conditions[i].buildTree(this, i, b);
}
}
}
-
+
/**
* This goes through the AndOr tree to remove the various criterion from the
* BehaviorStructure lists
@@ -102,9 +102,9 @@ public final class WakeupOrOfAnds extends WakeupCondition {
}
}
}
-
+
/**
- * This goes through the AndOr tree to remove the various criterion from the
+ * This goes through the AndOr tree to remove the various criterion from the
* BehaviorStructure.
*/
void resetTree() {
@@ -115,5 +115,5 @@ public final class WakeupOrOfAnds extends WakeupCondition {
}
}
}
-
+
}
diff --git a/src/classes/x11/javax/media/j3d/X11NativeConfigTemplate3D.java b/src/classes/x11/javax/media/j3d/X11NativeConfigTemplate3D.java
index fe97730..5f7a3b3 100644
--- a/src/classes/x11/javax/media/j3d/X11NativeConfigTemplate3D.java
+++ b/src/classes/x11/javax/media/j3d/X11NativeConfigTemplate3D.java
@@ -87,7 +87,7 @@ class X11NativeConfigTemplate3D extends NativeConfigTemplate3D {
System.out.println(" display " + display + " screen " + screen);
System.out.println(" configuration count: " + gc.length);
for (int i = 0 ; i < gc.length ; i++) {
- System.out.println(" visual id at index " + i + ": " +
+ System.out.println(" visual id at index " + i + ": " +
((X11GraphicsConfig)gc[i]).getVisual());
}
}
@@ -120,7 +120,7 @@ class X11NativeConfigTemplate3D extends NativeConfigTemplate3D {
attrList[STEREO] = template.getStereo();
attrList[ANTIALIASING] = template.getSceneAntialiasing();
attrList[STENCIL_SIZE] = template.getStencilSize();
- // System.out.println("X11NativeConfigTemplate3D : getStencilSize " +
+ // System.out.println("X11NativeConfigTemplate3D : getStencilSize " +
// attrList[STENCIL_SIZE]);
long[] fbConfig = new long[1];
@@ -165,7 +165,7 @@ class X11NativeConfigTemplate3D extends NativeConfigTemplate3D {
} else {
freeFBConfig(fbConfig[0]);
}
- }
+ }
return gc1;
}
@@ -202,16 +202,16 @@ class X11NativeConfigTemplate3D extends NativeConfigTemplate3D {
attrList[STEREO] = template.getStereo();
attrList[ANTIALIASING] = template.getSceneAntialiasing();
attrList[STENCIL_SIZE] = template.getStencilSize();
- // System.out.println("X11NativeConfigTemplate3D : getStencilSize " +
+ // System.out.println("X11NativeConfigTemplate3D : getStencilSize " +
// attrList[STENCIL_SIZE]);
-
+
long[] fbConfig = new long[1];
int visID = chooseOglVisual(display, screen, attrList, fbConfig);
-
+
if (visID == 0 || fbConfig[0] == 0)
return false; // no valid visual was found
else
- return true;
+ return true;
}
@@ -290,7 +290,7 @@ class X11NativeConfigTemplate3D extends NativeConfigTemplate3D {
return isSceneAntialiasingMultisampleAvailable(display, screen, vid);
}
-
+
// Ensure that the native libraries are loaded
static {
VirtualUniverse.loadLibraries();
diff --git a/src/classes/x11/javax/media/j3d/X11NativeScreenInfo.java b/src/classes/x11/javax/media/j3d/X11NativeScreenInfo.java
index 7e95e81..ce076e2 100644
--- a/src/classes/x11/javax/media/j3d/X11NativeScreenInfo.java
+++ b/src/classes/x11/javax/media/j3d/X11NativeScreenInfo.java
@@ -50,7 +50,7 @@ class X11NativeScreenInfo extends NativeScreenInfo {
}
// Fix for issue 20.
- // This method will return true if glx version is 1.3 or higher,
+ // This method will return true if glx version is 1.3 or higher,
// else return false.
static synchronized boolean isGLX13() {
if (!glxChecked) {
--
cgit v1.2.3
POSITIVE_X
, NEGATIVE_X
,
+ * @param face face of the cube map. One of:
+ * POSITIVE_X
, NEGATIVE_X
,
* POSITIVE_Y
, NEGATIVE_Y
,
* POSITIVE_Z
or NEGATIVE_Z
.
* @param image ImageComponent2D object containing the image
*
- * @exception IllegalArgumentException if
+ * @exception IllegalArgumentException if
* face
has a value other
- * than POSITIVE_X
, NEGATIVE_X
,
+ * than POSITIVE_X
, NEGATIVE_X
,
* POSITIVE_Y
, NEGATIVE_Y
,
* POSITIVE_Z
or NEGATIVE_Z
.
*
@@ -208,9 +208,9 @@ public class TextureCubeMap extends Texture {
throw new CapabilityNotSetException(
J3dI18N.getString("TextureCubeMap1"));
}
-
+
validateImageIllegalSharing(image);
-
+
if (isLive())
((TextureCubeMapRetained)this.retained).setImage(level, face, image);
else
@@ -221,15 +221,15 @@ public class TextureCubeMap extends Texture {
* Sets the array of images for mipmap levels from base level through
* max level for a specified face of the cube map
*
- * @param face face of the cube map. One of:
- * POSITIVE_X
, NEGATIVE_X
,
+ * @param face face of the cube map. One of:
+ * POSITIVE_X
, NEGATIVE_X
,
* POSITIVE_Y
, NEGATIVE_Y
,
* POSITIVE_Z
or NEGATIVE_Z
.
* @param images array of ImageComponent2D objects containing the images
*
- * @exception IllegalArgumentException if
+ * @exception IllegalArgumentException if
* face
has a value other
- * than POSITIVE_X
, NEGATIVE_X
,
+ * than POSITIVE_X
, NEGATIVE_X
,
* POSITIVE_Y
, NEGATIVE_Y
,
* POSITIVE_Z
or NEGATIVE_Z
.
*
@@ -252,11 +252,11 @@ public class TextureCubeMap extends Texture {
J3dI18N.getString("TextureCubeMap1"));
}
- // Do illegal sharing check
+ // Do illegal sharing check
for(int i=0; iNEGATIVE_X
,
+ * @param face face of the cube map. One of:
+ * POSITIVE_X
, NEGATIVE_X
,
* POSITIVE_Y
, NEGATIVE_Y
,
* POSITIVE_Z
or NEGATIVE_Z
.
* @return the ImageComponent object containing the texture image at
* the specified mipmap level.
*
- * @exception IllegalArgumentException if
+ * @exception IllegalArgumentException if
* face
has a value other
- * than POSITIVE_X
, NEGATIVE_X
,
+ * than POSITIVE_X
, NEGATIVE_X
,
* POSITIVE_Y
, NEGATIVE_Y
,
* POSITIVE_Z
or NEGATIVE_Z
.
*
@@ -305,9 +305,9 @@ public class TextureCubeMap extends Texture {
* @return an array of ImageComponent object for the particular face of
* of the cube map.
*
- * @exception IllegalArgumentException if
+ * @exception IllegalArgumentException if
* face
has a value other
- * than POSITIVE_X
, NEGATIVE_X
,
+ * than POSITIVE_X
, NEGATIVE_X
,
* POSITIVE_Y
, NEGATIVE_Y
,
* POSITIVE_Z
or NEGATIVE_Z
.
*
diff --git a/src/classes/share/javax/media/j3d/TextureCubeMapRetained.java b/src/classes/share/javax/media/j3d/TextureCubeMapRetained.java
index d9fda1f..7d8bb26 100644
--- a/src/classes/share/javax/media/j3d/TextureCubeMapRetained.java
+++ b/src/classes/share/javax/media/j3d/TextureCubeMapRetained.java
@@ -45,8 +45,8 @@ class TextureCubeMapRetained extends TextureRetained {
static final int NUMFACES = 6;
- void initialize(int format, int width, int widPower,
- int height, int heiPower, int mipmapMode,
+ void initialize(int format, int width, int widPower,
+ int height, int heiPower, int mipmapMode,
int boundaryWidth) {
this.numFaces = 6;
@@ -67,7 +67,7 @@ class TextureCubeMapRetained extends TextureRetained {
if (this.images == null) {
throw new IllegalArgumentException(
J3dI18N.getString("TextureRetained0"));
- }
+ }
if (image instanceof ImageComponent3D) {
throw new IllegalArgumentException(
@@ -86,7 +86,7 @@ class TextureCubeMapRetained extends TextureRetained {
this.images[face][level].clearLive(refCount);
}
-
+
if (image != null) {
((ImageComponentRetained)image.retained).setLive(
inBackgroundGroup, refCount);
@@ -96,7 +96,7 @@ class TextureCubeMapRetained extends TextureRetained {
/* Don't think this is needed. --- Chien.
((ImageComponent2DRetained)image.retained).setTextureRef();
*/
-
+
if (image != null) {
this.images[face][level] = (ImageComponentRetained)image.retained;
} else {
@@ -130,7 +130,7 @@ class TextureCubeMapRetained extends TextureRetained {
enable = false;
}
}
- if (!enable)
+ if (!enable)
sendMessage(ENABLE_CHANGED, Boolean.FALSE);
}
}
@@ -189,7 +189,7 @@ class TextureCubeMapRetained extends TextureRetained {
}
}
-
+
/**
@@ -206,7 +206,7 @@ class TextureCubeMapRetained extends TextureRetained {
J3dI18N.getString("TextureCubeMap4"));
}
- return (((images != null) && (images[face][level] != null)) ?
+ return (((images != null) && (images[face][level] != null)) ?
(ImageComponent)images[face][level].source : null);
}
@@ -307,12 +307,12 @@ class TextureCubeMapRetained extends TextureRetained {
// All faces should have the same image format and type.
int imageFormat = images[0][0].getImageFormatTypeIntValue(false);
int imageType = images[0][0].getImageDataTypeIntValue();
-
+
for (int i = 0; i < 6; i++) {
updateTextureImage(cv, i, maxLevels, 0,
format, imageFormat,
width, height, boundaryWidth,
- imageType, null);
+ imageType, null);
}
}
}
@@ -324,7 +324,7 @@ class TextureCubeMapRetained extends TextureRetained {
int width, int height,
int boundaryWidth, int imageDataType,
Object imageData) {
-
+
Pipeline.getPipeline().updateTextureCubeMapImage(cv.ctx,
face, numLevels, level,
textureFormat, imageFormat,
@@ -340,7 +340,7 @@ class TextureCubeMapRetained extends TextureRetained {
int imgXOffset, int imgYOffset,
int tilew, int width, int height,
int imageDataType, Object imageData) {
-
+
Pipeline.getPipeline().updateTextureCubeMapSubImage(cv.ctx,
face, level, xoffset, yoffset,
textureFormat, imageFormat,
diff --git a/src/classes/share/javax/media/j3d/TextureRetained.java b/src/classes/share/javax/media/j3d/TextureRetained.java
index 6460e8b..ed8e0dc 100644
--- a/src/classes/share/javax/media/j3d/TextureRetained.java
+++ b/src/classes/share/javax/media/j3d/TextureRetained.java
@@ -39,7 +39,7 @@ import java.awt.image.RenderedImage;
/**
* The Texture object is a component object of an Appearance object
* that defines the texture properties used when texture mapping is
- * enabled. Texture object is an abstract class and all texture
+ * enabled. Texture object is an abstract class and all texture
* objects must be created as either a Texture2D object or a
* Texture3D object.
*/
@@ -73,7 +73,7 @@ abstract class TextureRetained extends NodeComponentRetained {
int minFilter = Texture.BASE_LEVEL_POINT;
int magFilter = Texture.BASE_LEVEL_POINT;
- // Integer flag that contains bitset to indicate
+ // Integer flag that contains bitset to indicate
// which field changed.
int isDirty = 0xffff;
@@ -83,20 +83,20 @@ abstract class TextureRetained extends NodeComponentRetained {
// Texture Object Id used by native code.
int objectId = -1;
- int mipmapMode = Texture.BASE_LEVEL; // Type of mip-mapping
+ int mipmapMode = Texture.BASE_LEVEL; // Type of mip-mapping
int format = Texture.RGB; // Texture format
int width = 1; // Width in pixels (2**n)
int height = 1; // Height in pixels (2**m)
- // true if width or height is non power of two
- private boolean widthOrHeightIsNPOT = false;
- // Array of images (one for each mipmap level)
+ // true if width or height is non power of two
+ private boolean widthOrHeightIsNPOT = false;
+ // Array of images (one for each mipmap level)
ImageComponentRetained images[][];
// maximum number of levels needed for the mipmapMode of this texture
- int maxLevels = 0;
+ int maxLevels = 0;
// maximum number of mipmap levels that can be defined for this texture
private int maxMipMapLevels = 0;
-
+
int numFaces = 1; // For CubeMap, it is 6
int baseLevel = 0;
int maximumLevel = 0;
@@ -122,8 +122,8 @@ abstract class TextureRetained extends NodeComponentRetained {
int numSharpenTextureFuncPts = 0;
float sharpenTextureFuncPts[] = null; // array of pairs of floats
// first value for LOD
- // second value for the fcn value
-
+ // second value for the fcn value
+
// filter4 info
float filter4FuncPts[] = null;
@@ -146,24 +146,24 @@ abstract class TextureRetained extends NodeComponentRetained {
// 0 at a particular bit means texture images are not up-to-date.
// 1 means otherwise. If it specifies 0, then it needs to go
// through the imageUpdateInfo to update the images accordingly.
- //
- int resourceUpdatedMask = 0x0;
+ //
+ int resourceUpdatedMask = 0x0;
// Each bit corresponds to a unique renderer if shared context
// or a unique canvas otherwise
// This mask specifies if texture lod info is up-to-date.
// 0 at a particular bit means texture lod info is not up-to-date.
- // 1 means otherwise.
- //
- int resourceLodUpdatedMask = 0x0;
+ // 1 means otherwise.
+ //
+ int resourceLodUpdatedMask = 0x0;
// Each bit corresponds to a unique renderer if shared context
// or a unique canvas otherwise
// This mask specifies if texture is in the resource reload list
// 0 at a particular bit means texture is not in reload list
- // 1 means otherwise.
- //
- int resourceInReloadList = 0x0;
+ // 1 means otherwise.
+ //
+ int resourceInReloadList = 0x0;
// image update info
ArrayList imageUpdateInfo[][];
@@ -181,18 +181,18 @@ abstract class TextureRetained extends NodeComponentRetained {
// This is used for D3D only to check whether texture need to
// resend down
private int texTimestamp = 0;
-
- // need to synchronize access from multiple rendering threads
+
+ // need to synchronize access from multiple rendering threads
Object resourceLock = new Object();
private static boolean isPowerOfTwo(int val) {
return ((val & (val - 1)) == 0);
}
-
- void initialize(int format, int width, int widLevels,
+
+ void initialize(int format, int width, int widLevels,
int height, int heiLevels, int mipmapMode,
int boundaryWidth) {
-
+
this.mipmapMode = mipmapMode;
this.format = format;
this.width = width;
@@ -202,7 +202,7 @@ abstract class TextureRetained extends NodeComponentRetained {
if(!isPowerOfTwo(width) || !isPowerOfTwo(height)) {
this.widthOrHeightIsNPOT = true;
}
-
+
// determine the maximum number of mipmap levels that can be
// defined from the specified dimension
@@ -225,7 +225,7 @@ abstract class TextureRetained extends NodeComponentRetained {
maximumLevel = 0;
maxLevels = 1;
}
-
+
images = new ImageComponentRetained[numFaces][maxLevels];
for (int j = 0; j < numFaces; j++) {
@@ -306,7 +306,7 @@ abstract class TextureRetained extends NodeComponentRetained {
* function is used when the pixel being rendered maps to an area
* greater than one texel.
* @param minFilter the minification filter, one of:
- * FASTEST, NICEST, BASE_LEVEL_POINT, BASE_LEVEL_LINEAR,
+ * FASTEST, NICEST, BASE_LEVEL_POINT, BASE_LEVEL_LINEAR,
* MULTI_LEVEL_POINT, MULTI_LEVEL_LINEAR.
* @exception RestrictedAccessException if the method is called
* when this object is part of live or compiled scene graph.
@@ -365,7 +365,7 @@ abstract class TextureRetained extends NodeComponentRetained {
if (this.images == null) {
throw new IllegalArgumentException(J3dI18N.getString("TextureRetained0"));
- }
+ }
if (this.source instanceof Texture2D) {
if (image instanceof ImageComponent3D)
@@ -385,7 +385,7 @@ abstract class TextureRetained extends NodeComponentRetained {
this.images[0][level].clearLive(refCount);
}
-
+
if (image != null) {
((ImageComponentRetained)image.retained).setLive(inBackgroundGroup, refCount);
}
@@ -413,7 +413,7 @@ abstract class TextureRetained extends NodeComponentRetained {
if (wdh < 1) wdh = 1;
if (hgt < 1) hgt = 1;
-
+
if ((wdh != (imgWidth - 2*boundaryWidth)) ||
(hgt != (imgHeight - 2*boundaryWidth))) {
throw new IllegalArgumentException(
@@ -434,7 +434,7 @@ abstract class TextureRetained extends NodeComponentRetained {
for (int level = 0; level < images.length; level++) {
int imgWidth = images[level].width;
int imgHeight = images[level].height;
-
+
assert (wdh == (imgWidth - 2*boundaryWidth)) &&
(hgt == (imgHeight - 2*boundaryWidth));
@@ -472,7 +472,7 @@ abstract class TextureRetained extends NodeComponentRetained {
enable = false;
}
}
- if (!enable)
+ if (!enable)
sendMessage(ENABLE_CHANGED, Boolean.FALSE);
}
}
@@ -512,7 +512,7 @@ abstract class TextureRetained extends NodeComponentRetained {
enable = userSpecifiedEnable;
for (i = baseLevel; i <= maximumLevel && enable; i++) {
if (images[i] != null) {
- ImageComponentRetained img=
+ ImageComponentRetained img=
(ImageComponentRetained)images[i].retained;
if (img.isByReference()) {
if (img.getRefImage(0) == null) {
@@ -532,7 +532,7 @@ abstract class TextureRetained extends NodeComponentRetained {
}
}
-
+
/**
@@ -543,7 +543,7 @@ abstract class TextureRetained extends NodeComponentRetained {
* when this object is part of live or compiled scene graph.
*/
final ImageComponent getImage(int level) {
- return (((images != null) && (images[0][level] != null)) ?
+ return (((images != null) && (images[0][level] != null)) ?
(ImageComponent)images[0][level].source : null);
}
@@ -562,14 +562,14 @@ abstract class TextureRetained extends NodeComponentRetained {
}
/**
- * Sets mipmap mode for texture mapping for this texture object.
+ * Sets mipmap mode for texture mapping for this texture object.
* @param mipMapMode the new mipmap mode for this object. One of:
* BASE_LEVEL or MULTI_LEVEL_MIPMAP.
* @exception RestrictedAccessException if the method is called
*/
final void initMipMapMode(int mipmapMode) {
- if (this.mipmapMode == mipmapMode)
+ if (this.mipmapMode == mipmapMode)
return;
@@ -584,9 +584,9 @@ abstract class TextureRetained extends NodeComponentRetained {
maximumLevel = 0;
maxLevels = 1;
}
-
- ImageComponentRetained[][] newImages =
+
+ ImageComponentRetained[][] newImages =
new ImageComponentRetained[numFaces][maxLevels];
if (prevMaxLevels < maxLevels) {
@@ -594,7 +594,7 @@ abstract class TextureRetained extends NodeComponentRetained {
for (int i = 0; i < prevMaxLevels; i++) {
newImages[f][i] = images[f][i];
}
-
+
for (int j = prevMaxLevels; j < maxLevels; j++) {
newImages[f][j] = null;
}
@@ -628,7 +628,7 @@ abstract class TextureRetained extends NodeComponentRetained {
/**
* Enables or disables texture mapping for this
- * appearance component object and sends a
+ * appearance component object and sends a
* message notifying the interested structures of the change.
* @param state true or false to enable or disable texture mapping
*/
@@ -642,7 +642,7 @@ abstract class TextureRetained extends NodeComponentRetained {
// because one of the images is null and user specifies false
return;
}
-
+
enable = state;
for (int j = 0; j < numFaces && enable; j++) {
@@ -700,10 +700,10 @@ abstract class TextureRetained extends NodeComponentRetained {
J3dI18N.getString("Texture37"));
}
if((mipmapMode == Texture.BASE_LEVEL) && (level != 0)) {
- throw new IllegalArgumentException(
+ throw new IllegalArgumentException(
J3dI18N.getString("Texture48"));
}
-
+
maximumLevel = level;
}
@@ -810,7 +810,7 @@ abstract class TextureRetained extends NodeComponentRetained {
boundaryColor.set(this.boundaryColor);
}
-
+
/**
* Set Anisotropic Filter
*/
@@ -1025,7 +1025,7 @@ abstract class TextureRetained extends NodeComponentRetained {
if (!enable)
sendMessage(ENABLE_CHANGED, Boolean.FALSE);
}
-
+
super.markAsLive();
}
@@ -1107,7 +1107,7 @@ abstract class TextureRetained extends NodeComponentRetained {
}
- // get an ID for Texture 2D
+ // get an ID for Texture 2D
int getTextureId() {
return (VirtualUniverse.mc.getTexture2DId());
}
@@ -1130,17 +1130,17 @@ abstract class TextureRetained extends NodeComponentRetained {
}
return enable;
}
-
-
+
+
// bind a named texture to a texturing target
void bindTexture(Canvas3D cv) {
-
+
synchronized(resourceLock) {
if (objectId == -1) {
objectId = getTextureId();
}
cv.addTextureResource(objectId, this);
- }
+ }
bindTexture(cv.ctx, objectId, isEnabled(cv));
}
@@ -1157,12 +1157,12 @@ abstract class TextureRetained extends NodeComponentRetained {
images[0][0].getImageDataTypeIntValue(), null);
}
}
-
+
void updateTextureLOD(Canvas3D cv) {
if ((cv.textureExtendedFeatures & Canvas3D.TEXTURE_LOD_RANGE) != 0 ) {
-
+
int max = 0;
if( mipmapMode == Texture.BASE_LEVEL ) {
max = maxMipMapLevels;
@@ -1170,7 +1170,7 @@ abstract class TextureRetained extends NodeComponentRetained {
else {
max = maximumLevel;
}
-
+
updateTextureLodRange(cv.ctx, baseLevel, max,
minimumLod, maximumLod);
}
@@ -1194,7 +1194,7 @@ abstract class TextureRetained extends NodeComponentRetained {
int magnificationFilter = magFilter;
int minificationFilter = minFilter;
-
+
// update sharpen texture function if applicable
if ((magnificationFilter >= Texture.LINEAR_SHARPEN) &&
@@ -1204,7 +1204,7 @@ abstract class TextureRetained extends NodeComponentRetained {
// send down sharpen texture LOD function
//
- updateTextureSharpenFunc(cv.ctx,
+ updateTextureSharpenFunc(cv.ctx,
numSharpenTextureFuncPts, sharpenTextureFuncPts);
} else {
@@ -1223,7 +1223,7 @@ abstract class TextureRetained extends NodeComponentRetained {
magnificationFilter = Texture.BASE_LEVEL_LINEAR;
}
- }
+ }
if (minificationFilter == Texture.FILTER4 || magnificationFilter == Texture.FILTER4) {
@@ -1233,7 +1233,7 @@ abstract class TextureRetained extends NodeComponentRetained {
if (filter4FuncPts == null) {
- // filter4 function is not defined,
+ // filter4 function is not defined,
// fallback to BASE_LEVEL_LINEAR
noFilter4 = true;
@@ -1247,7 +1247,7 @@ abstract class TextureRetained extends NodeComponentRetained {
// library, fallback to BASE_LEVEL_LINEAR
noFilter4 = true;
- }
+ }
if (noFilter4) {
if (minificationFilter == Texture.FILTER4) {
@@ -1262,7 +1262,7 @@ abstract class TextureRetained extends NodeComponentRetained {
// Fallback to BASE mode if hardware mipmap generation is not supported.
if ((mipmapMode == Texture.BASE_LEVEL) && ((cv.textureExtendedFeatures &
Canvas3D.TEXTURE_AUTO_MIPMAP_GENERATION) == 0)) {
-
+
if (minificationFilter == Texture.NICEST ||
minificationFilter == Texture.MULTI_LEVEL_LINEAR) {
minificationFilter = Texture.BASE_LEVEL_LINEAR;
@@ -1270,12 +1270,12 @@ abstract class TextureRetained extends NodeComponentRetained {
minificationFilter = Texture.BASE_LEVEL_POINT;
}
}
-
+
// update texture filtering modes
- updateTextureFilterModes(cv.ctx, minificationFilter,
+ updateTextureFilterModes(cv.ctx, minificationFilter,
magnificationFilter);
- if ((cv.textureExtendedFeatures & Canvas3D.TEXTURE_ANISOTROPIC_FILTER)
+ if ((cv.textureExtendedFeatures & Canvas3D.TEXTURE_ANISOTROPIC_FILTER)
!= 0) {
if (anisotropicFilterMode == Texture.ANISOTROPIC_NONE) {
updateTextureAnisotropicFilter(cv.ctx, 1.0f);
@@ -1287,7 +1287,7 @@ abstract class TextureRetained extends NodeComponentRetained {
// update texture boundary modes, boundary color
updateTextureBoundary(cv);
-
+
}
@@ -1299,7 +1299,7 @@ abstract class TextureRetained extends NodeComponentRetained {
int width, int height,
int boundaryWidth,
int imageDataType, Object data) {
-
+
Pipeline.getPipeline().updateTexture2DImage(cv.ctx,
numLevels, level,
textureFormat, imageFormat,
@@ -1316,7 +1316,7 @@ abstract class TextureRetained extends NodeComponentRetained {
int imgXOffset, int imgYOffset,
int tilew, int width, int height,
int imageDataType, Object data) {
-
+
Pipeline.getPipeline().updateTexture2DSubImage(cv.ctx,
level, xoffset, yoffset,
textureFormat, imageFormat,
@@ -1324,7 +1324,7 @@ abstract class TextureRetained extends NodeComponentRetained {
tilew, width, height,
imageDataType, data, useAutoMipMapGeneration(cv));
}
-
+
/**
* reloadTextureImage is used to load a particular level of image
@@ -1333,24 +1333,24 @@ abstract class TextureRetained extends NodeComponentRetained {
*/
void reloadTextureImage(Canvas3D cv, int face, int level,
ImageComponentRetained image, int numLevels) {
-
+
boolean useAsRaster = isUseAsRaster();
ImageComponentRetained.ImageData imageData = image.getImageData(useAsRaster);
assert imageData != null;
-
+
updateTextureImage(cv,
face, numLevels, level,
format, image.getImageFormatTypeIntValue(useAsRaster),
imageData.getWidth(), imageData.getHeight(),
boundaryWidth, image.getImageDataTypeIntValue(),
imageData.get());
-
-
+
+
// TODO : Dead code - need to clean up for 1.6
// Now take care of the RenderedImage (byRef and yUp) case. Note, if image
// is a RenderedImage ( byRef and yUp), then imageData will be null
-
+
if (imageData == null) {
// System.err.println("==========. subImage");
// Download all the tiles for this texture
@@ -1365,7 +1365,7 @@ abstract class TextureRetained extends NodeComponentRetained {
if (tmpw < curw) {
curw = tmpw;
}
-
+
if (tmph < curh) {
curh = tmph;
}
@@ -1393,7 +1393,7 @@ abstract class TextureRetained extends NodeComponentRetained {
xoffset += curw;
imageXOffset = 0;
tmpw -= curw;
- if (tmpw < image.tilew)
+ if (tmpw < image.tilew)
curw = tmpw;
else
curw = image.tilew;
@@ -1415,7 +1415,7 @@ abstract class TextureRetained extends NodeComponentRetained {
* This method needs to take care of RenderedImage as well as
* BufferedImage
*/
- void reloadTextureSubImage(Canvas3D cv, int face, int level,
+ void reloadTextureSubImage(Canvas3D cv, int face, int level,
ImageComponentUpdateInfo info,
ImageComponentRetained image) {
@@ -1423,7 +1423,7 @@ abstract class TextureRetained extends NodeComponentRetained {
y = info.y,
width = info.width,
height = info.height;
-
+
//The x and y here specifies the subregion of the imageData of
//the associated RenderedImage.
@@ -1435,12 +1435,12 @@ abstract class TextureRetained extends NodeComponentRetained {
if(imageData != null) {
int xoffset = x;
int yoffset = y;
-
+
// TODO Check this logic : If !yUp adjust yoffset
if (!image.yUp) {
yoffset = image.height - yoffset - height;
}
-
+
updateTextureSubImage(cv, face, level,
xoffset, yoffset,
format, image.getImageFormatTypeIntValue(false),
@@ -1448,11 +1448,11 @@ abstract class TextureRetained extends NodeComponentRetained {
image.width, width, height,
image.getImageDataTypeIntValue(),
imageData.get());
-
+
} else {
assert false;
-
+
// TODO : Dead code - need to clean up for 1.6
// System.err.println("RenderedImage subImage update");
// determine the first tile of the image
@@ -1462,7 +1462,7 @@ abstract class TextureRetained extends NodeComponentRetained {
int rx = x;
int ry = y;
-
+
mt = (float)(rx) / (float)image.tilew;
if (mt < 0) {
minTileX = (int)(mt - 1);
@@ -1533,16 +1533,16 @@ abstract class TextureRetained extends NodeComponentRetained {
java.awt.image.Raster ras;
- int textureX = x; // x offset in the texture
- int textureY = y; // y offset in the texture
+ int textureX = x; // x offset in the texture
+ int textureY = y; // y offset in the texture
for (int yTile = minTileY; yTile < minTileY + numYTiles;
yTile++) {
-
+
tmpw = width;
curw = startw;
imgX = rx - startXTile;
-
+
for (int xTile = minTileX; xTile < minTileX + numXTiles;
xTile++) {
ras = ((RenderedImage)image.getRefImage(0)).getTile(xTile, yTile);
@@ -1552,7 +1552,7 @@ abstract class TextureRetained extends NodeComponentRetained {
textureX, textureY,
format, image.getImageFormatTypeIntValue(false),
imgX, imgY,
- image.tilew, curw, curh,
+ image.tilew, curw, curh,
ImageComponentRetained.IMAGE_DATA_TYPE_BYTE_ARRAY,
(Object)data);
@@ -1568,7 +1568,7 @@ abstract class TextureRetained extends NodeComponentRetained {
curw = tmpw;
} else {
curw = image.tilew;
- }
+ }
}
// move to the next set of tiles in y direction
@@ -1608,8 +1608,8 @@ abstract class TextureRetained extends NodeComponentRetained {
if (blevel != 0) {
// level 0 is not the base level, hence, need
- // to load level 0 explicitly with a null pointer in order
- // for mipmapping to be active.
+ // to load level 0 explicitly with a null pointer in order
+ // for mipmapping to be active.
updateTextureDimensions(cv);
}
@@ -1641,7 +1641,7 @@ abstract class TextureRetained extends NodeComponentRetained {
ImageComponentUpdateInfo info;
- for (int k = 0; k < numFaces; k++) {
+ for (int k = 0; k < numFaces; k++) {
for (int i = baseLevel; i <= maximumLevel; i++) {
if (imageUpdateInfo[k][i] != null) {
for (int j = 0; j < imageUpdateInfo[k][i].size(); j++) {
@@ -1664,15 +1664,15 @@ abstract class TextureRetained extends NodeComponentRetained {
// all the current resources have updated this
// info, so this info can be removed from the
// update list
- if ((info.updateMask & resourceCreationMask)
+ if ((info.updateMask & resourceCreationMask)
== 0) {
info.updateMask = 0; // mark this update as
// done
// mark the prune flag so as to prune the
- // update list next time when the update
+ // update list next time when the update
// list is to be modified.
- // Don't want to clean up the list at
+ // Don't want to clean up the list at
// rendering time because (1) MT issue,
// other renderer could be processing
// the update list now;
@@ -1685,7 +1685,7 @@ abstract class TextureRetained extends NodeComponentRetained {
}
if (info.entireImage == true) {
- reloadTextureImage(cv, k, i,
+ reloadTextureImage(cv, k, i,
images[k][i], maxLevels);
} else {
reloadTextureSubImage(cv, k, i, info, images[k][i]);
@@ -1715,7 +1715,7 @@ abstract class TextureRetained extends NodeComponentRetained {
}
bindTexture(cv);
-
+
// reload all levels of texture image
// update texture parameters such as boundary modes, filtering
@@ -1740,9 +1740,9 @@ abstract class TextureRetained extends NodeComponentRetained {
}
}
-
+
/**
- * updateNative is called while traversing the RenderBin to
+ * updateNative is called while traversing the RenderBin to
* update the texture state
*/
void updateNative(Canvas3D cv) {
@@ -1753,7 +1753,7 @@ abstract class TextureRetained extends NodeComponentRetained {
//System.err.println("Texture/updateNative: " + this + "object= " + objectId + " enable= " + enable);
bindTexture(cv);
-
+
// if texture is not enabled, don't bother downloading the
// the texture state
@@ -1766,8 +1766,8 @@ abstract class TextureRetained extends NodeComponentRetained {
if ((resourceCreationMask & cv.screen.renderer.rendererBit) == 0) {
reloadTexture = true;
} else {
- if (((resourceUpdatedMask &
- cv.screen.renderer.rendererBit) == 0) &&
+ if (((resourceUpdatedMask &
+ cv.screen.renderer.rendererBit) == 0) &&
(imageUpdateInfo != null)) {
updateTexture = true;
}
@@ -1785,7 +1785,7 @@ abstract class TextureRetained extends NodeComponentRetained {
if ((resourceCreationMask & cv.canvasBit) == 0) {
reloadTexture = true;
} else {
- if (((resourceUpdatedMask & cv.canvasBit) == 0) &&
+ if (((resourceUpdatedMask & cv.canvasBit) == 0) &&
(imageUpdateInfo != null)) {
updateTexture = true;
}
@@ -1795,7 +1795,7 @@ abstract class TextureRetained extends NodeComponentRetained {
}
}
}
-
+
if (VirtualUniverse.mc.isD3D()) {
if (texTimestamp != VirtualUniverse.mc.resendTexTimestamp) {
@@ -1811,12 +1811,12 @@ abstract class TextureRetained extends NodeComponentRetained {
//System.err.println("......... reloadTexture= " + reloadTexture +
-// " updateTexture= " + updateTexture +
+// " updateTexture= " + updateTexture +
// " updateTextureLod= " + updateTextureLod);
//System.err.println("......... resourceCreationMask= " + resourceCreationMask +
// " resourceUpdatedMask= " + resourceUpdatedMask);
-
+
if (reloadTexture) {
// reload all levels of texture image
@@ -1933,7 +1933,7 @@ abstract class TextureRetained extends NodeComponentRetained {
mirror.source = source;
if (this instanceof Texture3DRetained) {
Texture3DRetained t3d = (Texture3DRetained)this;
-
+
((Texture3DRetained)mirror).boundaryModeR = t3d.boundaryModeR;
((Texture3DRetained)mirror).depth = t3d.depth;
}
@@ -1969,11 +1969,11 @@ abstract class TextureRetained extends NodeComponentRetained {
if ((mirrorTexture.sharpenTextureFuncPts == null) ||
(mirrorTexture.sharpenTextureFuncPts.length !=
sharpenTextureFuncPts.length)) {
- mirrorTexture.sharpenTextureFuncPts =
+ mirrorTexture.sharpenTextureFuncPts =
new float[sharpenTextureFuncPts.length];
}
for (int i = 0; i < sharpenTextureFuncPts.length; i++) {
- mirrorTexture.sharpenTextureFuncPts[i] =
+ mirrorTexture.sharpenTextureFuncPts[i] =
sharpenTextureFuncPts[i];
}
}
@@ -2000,11 +2000,11 @@ abstract class TextureRetained extends NodeComponentRetained {
mirrorTexture.maxLevels = maxLevels;
if (images != null) {
-
+
for (int j = 0; j < numFaces; j++) {
for (int i = 0; i < maxLevels; i++) {
mirrorTexture.images[j][i] = images[j][i];
-
+
// add texture to the userList of the images
if (images[j][i] != null) {
images[j][i].addUser(mirrorTexture);
@@ -2015,18 +2015,18 @@ abstract class TextureRetained extends NodeComponentRetained {
}
boolean useAutoMipMapGeneration(Canvas3D cv) {
- if (mipmapMode == Texture.BASE_LEVEL &&
+ if (mipmapMode == Texture.BASE_LEVEL &&
(minFilter == Texture.NICEST ||
minFilter == Texture.MULTI_LEVEL_POINT ||
minFilter == Texture.MULTI_LEVEL_LINEAR) &&
((cv.textureExtendedFeatures &
Canvas3D.TEXTURE_AUTO_MIPMAP_GENERATION) != 0)) {
return true;
- }
-
- return false;
+ }
+
+ return false;
}
-
+
/**
* Go through the image update info list
* and remove those that are already done
@@ -2137,7 +2137,7 @@ abstract class TextureRetained extends NodeComponentRetained {
}
/**
- * Update the "component" field of the mirror object with the
+ * Update the "component" field of the mirror object with the
* given "value"
*/
synchronized void updateMirrorObject(int component, Object value) {
@@ -2166,7 +2166,7 @@ abstract class TextureRetained extends NodeComponentRetained {
mirrorTexture.images[face][level] = null;
} else {
- mirrorTexture.images[face][level] =
+ mirrorTexture.images[face][level] =
(ImageComponentRetained)image.retained;
mirrorTexture.images[face][level].addUser(mirror);
@@ -2178,7 +2178,7 @@ abstract class TextureRetained extends NodeComponentRetained {
// in the RenderBin itself in response to the
// IMAGE_CHANGED message
-
+
// mark that texture images need to be updated
mirrorTexture.resourceUpdatedMask = 0;
@@ -2186,30 +2186,30 @@ abstract class TextureRetained extends NodeComponentRetained {
mirrorTexture.addImageUpdateInfo(level, face, null);
} else if ((component & IMAGES_CHANGED) != 0) {
-
+
Object [] arg = (Object []) value;
ImageComponent [] images = (ImageComponent[])arg[0];
int face = ((Integer)arg[1]).intValue();
-
+
for (int i = 0; i < images.length; i++) {
-
+
// first remove texture from the userList of the current
// referencing image
if (mirrorTexture.images[face][i] != null) {
mirrorTexture.images[face][i].removeUser(mirror);
}
-
+
// assign the new image and add texture to the userList
if (images[i] == null) {
mirrorTexture.images[face][i] = null;
} else {
- mirrorTexture.images[face][i] =
+ mirrorTexture.images[face][i] =
(ImageComponentRetained)images[i].retained;
mirrorTexture.images[face][i].addUser(mirror);
}
}
mirrorTexture.updateResourceCreationMask();
-
+
// NOTE: the old images have to be removed from the
// renderBins' NodeComponentList and new image have to be
// added to the lists. This will be taken care of
@@ -2218,10 +2218,10 @@ abstract class TextureRetained extends NodeComponentRetained {
} else if ((component & BASE_LEVEL_CHANGED) != 0) {
int level = ((Integer)value).intValue();
-
+
if (level < mirrorTexture.baseLevel) {
- // add texture to the userList of those new levels of
+ // add texture to the userList of those new levels of
// enabling images
for (int j = 0; j < numFaces; j++) {
@@ -2317,7 +2317,7 @@ abstract class TextureRetained extends NodeComponentRetained {
} else if ((component & LOD_OFFSET_CHANGED) != 0) {
if ((mirrorTexture.lodOffset) == null) {
- mirrorTexture.lodOffset =
+ mirrorTexture.lodOffset =
new Point3f((Point3f)value);
} else {
mirrorTexture.lodOffset.set((Point3f)value);
@@ -2374,7 +2374,7 @@ abstract class TextureRetained extends NodeComponentRetained {
// first find which texture image is being affected
boolean done;
-
+
for (int j = 0; j < numFaces; j++) {
done = false;
@@ -2396,12 +2396,12 @@ abstract class TextureRetained extends NodeComponentRetained {
}
}
-
+
// reset the resourceCreationMask
// Note: called from the mirror object only
void updateResourceCreationMask() {
- resourceCreationMask = 0x0;
+ resourceCreationMask = 0x0;
}
void incTextureBinRefCount(TextureBin tb) {
@@ -2424,7 +2424,7 @@ abstract class TextureRetained extends NodeComponentRetained {
// hence don't have source and therefore they are
// guaranteed not modifiable
- if (image != null &&
+ if (image != null &&
(image.isByReference() ||
(image.source != null &&
image.source.getCapability(
@@ -2446,7 +2446,7 @@ abstract class TextureRetained extends NodeComponentRetained {
for (int j = 0; j < numFaces; j++) {
for (int i = 0; i < maxLevels; i++) {
image = images[j][i];
- if (image != null &&
+ if (image != null &&
(image.isByReference() ||
(image.source != null &&
image.source.getCapability(
@@ -2457,11 +2457,11 @@ abstract class TextureRetained extends NodeComponentRetained {
}
}
-
+
final void sendMessage(int attrMask, Object attr) {
ArrayList univList = new ArrayList();
- ArrayList gaList = Shape3DRetained.getGeomAtomsList(mirror.users, univList);
+ ArrayList gaList = Shape3DRetained.getGeomAtomsList(mirror.users, univList);
// Send to rendering attribute structure, regardless of
// whether there are users or not (alternate appearance case ..)
@@ -2480,7 +2480,7 @@ abstract class TextureRetained extends NodeComponentRetained {
createMessage = new J3dMessage();
createMessage.threads = J3dThread.UPDATE_RENDER;
createMessage.type = J3dMessage.TEXTURE_CHANGED;
-
+
createMessage.universe = (VirtualUniverse) univList.get(i);
createMessage.args[0] = this;
createMessage.args[1]= new Integer(attrMask);
@@ -2490,7 +2490,7 @@ abstract class TextureRetained extends NodeComponentRetained {
GeometryAtom[] gaArr = new GeometryAtom[gL.size()];
gL.toArray(gaArr);
createMessage.args[3] = gaArr;
-
+
VirtualUniverse.mc.processMessage(createMessage);
}
@@ -2507,11 +2507,11 @@ abstract class TextureRetained extends NodeComponentRetained {
break;
}
}
-
+
void setUseAsRaster(boolean useAsRaster) {
this.useAsRaster = useAsRaster;
}
-
+
boolean isUseAsRaster() {
return this.useAsRaster;
}
diff --git a/src/classes/share/javax/media/j3d/TextureUnitState.java b/src/classes/share/javax/media/j3d/TextureUnitState.java
index 49372ef..6ef8935 100644
--- a/src/classes/share/javax/media/j3d/TextureUnitState.java
+++ b/src/classes/share/javax/media/j3d/TextureUnitState.java
@@ -89,7 +89,7 @@ public class TextureUnitState extends NodeComponent {
private static final int[] readCapabilities = {
ALLOW_STATE_READ
};
-
+
/**
* Constructs a TextureUnitState component object using defaults for all
* state variables. All component object references are initialized
@@ -165,7 +165,7 @@ public class TextureUnitState extends NodeComponent {
// Do illegal sharing check
if(texture != null) {
- TextureRetained texRetained = (TextureRetained)texture.retained;
+ TextureRetained texRetained = (TextureRetained)texture.retained;
ImageComponent[] images = texRetained.getImages();
if(images != null) {
for(int i=0; icloneTree
to duplicate the current node.
@@ -182,7 +182,7 @@ public class TransformGroup extends Group {
* originalNode
into
* the current node. This method is called from the
* cloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
@@ -198,9 +198,9 @@ public class TransformGroup extends Group {
* @see Node#cloneTree
* @see NodeComponent#setDuplicateOnCloneTree
*/
- void duplicateAttributes(Node originalNode, boolean forceDuplicate) {
+ void duplicateAttributes(Node originalNode, boolean forceDuplicate) {
super.duplicateAttributes(originalNode, forceDuplicate);
-
+
Transform3D t = new Transform3D();
((TransformGroupRetained) originalNode.retained).getTransform(t);
((TransformGroupRetained) retained).setTransform(t);
diff --git a/src/classes/share/javax/media/j3d/TransformGroupRetained.java b/src/classes/share/javax/media/j3d/TransformGroupRetained.java
index 733b42c..4f1781b 100644
--- a/src/classes/share/javax/media/j3d/TransformGroupRetained.java
+++ b/src/classes/share/javax/media/j3d/TransformGroupRetained.java
@@ -92,7 +92,7 @@ class TransformGroupRetained extends GroupRetained implements TargetsInterface
boolean needNormalsTransform = false; // true if normals transformation
// is needed to push this
// transform down to geometry
-
+
// key which identifies a unique path from a
// locale to this transform group
HashKey currentKey = new HashKey();
@@ -131,7 +131,7 @@ class TransformGroupRetained extends GroupRetained implements TargetsInterface
J3dMessage tchangeMessage = null;
int i, j;
Transform3D trans = null;
-
+
if (staticTransform != null) {
// this writeable transformGroup has a static transform
// merged into this node
@@ -200,8 +200,8 @@ class TransformGroupRetained extends GroupRetained implements TargetsInterface
// get the inverse of the transpose -- note: this method only
- // supports static transform, the translation component will
- // not transform
+ // supports static transform, the translation component will
+ // not transform
Transform3D getNormalTransform() {
if (normalTransform == null) {
normalTransform = new Transform3D(transform);
@@ -264,7 +264,7 @@ class TransformGroupRetained extends GroupRetained implements TargetsInterface
// For inSharedGroup case.
int j, len;
-
+
if (childLocalToVworld == null) {
childLocalToVworld = new Transform3D[s.keys.length][];
childLocalToVworldIndex = new int[s.keys.length][];
@@ -275,15 +275,15 @@ class TransformGroupRetained extends GroupRetained implements TargetsInterface
} else {
len = localToVworld.length - s.keys.length;
-
- int newLen = localToVworld.length;
-
+
+ int newLen = localToVworld.length;
+
Transform3D newChildTList[][] = new Transform3D[newLen][];
- int newChildIndexList[][] = new int[newLen][];
+ int newChildIndexList[][] = new int[newLen][];
int newTransformLevels[] = new int[newLen];
CachedTargets newTargets[] = new CachedTargets[newLen];
TransformGroupData newPerPathData[] = new TransformGroupData[newLen];
-
+
System.arraycopy(childLocalToVworld, 0,
newChildTList, 0, childLocalToVworld.length);
System.arraycopy(childLocalToVworldIndex, 0,
@@ -296,9 +296,9 @@ class TransformGroupRetained extends GroupRetained implements TargetsInterface
System.arraycopy(perPathData, 0,
newPerPathData, 0, perPathData.length);
-
+
childLocalToVworld = newChildTList;
- childLocalToVworldIndex = newChildIndexList;
+ childLocalToVworldIndex = newChildIndexList;
transformLevels = newTransformLevels;
cachedTargets = newTargets;
perPathData = newPerPathData;
@@ -308,23 +308,23 @@ class TransformGroupRetained extends GroupRetained implements TargetsInterface
int hkIndexPlus1, blkSize;
for(i=len, j=0; icloneNode
method which is, in turn, called by the
- * cloneTree
method.cloneTree
method.true
, causes the
@@ -209,7 +209,7 @@ public abstract class TransformInterpolator extends Interpolator {
TransformInterpolator ti = (TransformInterpolator) originalNode;
setTransformAxis(ti.getTransformAxis());
-
+
// this reference will be updated in updateNodeReferences()
setTarget(ti.getTarget());
}
diff --git a/src/classes/share/javax/media/j3d/TransformStructure.java b/src/classes/share/javax/media/j3d/TransformStructure.java
index 7a1b681..43009fd 100644
--- a/src/classes/share/javax/media/j3d/TransformStructure.java
+++ b/src/classes/share/javax/media/j3d/TransformStructure.java
@@ -55,7 +55,7 @@ class TransformStructure extends J3dStructure implements ObjectUpdate {
private UpdateTargets targets = new UpdateTargets();
/**
- * An arrayList of nodes that need collisionBounds updates
+ * An arrayList of nodes that need collisionBounds updates
*/
private ArrayList collisionObjectList = new ArrayList();
@@ -70,7 +70,7 @@ class TransformStructure extends J3dStructure implements ObjectUpdate {
// just switched-on
private ArrayList
*
alphasrc*src +
@@ -72,25 +72,25 @@ package javax.media.j3d;
* range [0.0, 1.0], with 0.0 being fully opaque and 1.0 being
* fully transparent.
*
*
@@ -289,7 +289,7 @@ public class TransparencyAttributes extends NodeComponent {
ALLOW_MODE_READ,
ALLOW_VALUE_READ
};
-
+
/**
* Constructs a TransparencyAttributes object with default parameters.
* The default values are as follows:
@@ -312,9 +312,9 @@ public class TransparencyAttributes extends NodeComponent {
* @param tVal the transparency value
* @exception IllegalArgumentException if
* f = 0
f = 1
f =
+ *
f =
* alphasrc
f =
+ *
f =
* 1 - alphasrc
f =
+ *
f =
* colordst
f =
+ *
f =
* 1 - colordst
f =
+ *
f =
* colorsrc
f =
+ *
f =
* 1 - colorsrc
tMode
is a value other than
- * NONE
, FASTEST
, NICEST
,
+ * NONE
, FASTEST
, NICEST
,
* SCREEN_DOOR
, or BLENDED
- *
+ *
*/
public TransparencyAttributes(int tMode, float tVal){
this(tMode, tVal, BLEND_SRC_ALPHA, BLEND_ONE_MINUS_SRC_ALPHA);
@@ -335,7 +335,7 @@ public class TransparencyAttributes extends NodeComponent {
* BLEND_SRC_COLOR
, or BLEND_ONE_MINUS_SRC_COLOR
.
* @exception IllegalArgumentException if
* tMode
is a value other than
- * NONE
, FASTEST
, NICEST
,
+ * NONE
, FASTEST
, NICEST
,
* SCREEN_DOOR
, or BLENDED
* @exception IllegalArgumentException if
* srcBlendFunction
or dstBlendFunction
@@ -348,7 +348,7 @@ public class TransparencyAttributes extends NodeComponent {
int srcBlendFunction,
int dstBlendFunction) {
if ((tMode < FASTEST) ||(tMode > NONE)) {
- throw new IllegalArgumentException(J3dI18N.getString("TransparencyAttributes6"));
+ throw new IllegalArgumentException(J3dI18N.getString("TransparencyAttributes6"));
}
switch (srcBlendFunction) {
@@ -388,13 +388,13 @@ public class TransparencyAttributes extends NodeComponent {
* Sets the transparency mode for this
* appearance component object.
* @param transparencyMode the transparency mode to be used, one of
- * NONE
, FASTEST
, NICEST
,
+ * NONE
, FASTEST
, NICEST
,
* SCREEN_DOOR
, or BLENDED
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
* @exception IllegalArgumentException if
* transparencyMode
is a value other than
- * NONE
, FASTEST
, NICEST
,
+ * NONE
, FASTEST
, NICEST
,
* SCREEN_DOOR
, or BLENDED
*/
public void setTransparencyMode(int transparencyMode) {
@@ -403,7 +403,7 @@ public class TransparencyAttributes extends NodeComponent {
throw new CapabilityNotSetException(J3dI18N.getString("TransparencyAttributes0"));
if ((transparencyMode < FASTEST) || (transparencyMode > NONE)) {
- throw new IllegalArgumentException(J3dI18N.getString("TransparencyAttributes6"));
+ throw new IllegalArgumentException(J3dI18N.getString("TransparencyAttributes6"));
}
if (isLive())
@@ -418,7 +418,7 @@ public class TransparencyAttributes extends NodeComponent {
* Gets the transparency mode for this
* appearance component object.
* @return transparencyMode the transparency mode
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public int getTransparencyMode() {
@@ -449,7 +449,7 @@ public class TransparencyAttributes extends NodeComponent {
((TransparencyAttributesRetained)this.retained).initTransparency(transparency);
}
-
+
/**
* Retrieves this appearance's transparency.
@@ -478,7 +478,7 @@ public class TransparencyAttributes extends NodeComponent {
* BLEND_SRC_ALPHA
, BLEND_ONE_MINUS_SRC_ALPHA
,
* BLEND_DST_COLOR
, or BLEND_ONE_MINUS_DST_COLOR
.
*
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
* @exception IllegalArgumentException if blendFunction
* is a value other than one of the supported functions listed above.
@@ -503,7 +503,7 @@ public class TransparencyAttributes extends NodeComponent {
throw new IllegalArgumentException(J3dI18N.getString("TransparencyAttributes7"));
}
- if (isLive())
+ if (isLive())
((TransparencyAttributesRetained)this.retained).setSrcBlendFunction(blendFunction);
else
((TransparencyAttributesRetained)this.retained).initSrcBlendFunction(blendFunction);
@@ -515,7 +515,7 @@ public class TransparencyAttributes extends NodeComponent {
* Gets the source blend function for this
* TransparencyAttributes object.
* @return the source blend function.
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @since Java 3D 1.2
@@ -540,7 +540,7 @@ public class TransparencyAttributes extends NodeComponent {
* BLEND_SRC_ALPHA
, BLEND_ONE_MINUS_SRC_ALPHA
,
* BLEND_SRC_COLOR
, or BLEND_ONE_MINUS_SRC_COLOR
.
*
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
* @exception IllegalArgumentException if blendFunction
* is a value other than one of the supported functions listed above.
@@ -564,7 +564,7 @@ public class TransparencyAttributes extends NodeComponent {
throw new IllegalArgumentException(J3dI18N.getString("TransparencyAttributes8"));
}
- if (isLive())
+ if (isLive())
((TransparencyAttributesRetained)this.retained).setDstBlendFunction(blendFunction);
else
((TransparencyAttributesRetained)this.retained).initDstBlendFunction(blendFunction);
@@ -576,7 +576,7 @@ public class TransparencyAttributes extends NodeComponent {
* Gets the destination blend function for this
* TransparencyAttributes object.
* @return the destination blend function.
- * @exception CapabilityNotSetException if appropriate capability is
+ * @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @since Java 3D 1.2
@@ -600,22 +600,22 @@ public class TransparencyAttributes extends NodeComponent {
/**
- * @deprecated replaced with cloneNodeComponent(boolean forceDuplicate)
+ * @deprecated replaced with cloneNodeComponent(boolean forceDuplicate)
*/
public NodeComponent cloneNodeComponent() {
TransparencyAttributes transa = new TransparencyAttributes();
transa.duplicateNodeComponent(this);
return transa;
- }
+ }
+
-
/**
* Copies all node information from originalNodeComponent
into
* the current node. This method is called from the
* duplicateNode
method. This routine does
* the actual duplication of all "local data" (any data defined in
- * this object).
+ * this object).
*
* @param originalNodeComponent the original node to duplicate.
* @param forceDuplicate when set to true
, causes the
@@ -627,15 +627,15 @@ public class TransparencyAttributes extends NodeComponent {
* @see Node#cloneTree
* @see NodeComponent#setDuplicateOnCloneTree
*/
- void duplicateAttributes(NodeComponent originalNodeComponent,
- boolean forceDuplicate) {
+ void duplicateAttributes(NodeComponent originalNodeComponent,
+ boolean forceDuplicate) {
super.duplicateAttributes(originalNodeComponent, forceDuplicate);
-
- TransparencyAttributesRetained attr =
+
+ TransparencyAttributesRetained attr =
(TransparencyAttributesRetained) originalNodeComponent.retained;
TransparencyAttributesRetained rt =
- (TransparencyAttributesRetained) retained;
-
+ (TransparencyAttributesRetained) retained;
+
rt.initTransparencyMode(attr.getTransparencyMode());
rt.initTransparency(attr.getTransparency());
rt.initSrcBlendFunction(attr.getSrcBlendFunction());
diff --git a/src/classes/share/javax/media/j3d/TransparencyAttributesRetained.java b/src/classes/share/javax/media/j3d/TransparencyAttributesRetained.java
index d7ef976..1e02560 100644
--- a/src/classes/share/javax/media/j3d/TransparencyAttributesRetained.java
+++ b/src/classes/share/javax/media/j3d/TransparencyAttributesRetained.java
@@ -45,7 +45,7 @@ class TransparencyAttributesRetained extends NodeComponentRetained {
static final int SRC_BLEND_FUNCTION_CHANGED = 0x04;
static final int DST_BLEND_FUNCTION_CHANGED = 0x08;
- // Integer flag that contains bitset to indicate
+ // Integer flag that contains bitset to indicate
// which field changed.
int isDirty = 0xffff;
@@ -61,7 +61,7 @@ class TransparencyAttributesRetained extends NodeComponentRetained {
* Sets the transparency mode for this
* appearance component object.
* @param transparencyMode the transparency mode to be used, one of
- * NONE
, FASTEST
, NICEST
,
+ * NONE
, FASTEST
, NICEST
,
* SCREEN_DOOR
, or BLENDED
*/
final void initTransparencyMode(int transparencyMode) {
@@ -185,8 +185,8 @@ class TransparencyAttributesRetained extends NodeComponentRetained {
/**
* Sets the destination blend function used in blended transparency
- * and antialiasing operations and sends a message notifying the
- * interested structures of the change. The destination function
+ * and antialiasing operations and sends a message notifying the
+ * interested structures of the change. The destination function
* specifies the factor that is multiplied by the destination
* color; this value is added to the product of the source factor
* and the source color. The default destination blend function is
@@ -212,7 +212,7 @@ class TransparencyAttributesRetained extends NodeComponentRetained {
/**
- * Creates and initializes a mirror object, point the mirror object
+ * Creates and initializes a mirror object, point the mirror object
* to the retained object if the object is not editable
*/
synchronized void createMirrorObject() {
@@ -222,7 +222,7 @@ class TransparencyAttributesRetained extends NodeComponentRetained {
if (isStatic()) {
mirror = this;
} else {
- TransparencyAttributesRetained mirrorTa
+ TransparencyAttributesRetained mirrorTa
= new TransparencyAttributesRetained();
mirrorTa.source = source;
mirrorTa.set(this);
@@ -235,11 +235,11 @@ class TransparencyAttributesRetained extends NodeComponentRetained {
}
void updateNative(Context ctx,
- float alpha, int geometryType, int polygonMode,
- boolean lineAA,
- boolean pointAA) {
- Pipeline.getPipeline().updateTransparencyAttributes(ctx, alpha, geometryType, polygonMode,
- lineAA, pointAA, transparencyMode,
+ float alpha, int geometryType, int polygonMode,
+ boolean lineAA,
+ boolean pointAA) {
+ Pipeline.getPipeline().updateTransparencyAttributes(ctx, alpha, geometryType, polygonMode,
+ lineAA, pointAA, transparencyMode,
srcBlendFunction, dstBlendFunction);
}
@@ -252,7 +252,7 @@ class TransparencyAttributesRetained extends NodeComponentRetained {
}
/**
- * Update the "component" field of the mirror object with the
+ * Update the "component" field of the mirror object with the
* given "value"
*/
synchronized void updateMirrorObject(int component, Object value) {
@@ -265,12 +265,12 @@ class TransparencyAttributesRetained extends NodeComponentRetained {
}
else if ((component & VALUE_CHANGED) != 0) {
mirrorTa.transparency = ((Float)value).floatValue();
- }
+ }
else if ((component & SRC_BLEND_FUNCTION_CHANGED) != 0) {
- mirrorTa.srcBlendFunction = ((Integer) value).intValue();
- }
+ mirrorTa.srcBlendFunction = ((Integer) value).intValue();
+ }
else if ((component & DST_BLEND_FUNCTION_CHANGED) != 0) {
- mirrorTa.dstBlendFunction = ((Integer) value).intValue();
+ mirrorTa.dstBlendFunction = ((Integer) value).intValue();
}
}
@@ -296,7 +296,7 @@ class TransparencyAttributesRetained extends NodeComponentRetained {
final void sendMessage(int attrMask, Object attr) {
ArrayList univList = new ArrayList();
- ArrayList gaList = Shape3DRetained.getGeomAtomsList(mirror.users, univList);
+ ArrayList gaList = Shape3DRetained.getGeomAtomsList(mirror.users, univList);
// Send to rendering attribute structure, regardless of
// whether there are users or not (alternate appearance case ..)
@@ -316,17 +316,17 @@ class TransparencyAttributesRetained extends NodeComponentRetained {
createMessage = new J3dMessage();
createMessage.threads = J3dThread.UPDATE_RENDER;
createMessage.type = J3dMessage.TRANSPARENCYATTRIBUTES_CHANGED;
-
+
createMessage.universe = (VirtualUniverse) univList.get(i);
createMessage.args[0] = this;
createMessage.args[1]= new Integer(attrMask);
createMessage.args[2] = attr;
-
+
ArrayList gL = (ArrayList) gaList.get(i);
GeometryAtom[] gaArr = new GeometryAtom[gL.size()];
gL.toArray(gaArr);
createMessage.args[3] = gaArr;
-
+
VirtualUniverse.mc.processMessage(createMessage);
}
@@ -339,7 +339,7 @@ class TransparencyAttributesRetained extends NodeComponentRetained {
setFrequencyChangeMask(bit, 0x1);
}
}
-
-
+
+
}
diff --git a/src/classes/share/javax/media/j3d/TransparencyInterpolator.java b/src/classes/share/javax/media/j3d/TransparencyInterpolator.java
index 27b9414..22b1a29 100644
--- a/src/classes/share/javax/media/j3d/TransparencyInterpolator.java
+++ b/src/classes/share/javax/media/j3d/TransparencyInterpolator.java
@@ -36,12 +36,12 @@ import java.util.Enumeration;
/**
* TransparencyInterpolator behavior. This class defines a behavior
* that modifies the transparency of its target TransparencyAttributes
- * object by linearly interpolating between a pair of specified
+ * object by linearly interpolating between a pair of specified
* transparency values (using the value generated by the specified
- * Alpha object).
+ * Alpha object).
*
- *
getCurrentFrameStartTime
returns the time at which
+ * getCurrentFrameStartTime
returns the time at which
* the most recent rendering frame started.getLastFrameDuration
returns the duration, in milliseconds, of
* the most recently completed rendering frame.
- *
- * Note that line and point antialiasing are independent of scene
- * antialiasing. If antialiasing is enabled for lines and points,
+ * Note that line and point antialiasing are independent of scene
+ * antialiasing. If antialiasing is enabled for lines and points,
* the lines and points will be antialiased prior to scene antialiasing.
* If scene antialiasing is disabled, antialiased lines and points will
* still be antialiased.
@@ -387,7 +387,7 @@ import com.sun.j3d.utils.universe.Viewer; // Needed for Support of DVR.
* The View object provides the following compatibility-mode
* methods that operate on the viewing transform.startBehaviorScheduler
starts the behavior scheduler
+ * startBehaviorScheduler
starts the behavior scheduler
* running after it has been stopped.stopBehaviorScheduler
stops the behavior scheduler after all
* currently-scheduled behaviors are executed.getSceneAntialiasingEnable
returns the scene antialiasing
* flag.
- *
setVpcToEc
a compatibility mode method that
+ * setVpcToEc
a compatibility mode method that
* specifies the ViewPlatform
* coordinates (VPC) to eye coordinates viewing transform.getVpcToEc
returns the VPC.
- * The
@@ -720,7 +720,7 @@ public class View extends Object {
// AudioDevice enumerator current position
// AudioDeviceEnumerator allAudioEnumerator = null;
-
+
// These are used for tracking the frame times
static final int NUMBER_FRAME_START_TIMES = 10;
@@ -736,7 +736,7 @@ public class View extends Object {
// These are the ones that get updated directly by MC
long frameNumber = 0;
long startTime = 0;
- long stopTime = 0;
+ long stopTime = 0;
// Support dynamic video resize -- DVR.
Viewer viewer = null; // Cached the associate viewer of this view.
@@ -754,7 +754,7 @@ public class View extends Object {
// View cache for this view.
//
ViewCache viewCache = null;
-
+
// Compatibility mode related field has changed.
// { compatibilityModeEnable, compatVpcToEc, compatLeftProjection,
// compatRightProjection }
@@ -779,7 +779,7 @@ public class View extends Object {
// Monoscopic View Policy field has changed.
static final int MONOSCOPIC_VIEW_POLICY_DIRTY = 0x200;
// Field Of View field has changed.
- static final int FIELD_OF_VIEW_DIRTY = 0x400;
+ static final int FIELD_OF_VIEW_DIRTY = 0x400;
// Tracking Enable field has changed.
static final int TRACKING_ENABLE_DIRTY = 0x800;
// User Head To Vworld Enable field has changed.
@@ -792,7 +792,7 @@ public class View extends Object {
static final int RIGHT_MANUAL_EYE_IN_COEXISTENCE_DIRTY = 0x8000;
// visibilityPolicy has changed.
static final int VISIBILITY_POLICY_DIRTY = 0x10000;
-
+
// This is not from View object. It is here for the purpose
// keeping all ViewCache's dirty mask bit declaration in one place.
// ViewPlatformRetained viewAttach Policy field has changed.
@@ -803,14 +803,14 @@ public class View extends Object {
static final int PE_COE_TO_TRACKER_BASE_DIRTY = 0x100000;
static final int PE_TRACKING_AVAILABLE_DIRTY = 0x200000;
static final int PE_COE_CENTER_IN_PWORLD_POLICY_DIRTY = 0x400000;
-
+
// PhysicalBody fields has changed.
static final int PB_EYE_POSITION_DIRTY = 0x1000000;
static final int PB_EAR_POSITION_DIRTY = 0x2000000;
static final int PB_NOMINAL_EYE_HEIGHT_FROM_GROUND_DIRTY = 0x4000000;
static final int PB_NOMINAL_EYE_OFFSET_FROM_NOMINAL_SCREEN_DIRTY = 0x8000000;
-
+
// Mask that indicates this View's view dependence info. has changed,
// and CanvasViewCache may need to recompute the final view matries.
int vDirtyMask = (COMPATIBILITY_MODE_DIRTY | SCREEN_SCALE_POLICY_DIRTY
@@ -823,14 +823,14 @@ public class View extends Object {
| COEXISTENCE_CENTERING_ENABLE_DIRTY
| LEFT_MANUAL_EYE_IN_COEXISTENCE_DIRTY
| RIGHT_MANUAL_EYE_IN_COEXISTENCE_DIRTY
- | VISIBILITY_POLICY_DIRTY);
-
+ | VISIBILITY_POLICY_DIRTY);
+
//
// This object contains a specification of the user's physical body.
//
// Attributes of this object are defined in head coordinates and
- // include information such as the location of the user's eyes and
+ // include information such as the location of the user's eyes and
// ears.
// The origin is defined to be halfway between the left and right eye
// in the plane of the face.
@@ -844,7 +844,7 @@ public class View extends Object {
// View model compatibility mode flag
boolean compatibilityModeEnable = false;
-
+
// View model coexistenceCenteringEnable flag
boolean coexistenceCenteringEnable = true;
@@ -979,17 +979,17 @@ public class View extends Object {
//
// Flag to enable depth buffer freeze during trasparent rendering pass
- //
+ //
boolean depthBufferFreezeTransparent = true;
//
// Flag to enable scene antialiasing
- //
+ //
boolean sceneAntialiasingEnable = false;
//
// Flag to enable local eye lighting
- //
+ //
boolean localEyeLightingEnable = false;
// Array Lists to track the screens and canvases associated with this View.
@@ -1007,7 +1007,7 @@ public class View extends Object {
// Flag to notify user thread when renderOnce is finished
volatile boolean renderOnceFinish = true;
-
+
// Lock to synchronize start/stop/renderOnce call
private Object startStopViewLock = new Object();
@@ -1020,10 +1020,10 @@ public class View extends Object {
* use for stop view, when stopview, set to count -1,
* when reach 1, call stopView() in MC and reset to -1.
*/
- int stopViewCount = -1;
+ int stopViewCount = -1;
/**
- * False if current frame cycle time less than minimum frame cycle time
+ * False if current frame cycle time less than minimum frame cycle time
*/
boolean isMinCycleTimeAchieve = true;
@@ -1047,7 +1047,7 @@ public class View extends Object {
// resetting the newly set universe.
long resetUnivCount = 0;
- // This notify user thread waitForMC() to continue when
+ // This notify user thread waitForMC() to continue when
// MC finish unregisterView
volatile boolean doneUnregister = false;
@@ -1123,7 +1123,7 @@ public class View extends Object {
public void setViewPolicy(int policy) {
if (policy != HMD_VIEW &&
policy != SCREEN_VIEW) {
-
+
throw new IllegalArgumentException(J3dI18N.getString("View0"));
}
if(policy == HMD_VIEW) {
@@ -1133,7 +1133,7 @@ public class View extends Object {
synchronized (canvasList) {
for (int i=canvases.size()-1; i>=0; i--) {
Canvas3D c3d = (Canvas3D)canvases.elementAt(i);
-
+
if ((c3d.monoscopicViewPolicy == View.CYCLOPEAN_EYE_VIEW) &&
(!c3d.useStereo)){
throw new
@@ -1156,7 +1156,7 @@ public class View extends Object {
public int getViewPolicy() {
return this.viewPolicy;
}
-
+
/**
* Sets the projection policy for this View.
* This variable specifies the type of projection transform that
@@ -1191,7 +1191,7 @@ public class View extends Object {
public int getProjectionPolicy() {
return this.projectionPolicy;
}
-
+
/**
* Sets the screen scale policy for this view.
* This policy specifies how the screen scale is derived.
@@ -1392,7 +1392,7 @@ public class View extends Object {
}
repaint();
}
-
+
/**
* Retrieves the coexistenceCentering enable flag.
*
@@ -1416,7 +1416,7 @@ public class View extends Object {
}
repaint();
}
-
+
/**
* Retrieves the compatibility mode enable flag.
* @return the current compatibility mode enable flag
@@ -1424,7 +1424,7 @@ public class View extends Object {
public boolean getCompatibilityModeEnable() {
return this.compatibilityModeEnable;
}
-
+
/**
* Compatibility mode method that specifies a viewing frustum for
* the left eye that transforms points in Eye Coordinates (EC) to
@@ -1519,7 +1519,7 @@ public class View extends Object {
if (!vpcToEc.isAffine()) {
throw new BadTransformException(J3dI18N.getString("View7"));
}
-
+
synchronized(this) {
compatVpcToEc.setWithLock(vpcToEc);
vDirtyMask |= View.COMPATIBILITY_MODE_DIRTY;
@@ -1616,7 +1616,7 @@ public class View extends Object {
}
repaint();
}
-
+
/**
* Returns the current screen scale value
* @return the current screen scale value
@@ -1634,7 +1634,7 @@ public class View extends Object {
public void setFieldOfView(double fieldOfView) {
synchronized(this) {
this.fieldOfView = fieldOfView;
- vDirtyMask |= View.FIELD_OF_VIEW_DIRTY;
+ vDirtyMask |= View.FIELD_OF_VIEW_DIRTY;
}
repaint();
@@ -1822,7 +1822,7 @@ public class View extends Object {
/**
* Sets the view model's front clip policy, the policy Java 3D uses
- * in computing where to place the front clip plane. The variable
+ * in computing where to place the front clip plane. The variable
* can contain one of:
* setLeftProjection
and setRightProjection
+ * The setLeftProjection
and setRightProjection
* methods specify
* a viewing frustum for the left and right eye that transforms
* points in eye coordinates to clipping coordinates.getLeftProjection
and getRightProjection
+ *
+ * The getLeftProjection
and getRightProjection
* methods return
* the viewing frustum for the left and right eye.
*
*
*
@@ -1983,14 +1983,14 @@ public class View extends Object {
*
* @since Java 3D 1.3
*/
- public void setTransparencySortingPolicy(int policy) {
+ public void setTransparencySortingPolicy(int policy) {
if (policy == transparencySortingPolicy) {
return;
}
-
+
transparencySortingPolicy = policy;
if (activeStatus && isRunning) {
-
+
J3dMessage vpMessage = new J3dMessage();
vpMessage.universe = universe;
vpMessage.view = this;
@@ -2026,7 +2026,7 @@ public class View extends Object {
this.trackingEnable = flag;
vDirtyMask |= View.TRACKING_ENABLE_DIRTY;
}
-
+
repaint();
}
@@ -2067,13 +2067,13 @@ public class View extends Object {
* and copies that value into the transform provided.
* The computed transforms takes points in the sensor's coordinate
* system and produces the point's corresponding value in
- * virtual-world coordinates.
+ * virtual-world coordinates.
* @param sensor the sensor in question
* @param t the object that will receive the transform
*/
public void getSensorToVworld(Sensor sensor, Transform3D t) {
// grab the first canvas -- not sure for multiple canvases
- Canvas3D canvas = (Canvas3D) this.canvases.firstElement();
+ Canvas3D canvas = (Canvas3D) this.canvases.firstElement();
Transform3D localTrans = new Transform3D();
synchronized(canvas.canvasViewCache) {
t.set(canvas.canvasViewCache.getVworldToTrackerBase());
@@ -2084,7 +2084,7 @@ public class View extends Object {
}
/**
- * Retrieves the position of the specified Sensor's
+ * Retrieves the position of the specified Sensor's
* hotspot in virtual-world coordinates
* and copies that value into the position provided.
* This value is derived from other values and is read-only.
@@ -2094,7 +2094,7 @@ public class View extends Object {
public void getSensorHotspotInVworld(Sensor sensor,
Point3f position) {
- Canvas3D canvas = (Canvas3D) this.canvases.firstElement();
+ Canvas3D canvas = (Canvas3D) this.canvases.firstElement();
Transform3D sensorToVworld = new Transform3D();
Point3d hotspot3d = new Point3d();
@@ -2105,7 +2105,7 @@ public class View extends Object {
}
/**
- * Retrieves the position of the specified Sensor's
+ * Retrieves the position of the specified Sensor's
* hotspot in virtual-world coordinates
* and copies that value into the position provided.
* This value is derived from other values and is read-only.
@@ -2115,7 +2115,7 @@ public class View extends Object {
public void getSensorHotspotInVworld(Sensor sensor,
Point3d position) {
- Canvas3D canvas = (Canvas3D) this.canvases.firstElement();
+ Canvas3D canvas = (Canvas3D) this.canvases.firstElement();
Transform3D sensorToVworld = new Transform3D();
getSensorToVworld(sensor, sensorToVworld);
@@ -2134,17 +2134,17 @@ public class View extends Object {
* associated with another view
*/
public void setCanvas3D(Canvas3D canvas3D, int index) {
-
+
if((viewPolicy == HMD_VIEW) &&
(canvas3D.monoscopicViewPolicy == View.CYCLOPEAN_EYE_VIEW) &&
(!canvas3D.useStereo)){
-
+
throw new
IllegalStateException(J3dI18N.getString("View31"));
}
-
+
Canvas3D cv;
-
+
synchronized(canvasList) {
if (canvas3D.getView() != null)
throw new IllegalSharingException(J3dI18N.getString("View10"));
@@ -2160,7 +2160,7 @@ public class View extends Object {
if (canvas3D.added) {
evaluateActive();
- }
+ }
if (cv.added) {
evaluateActive();
}
@@ -2249,7 +2249,7 @@ public class View extends Object {
throw new
IllegalStateException(J3dI18N.getString("View31"));
}
-
+
synchronized(canvasList) {
if (canvas3D.getView() != null)
throw new IllegalSharingException(J3dI18N.getString("View10"));
@@ -2274,7 +2274,7 @@ public class View extends Object {
* @param index the position of Canvas3D object to be removed
*/
public void removeCanvas3D(int index) {
- // index -1 is possible if the view is unregistered first
+ // index -1 is possible if the view is unregistered first
// because viewPlatform is clearLived,
// and then removeCanvas from the view
if (index == -1)
@@ -2291,7 +2291,7 @@ public class View extends Object {
}
// reset canvas will set view to null also
- VirtualUniverse.mc.postRequest(MasterControl.RESET_CANVAS,
+ VirtualUniverse.mc.postRequest(MasterControl.RESET_CANVAS,
cv);
cv.pendingView = null;
@@ -2368,7 +2368,7 @@ public class View extends Object {
Canvas3D cv = (Canvas3D)iterator.next();
// reset canvas will set view to null also
- VirtualUniverse.mc.postRequest(MasterControl.RESET_CANVAS,
+ VirtualUniverse.mc.postRequest(MasterControl.RESET_CANVAS,
cv);
cv.pendingView = null;
@@ -2387,7 +2387,7 @@ public class View extends Object {
}
- // This adds this canvas and its screen to the screen list.
+ // This adds this canvas and its screen to the screen list.
// Locks are already acquired before this is called.
private void addToCanvasList(Canvas3D c) {
@@ -2399,7 +2399,7 @@ public class View extends Object {
return;
}
}
-
+
// Add a screen slot
screenList.add(c.screen);
ArrayList clist = new ArrayList();
@@ -2417,7 +2417,7 @@ public class View extends Object {
// This is the right screen slot
ArrayList clist = (ArrayList)canvasList.get(i);
clist.remove(clist.indexOf(c));
-
+
if (clist.size() == 0) {
canvasList.remove(i);
screenList.remove(i);
@@ -2460,7 +2460,7 @@ public class View extends Object {
}
len = screenList.size();
Screen3D newCachedScreens[] = new Screen3D[len];
-
+
for (int i=0; i < len; i++) {
newCachedScreens[i] = (Screen3D) screenList.get(i);
}
@@ -2470,9 +2470,9 @@ public class View extends Object {
canvasesDirty = false;
}
}
-
+
// This creates a 2 dimentional list of canvases
- // ONLY MC can call this procedure with canCompute=true,
+ // ONLY MC can call this procedure with canCompute=true,
// since MC want the result return by
// evaluateCanvases and updateWorkThreads agree to each other,
// so only evaluateCanvases can compute a new list.
@@ -2612,7 +2612,7 @@ public class View extends Object {
index = NUMBER_FRAME_START_TIMES - 1;
}
}
-
+
if (times.length > NUMBER_FRAME_START_TIMES) {
for (; i
originalNode
into
* the current node. This method is called from the
@@ -277,10 +277,10 @@ public class ViewPlatform extends Leaf {
* @see NodeComponent#setDuplicateOnCloneTree
*/
- void duplicateAttributes(Node originalNode, boolean forceDuplicate) {
+ void duplicateAttributes(Node originalNode, boolean forceDuplicate) {
super.duplicateAttributes(originalNode, forceDuplicate);
- ViewPlatformRetained attr =
+ ViewPlatformRetained attr =
(ViewPlatformRetained) originalNode.retained;
ViewPlatformRetained rt = (ViewPlatformRetained) retained;
diff --git a/src/classes/share/javax/media/j3d/ViewPlatformRetained.java b/src/classes/share/javax/media/j3d/ViewPlatformRetained.java
index 2c5cda8..86e1797 100644
--- a/src/classes/share/javax/media/j3d/ViewPlatformRetained.java
+++ b/src/classes/share/javax/media/j3d/ViewPlatformRetained.java
@@ -70,10 +70,10 @@ class ViewPlatformRetained extends LeafRetained {
// dirty flag for viewList
boolean viewListDirty = true;
- /**
+ /**
* The current cached view platform transform (vworldToVpc) and
* its inverse (vpcToVworld).
- */
+ */
Transform3D vworldToVpc = null;
Transform3D vpcToVworld = new Transform3D();
@@ -119,7 +119,7 @@ class ViewPlatformRetained extends LeafRetained {
* This setting determines how Java 3D places the
* user's eye point as a function of head position. The variable can
* contain one of NOMINAL_SCREEN, NOMINAL_HEAD, or NOMINAL_FEET.
- * @param policy the new policy, one of NOMINAL_SCREEN, NOMINAL_HEAD,
+ * @param policy the new policy, one of NOMINAL_SCREEN, NOMINAL_HEAD,
* or NOMINAL_FEET
*/
void setViewAttachPolicy(int policy) {
@@ -127,7 +127,7 @@ class ViewPlatformRetained extends LeafRetained {
this.viewAttachPolicy = policy;
vprDirtyMask |= View.VPR_VIEW_ATTACH_POLICY_DIRTY;
}
-
+
if (source != null && source.isLive()) {
repaint();
}
@@ -172,7 +172,7 @@ class ViewPlatformRetained extends LeafRetained {
}
}
-
+
/**
* Get the ViewPlatform's activation radius
*/
@@ -200,9 +200,9 @@ class ViewPlatformRetained extends LeafRetained {
viewListDirty = true;
}
}
-
+
Transform3D getVworldToVpc() {
- if (vworldToVpc == null)
+ if (vworldToVpc == null)
vworldToVpc = new Transform3D();
vworldToVpc.set(getCurrentLocalToVworld(null));
vworldToVpc.invert();
@@ -253,9 +253,9 @@ class ViewPlatformRetained extends LeafRetained {
lastLocalToVworld = getLastLocalToVworld();
if (lastLocalToVworld.equals(identity)) {
- // lastLocalToVworld not yet updated
+ // lastLocalToVworld not yet updated
// for Renderer viewCache when startup
- evaluateInitViewPlatformTransform((NodeRetained)this,
+ evaluateInitViewPlatformTransform((NodeRetained)this,
lastLocalToVworld);
}
}
@@ -289,7 +289,7 @@ class ViewPlatformRetained extends LeafRetained {
for (int i = views.length-1; i>=0; i--) {
views[i].checkView();
}
-
+
super.doSetLive(s);
if (inBackgroundGroup) {
@@ -305,7 +305,7 @@ class ViewPlatformRetained extends LeafRetained {
if (s.viewLists != null) {
throw new
IllegalSceneGraphException(J3dI18N.getString("ViewPlatformRetained3"));
- }
+ }
/*
if (false) {
System.err.println("setLive: vworldToVpc = ");
@@ -315,7 +315,7 @@ class ViewPlatformRetained extends LeafRetained {
}
*/
this.locale = s.locale;
-
+
if (s.transformTargets != null && s.transformTargets[0] != null) {
s.transformTargets[0].addNode(this, Targets.VPF_TARGETS);
@@ -338,7 +338,7 @@ class ViewPlatformRetained extends LeafRetained {
universe.addViewPlatform(this);
s.traverseFlags |= NodeRetained.CONTAINS_VIEWPLATFORM;
}
-
+
/**
* This clearLive routine first calls the superclass's method, then
* it deactivates all canvases that are associated with the attached
@@ -359,9 +359,9 @@ class ViewPlatformRetained extends LeafRetained {
if (s.transformTargets != null && s.transformTargets[0] != null) {
s.transformTargets[0].addNode(this, Targets.VPF_TARGETS);
s.notifyThreads |= J3dThread.UPDATE_TRANSFORM;
-
+
}
- s.notifyThreads |= (J3dThread.UPDATE_BEHAVIOR |
+ s.notifyThreads |= (J3dThread.UPDATE_BEHAVIOR |
J3dThread.SOUND_SCHEDULER);
universe.removeViewPlatform(this);
}
diff --git a/src/classes/share/javax/media/j3d/ViewSpecificGroup.java b/src/classes/share/javax/media/j3d/ViewSpecificGroup.java
index e6ba636..63cbeb3 100644
--- a/src/classes/share/javax/media/j3d/ViewSpecificGroup.java
+++ b/src/classes/share/javax/media/j3d/ViewSpecificGroup.java
@@ -100,7 +100,7 @@ public class ViewSpecificGroup extends Group {
*/
public ViewSpecificGroup() {
// set default read capabilities
- setDefaultReadCapabilities(readCapabilities);
+ setDefaultReadCapabilities(readCapabilities);
}
@@ -184,9 +184,9 @@ public class ViewSpecificGroup extends Group {
if(!this.getCapability(ALLOW_VIEW_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("ViewSpecificGroup1"));
((ViewSpecificGroupRetained)this.retained).removeView(index);
-
+
}
-
+
/**
* Returns an enumeration of this ViewSpecificGroup node's list
@@ -220,7 +220,7 @@ public class ViewSpecificGroup extends Group {
((ViewSpecificGroupRetained)this.retained).addView(view);
}
-
+
/**
* Returns the number of View objects in this node's list of views.
* If this number is 0, then the list of views is empty and
diff --git a/src/classes/share/javax/media/j3d/ViewSpecificGroupRetained.java b/src/classes/share/javax/media/j3d/ViewSpecificGroupRetained.java
index beecd6f..6e8c54f 100644
--- a/src/classes/share/javax/media/j3d/ViewSpecificGroupRetained.java
+++ b/src/classes/share/javax/media/j3d/ViewSpecificGroupRetained.java
@@ -43,10 +43,10 @@ class ViewSpecificGroupRetained extends GroupRetained {
// Used by leaf objects particularly GAs
// Updated in a MT Safe manner and also used by RenderBin
- ArrayList cachedViewList = new ArrayList();
+ ArrayList cachedViewList = new ArrayList();
// The object that contains the dynamic HashKey - a string type object
- // Used in scoping
+ // Used in scoping
HashKey tempKey = new HashKey(250);
// ArrayList of Integer indices
@@ -56,7 +56,7 @@ class ViewSpecificGroupRetained extends GroupRetained {
static final int SET_VIEW = 0x1;
static final int ADD_VIEW = 0x2;
static final int REMOVE_VIEW = 0x4;
-
+
// Construct retained object
ViewSpecificGroupRetained() {
this.nodeType = NodeRetained.VIEWSPECIFICGROUP;
@@ -113,7 +113,7 @@ class ViewSpecificGroupRetained extends GroupRetained {
}
else {
ArrayList parentList = (ArrayList)parentLists.get(0);
-
+
// If the parentList contains this view or if this is the
// first VSG then ..
if (parentList == null || parentList.contains(view)) {
@@ -137,7 +137,7 @@ class ViewSpecificGroupRetained extends GroupRetained {
for (int n = 0; n < addLeafList.size(); n++) {
System.err.println("n = "+n+" addLeafList = "+addLeafList.get(n));
}
- */
+ */
J3dMessage message = new J3dMessage();
message.type = J3dMessage.VIEWSPECIFICGROUP_CHANGED;
@@ -155,7 +155,7 @@ class ViewSpecificGroupRetained extends GroupRetained {
}
}
-
+
void setView(View view, int index) {
int i;
@@ -165,7 +165,7 @@ class ViewSpecificGroupRetained extends GroupRetained {
if (oldView == view)
return;
-
+
apiViewList.set(index, view);
if (source.isLive()) {
// Gather all affected leaf nodes and send a message to
@@ -188,19 +188,19 @@ class ViewSpecificGroupRetained extends GroupRetained {
objAry[4] = oldView;
objAry[5] = removeVsgList;
objAry[6] = removeLeafList;
-
+
HashKey key = localToVworldKeys[k];
if (oldView != null && (parentList == null || parentList.contains(oldView))) {
removeVsgList.add(this);
removeKeyList[0] = k;
- objAry[7] = super.processViewSpecificInfo(REMOVE_VIEW, (HashKey)key,
+ objAry[7] = super.processViewSpecificInfo(REMOVE_VIEW, (HashKey)key,
oldView, removeVsgList, removeKeyList, removeLeafList);
}
-
+
if (view != null && (parentList == null || parentList.contains(view))) {
addVsgList.add(this);
addKeyList[0] = k;
- objAry[3] = super.processViewSpecificInfo(ADD_VIEW, (HashKey)key,
+ objAry[3] = super.processViewSpecificInfo(ADD_VIEW, (HashKey)key,
view, addVsgList, addKeyList, addLeafList);
}
J3dMessage message = new J3dMessage();
@@ -239,14 +239,14 @@ class ViewSpecificGroupRetained extends GroupRetained {
if (oldView != null && (parentList == null || parentList.contains(oldView))) {
removeVsgList.add(this);
removeKeyList[0] = 0;
- objAry[7] = super.processViewSpecificInfo(REMOVE_VIEW, (HashKey)tempKey,
+ objAry[7] = super.processViewSpecificInfo(REMOVE_VIEW, (HashKey)tempKey,
oldView, removeVsgList, removeKeyList, removeLeafList);
}
if (view != null && (parentList == null || parentList.contains(view))) {
tempKey.reset();
addVsgList.add(this);
addKeyList[0] = 0;
- objAry[3] = super.processViewSpecificInfo(ADD_VIEW, (HashKey)tempKey,
+ objAry[3] = super.processViewSpecificInfo(ADD_VIEW, (HashKey)tempKey,
view, addVsgList, addKeyList, addLeafList);
}
J3dMessage message = new J3dMessage();
@@ -255,7 +255,7 @@ class ViewSpecificGroupRetained extends GroupRetained {
J3dThread.UPDATE_RENDER |
J3dThread.UPDATE_SOUND|
J3dThread.SOUND_SCHEDULER);
-
+
message.universe = universe;
message.args[0] = mtype;
message.args[1] = objAry;
@@ -264,23 +264,23 @@ class ViewSpecificGroupRetained extends GroupRetained {
}
-
+
}
int[] processViewSpecificInfo(int mode, HashKey key, View v, ArrayList vsgList, int[] keyList, ArrayList leaflist) {
int hkIndex = 0;
Integer hashInt = null;
int[] newKeyList = null;
- // Get the intersection of the viewList with this view,
+ // Get the intersection of the viewList with this view,
if (source.isLive()) {
if (inSharedGroup) {
hkIndex = key.equals(localToVworldKeys, 0, localToVworldKeys.length);
}
-
+
if (mode == ADD_VIEW) {
ArrayList parentList = (ArrayList)parentLists.get(hkIndex);
- parentList.add(v);
+ parentList.add(v);
}
else if (mode == REMOVE_VIEW) {
ArrayList parentList = (ArrayList)parentLists.get(hkIndex);
@@ -372,7 +372,7 @@ class ViewSpecificGroupRetained extends GroupRetained {
}
else {
ArrayList parentList = (ArrayList)parentLists.get(0);
-
+
// If the parentList contains this view or if this is the
// first VSG then ..
if (parentList == null || parentList.contains(view)) {
@@ -396,7 +396,7 @@ class ViewSpecificGroupRetained extends GroupRetained {
for (int n = 0; n < addLeafList.size(); n++) {
System.err.println("n = "+n+" addLeafList = "+addLeafList.get(n));
}
- */
+ */
J3dMessage message = new J3dMessage();
message.type = J3dMessage.VIEWSPECIFICGROUP_CHANGED;
@@ -432,12 +432,12 @@ class ViewSpecificGroupRetained extends GroupRetained {
ArrayList removeVsgList = new ArrayList();
ArrayList removeLeafList = new ArrayList();
int[] removeKeyList = new int[10];
-
+
objAry[0] = v;
objAry[1] = removeVsgList;
objAry[2] = removeLeafList;
HashKey key = localToVworldKeys[k];
-
+
removeVsgList.add(this);
removeKeyList[0] = k;
@@ -462,7 +462,7 @@ class ViewSpecificGroupRetained extends GroupRetained {
}
else {
ArrayList parentList = (ArrayList)parentLists.get(0);
-
+
// If the parentList contains this view or if this is the
// first VSG then ..
if (parentList == null || parentList.contains(v)) {
@@ -476,7 +476,7 @@ class ViewSpecificGroupRetained extends GroupRetained {
objAry[2] = removeLeafList;
removeVsgList.add(this);
removeKeyList[0] = 0;
-
+
tempKey.reset();
objAry[3] = super.processViewSpecificInfo(REMOVE_VIEW,
(HashKey)tempKey, v,
@@ -518,7 +518,7 @@ class ViewSpecificGroupRetained extends GroupRetained {
int indexOfView(View view) {
return apiViewList.indexOf(view);
}
-
+
void removeView(View view) {
removeView(apiViewList.indexOf(view));
}
@@ -529,7 +529,7 @@ class ViewSpecificGroupRetained extends GroupRetained {
removeView(0);
}
}
-
+
void compile(CompileState compState) {
super.compile(compState);
@@ -538,7 +538,7 @@ class ViewSpecificGroupRetained extends GroupRetained {
// XXXX: complete this
}
-
+
void setLive(SetLiveState s) {
if (inBackgroundGroup) {
throw new
@@ -556,7 +556,7 @@ class ViewSpecificGroupRetained extends GroupRetained {
}
super.setLive(s);
s.viewLists = savedViewList;
-
+
}
void clearLive(SetLiveState s) {
@@ -625,7 +625,7 @@ class ViewSpecificGroupRetained extends GroupRetained {
// Must be in reverse, to preserve right indexing.
for (i = s.keys.length-1; i >= 0; i--) {
index = s.keys[i].equals(localToVworldKeys, 0, localToVworldKeys.length);
- if(index >= 0) {
+ if(index >= 0) {
s.changedViewGroup.add(this);
s.keyList[s.changedViewGroup.size() -1] = index;
parentLists.remove(index);
@@ -633,10 +633,10 @@ class ViewSpecificGroupRetained extends GroupRetained {
}
}
s.viewLists =viewLists;
- super.removeNodeData(s);
+ super.removeNodeData(s);
}
-
- void updateCachedInformation(int component, View view, int index ) {
+
+ void updateCachedInformation(int component, View view, int index ) {
ArrayList list = (ArrayList) cachedViewList.get(index);
/*
@@ -697,8 +697,8 @@ class ViewSpecificGroupRetained extends GroupRetained {
}
// Make the VSG's viewLists as the relavant one for its children
s.viewLists = viewLists;
-
- }
+
+ }
void setAuxData(SetLiveState s, int index, int hkIndex) {
ArrayList vl;
@@ -747,7 +747,7 @@ class ViewSpecificGroupRetained extends GroupRetained {
else {
parentLists.add(hkIndex, null);
}
-
+
viewLists.add(hkIndex,vl);
s.changedViewGroup.add(this);
s.changedViewList.add(vl);
@@ -757,8 +757,8 @@ class ViewSpecificGroupRetained extends GroupRetained {
else {
s.keyList[s.changedViewGroup.size() -1] = 0;
}
-
-
+
+
}
diff --git a/src/classes/share/javax/media/j3d/VirtualUniverse.java b/src/classes/share/javax/media/j3d/VirtualUniverse.java
index 67c75c3..e7e6ae9 100644
--- a/src/classes/share/javax/media/j3d/VirtualUniverse.java
+++ b/src/classes/share/javax/media/j3d/VirtualUniverse.java
@@ -127,7 +127,7 @@ public class VirtualUniverse extends Object {
// This is a global counter for node id's.
long nodeIdCount = 0;
-
+
// This is a global counter for view id's.
int viewIdCount = 0;
@@ -206,7 +206,7 @@ public class VirtualUniverse extends Object {
initMCStructure();
}
-
+
void initMCStructure() {
if (geometryStructure != null) {
geometryStructure.cleanup();
@@ -341,7 +341,7 @@ public class VirtualUniverse extends Object {
if (locale.getVirtualUniverse() != this) {
throw new IllegalArgumentException(J3dI18N.getString("VirtualUniverse0"));
}
-
+
listOfLocales.removeElement(locale);
locale.removeFromUniverse();
if (isEmpty()) {
@@ -391,7 +391,7 @@ public class VirtualUniverse extends Object {
/**
* Returns the enumeration object of all locales in this virtual universe.
- * @return the enumeration object
+ * @return the enumeration object
*/
public Enumeration getAllLocales() {
return this.listOfLocales.elements();
@@ -623,7 +623,7 @@ public class VirtualUniverse extends Object {
// BUG 4181362
String getNodeId() {
String str;
-
+
if (nodeIdFreeList.size() == 0) {
str = Long.toString(nodeIdCount);
nodeIdCount++;
@@ -712,7 +712,7 @@ public class VirtualUniverse extends Object {
if (vps != null) {
for (int i=0; i