Java Doc for ConeSound.java in  » 6.0-JDK-Modules » java-3d » javax » media » j3d » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » java 3d » javax.media.j3d 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.media.j3d.SceneGraphObject
      javax.media.j3d.Node
         javax.media.j3d.Leaf
            javax.media.j3d.Sound
               javax.media.j3d.PointSound
                  javax.media.j3d.ConeSound

ConeSound
public class ConeSound extends PointSound (Code)
The ConeSound node object defines a PointSound node whose sound source is directed along a specific vector in space. A ConeSound source is attenuated 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 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.) This node has the same attributes as a PointSound node with the addition of a 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 radians from the axis) specifies the slope of these additional attenuation values.

Distance Gain attuation

    A cone sound node can have one or two distance attenuation arrays. If none are set, no distance gain attenuation is performed (equivalent to using a distance gain of 1.0 for all distances). If only one distance attenuation array is set, sphere attenuation is assumed. If both a front and back distance attenuation are set, elliptical attenuation regions are defined.

    Use PointSound setDistanceGain() method to set the front distance 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 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 the frontDistance[i] gain values.

    Gain scale factors are 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 listener to the sound source.

    The getDistanceGainLength method defined for PointSound returns the length of the all distance gain attenuation arrays, including the back distance gain arrays. Arrays passed into getDistanceGain methods should all be at least this size.

Direction Methods

    This value is the sound source's direction vector. It is the axis from which angular distance is measured.

Angular Attenuation

    Besides sound (linear) distance attenuation a ConeSound can optionally define angular gain and filter attenuation.

    This attenuation is defined as a triple of (angular distance, gain-scale-factor, filter). The distance is measured as the angle in radians between the ConeSound's direction vector and the vector from the sound source position to the listener. Both the gain scale factor and filter applied to the sound source is the linear interpolation of values between the distance value range that includes the angular distance from the sound source axis.

    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).

    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 gain scale factor and first filter are applied to the sound source. This creates a conical region around the listener within which the sound is uniformly attenuated by first gain and first filter in the array.

    If the distance from the listener-sound-position vector and the sound's direction vector is greater than the last distance in the array, the last gain scale factor and last filter are applied to the sound source.

    Distance elements in this array of points is a monotonically-increasing set of floating point numbers measured from 0 to p radians. Gain scale factors elements in this list of points can be any 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. The filter (for now) is a single simple frequency cutoff value.

    The getAngularAttenuationArrayLength method returns the length of the angular attenuation arrays. Arrays passed into getAngularAttenuation methods should all be at least this size.



Field Summary
final public static  intALLOW_ANGULAR_ATTENUATION_READ
     Specifies that this ConeSound allows access to its object's cone params information.
final public static  intALLOW_ANGULAR_ATTENUATION_WRITE
     Specifies that this ConeSound allows writing to its object's cone params information.
final public static  intALLOW_DIRECTION_READ
     Specifies that this ConeSound allows access to its object's direction information.
final public static  intALLOW_DIRECTION_WRITE
     Specifies that this ConeSound allows writing to its object's direction information.

Constructor Summary
public  ConeSound()
     Constructs and initializes a new ConeSound node using default parameters.
public  ConeSound(MediaContainer soundData, float initialGain, Point3f position, Vector3f direction)
     Constructs a ConeSound node object using only the provided parameter values for sound, overall initial gain, position, and direction.
public  ConeSound(MediaContainer soundData, float initialGain, float posX, float posY, float posZ, float dirX, float dirY, float dirZ)
     Constructs a ConeSound node object using only the provided parameter values for sound, overall initial gain, position, and direction.
public  ConeSound(MediaContainer soundData, float initialGain, int loopCount, boolean release, boolean continuous, boolean enable, Bounds region, float priority, Point3f position, Point2f[] frontDistanceAttenuation, Point2f[] backDistanceAttenuation, Vector3f direction)
     Constructs a ConeSound node object using all the provided PointSound parameter values.
public  ConeSound(MediaContainer soundData, float initialGain, int loopCount, boolean release, boolean continuous, boolean enable, Bounds region, float priority, float posX, float posY, float posZ, float[] frontDistance, float[] frontDistanceGain, float[] backDistance, float[] backDistanceGain, float dirX, float dirY, float dirZ)
     Constructs a ConeSound node object using the provided parameter values. 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 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.
public  ConeSound(MediaContainer soundData, float initialGain, int loopCount, boolean release, boolean continuous, boolean enable, Bounds region, float priority, Point3f position, Point2f[] distanceAttenuation, Vector3f direction, Point3f[] angularAttenuation)
     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.
public  ConeSound(MediaContainer soundData, float initialGain, int loopCount, boolean release, boolean continuous, boolean enable, Bounds region, float priority, float posX, float posY, float posZ, float[] distance, float[] distanceGain, float dirX, float dirY, float dirZ, float[] angle, float[] angularGain, float[] frequencyCutoff)
     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. This form uses individual float parameters for elements of position, direction, distanceAttenuation array, and angularAttenuation array. It also accepts separate arrays for the distance and gain scale factors 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.
public  ConeSound(MediaContainer soundData, float initialGain, int loopCount, boolean release, boolean continuous, boolean enable, Bounds region, float priority, Point3f position, Point2f[] frontDistanceAttenuation, Point2f[] backDistanceAttenuation, Vector3f direction, Point3f[] angularAttenuation)
     Constructs and initializes a new Cone Sound node explicitly setting all PointSound and ConeSound fields as arguments: the PointSound position, front and back distance attenuation Point2f array, and ConeSound direction vector and Point3f angular attenuation.
public  ConeSound(MediaContainer soundData, float initialGain, int loopCount, boolean release, boolean continuous, boolean enable, Bounds region, float priority, float posX, float posY, float posZ, float[] frontDistance, float[] frontDistanceGain, float[] backDistance, float[] backDistanceGain, float dirX, float dirY, float dirZ, float[] angle, float[] angularGain, float[] frequencyCutoff)
     Constructs and initializes a new Cone Sound node explicitly setting all PointSound and ConeSound fields as arguments but all the vector and point arguments are broken into individual float array components.

Method Summary
public  NodecloneNode(boolean forceDuplicate)
     Creates a new instance of the node.
 voidcreateRetained()
     Creates the retained mode ConeSoundRetained object that this ConeSound object will point to.
 voidduplicateAttributes(Node originalNode, boolean forceDuplicate)
     Copies all ConeSound information from originalNode into the current node.
public  voidduplicateNode(Node originalNode, boolean forceDuplicate)
     Copies all node information from originalNode into the current node.
public  voidgetAngularAttenuation(Point3f[] attenuation)
     Copies the array of attenuation values from this sound, including gain and filter, into the specified array.
public  voidgetAngularAttenuation(float[] distance, float[] gain, float[] filter)
     Copies the array of attenuation values from this sound, including gain and filter, into the separate arrays.
public  intgetAngularAttenuationLength()
     Retrieves angular attenuation array length.
public  voidgetDirection(Vector3f direction)
     Retrieves this sound's direction and places it in the vector provided.
public  voidgetDistanceGain(Point2f[] frontAttenuation, Point2f[] backAttenuation)
     Gets this sound's elliptical distance attenuation.
public  voidgetDistanceGain(float[] frontDistance, float[] frontGain, float[] backDistance, float[] backGain)
     Gets this sound's elliptical distance gain attenuation values in separate arrays.
public  voidsetAngularAttenuation(Point2f[] attenuation)
     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.
public  voidsetAngularAttenuation(Point3f[] attenuation)
     In the second form of setAngularAttenuation, an array of all three values is supplied.
public  voidsetAngularAttenuation(float[] distance, float[] gain, float[] filter)
     Sets angular attenuation including gain and filter using separate arrays. The third form of setAngularAttenuation accepts three separate arrays for these angular attenuation values.
public  voidsetBackDistanceGain(Point2f[] attenuation)
     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.
public  voidsetBackDistanceGain(float[] distance, float[] gain)
     Sets this sound's back distance gain attenuation as separate arrays.
public  voidsetDirection(Vector3f direction)
     Sets this sound's direction from the vector provided.
public  voidsetDirection(float x, float y, float z)
     Sets this sound's direction from the three values provided.
public  voidsetDistanceGain(Point2f[] frontAttenuation, Point2f[] backAttenuation)
     Sets this sound's distance gain elliptical attenuation - where gain scale factor is applied to sound based on distance listener is from sound source.
public  voidsetDistanceGain(float[] frontDistance, float[] frontGain, float[] backDistance, float[] backGain)
     Sets this sound's distance gain attenuation as an array of Point2fs.

Field Detail
ALLOW_ANGULAR_ATTENUATION_READ
final public static int ALLOW_ANGULAR_ATTENUATION_READ(Code)
Specifies that this ConeSound allows access to its object's cone params information.



ALLOW_ANGULAR_ATTENUATION_WRITE
final public static int ALLOW_ANGULAR_ATTENUATION_WRITE(Code)
Specifies that this ConeSound allows writing to its object's cone params information.



ALLOW_DIRECTION_READ
final public static int ALLOW_DIRECTION_READ(Code)
Specifies that this ConeSound allows access to its object's direction information.



ALLOW_DIRECTION_WRITE
final public static int ALLOW_DIRECTION_WRITE(Code)
Specifies that this ConeSound allows writing to its object's direction information.




Constructor Detail
ConeSound
public ConeSound()(Code)
Constructs and initializes a new ConeSound node using default parameters. The following default values are used:
    Direction vector: (0.0, 0.0, 1.0)
    Angular attenuation: ((0.0, 1.0, Sound.NO_FILTER),(p/2, 0.0, Sound.NO_FILTER))



ConeSound
public ConeSound(MediaContainer soundData, float initialGain, Point3f position, Vector3f direction)(Code)
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 Point3f as input for its position and Vector3f for direction.
Parameters:
  soundData - sound source data associated with this node
Parameters:
  initialGain - amplitude scale factor applied to sound
Parameters:
  position - 3D location of source
Parameters:
  direction - 3D vector defining cone's axis



ConeSound
public ConeSound(MediaContainer soundData, float initialGain, float posX, float posY, float posZ, float dirX, float dirY, float dirZ)(Code)
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 direction vectors.
Parameters:
  soundData - sound source data
Parameters:
  initialGain - amplitude scale factor applied to sound
Parameters:
  posX - x coordinate of location of source
Parameters:
  posY - y coordinate of location of source
Parameters:
  posZ - z coordinate of location of source
Parameters:
  dirX - x coordinate cones' axii vector
Parameters:
  dirY - y coordinate cones' axii vector
Parameters:
  dirZ - z coordinate cones' axii vector



ConeSound
public ConeSound(MediaContainer soundData, float initialGain, int loopCount, boolean release, boolean continuous, boolean enable, Bounds region, float priority, Point3f position, Point2f[] frontDistanceAttenuation, Point2f[] backDistanceAttenuation, Vector3f direction)(Code)
Constructs a ConeSound node object using all the provided PointSound parameter values. This form uses points or vectors as input for its position, direction, and front/back distance attenuation arrays.

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 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.
Parameters:
  soundData - sound source data associated with this node
Parameters:
  initialGain - amplitude scale factor applied to sound
Parameters:
  loopCount - number of times sound is looped
Parameters:
  release - flag denoting playing sound to end
Parameters:
  continuous - denotes that sound silently plays when disabled
Parameters:
  enable - sound switched on/off
Parameters:
  region - scheduling bounds
Parameters:
  priority - playback ranking value
Parameters:
  position - 3D location of source
Parameters:
  frontDistanceAttenuation - array of (distance,gain) pairs controlling attenuation values along the positive direction axis
Parameters:
  backDistanceAttenuation - array of (distance,gain) pairs controlling attenuation values along the negative direction axis
Parameters:
  direction - vector defining cones' axii




ConeSound
public ConeSound(MediaContainer soundData, float initialGain, int loopCount, boolean release, boolean continuous, boolean enable, Bounds region, float priority, float posX, float posY, float posZ, float[] frontDistance, float[] frontDistanceGain, float[] backDistance, float[] backDistanceGain, float dirX, float dirY, float dirZ)(Code)
Constructs a ConeSound node object using the provided parameter values. 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 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 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.
Parameters:
  soundData - sound source data associated with this node
Parameters:
  initialGain - amplitude scale factor applied to sound
Parameters:
  loopCount - number of times sound is looped
Parameters:
  release - flag denoting playing sound to end
Parameters:
  continuous - denotes that sound silently plays when disabled
Parameters:
  enable - sound switched on/off
Parameters:
  region - scheduling bounds
Parameters:
  priority - playback ranking value
Parameters:
  posX - x coordinate of location of source
Parameters:
  posY - y coordinate of location of source
Parameters:
  posZ - z coordinate of location of source
Parameters:
  frontDistance - array of front distance values used for attenuation
Parameters:
  frontDistanceGain - array of front gain scale factors used for attenuation
Parameters:
  backDistance - array of back distance values used for attenuation
Parameters:
  backDistanceGain - array of back gain scale factors used for attenuation
Parameters:
  dirX - x coordinate cones' axii vector
Parameters:
  dirY - y coordinate cones' axii vector
Parameters:
  dirZ - z coordinate cones' axii vector



ConeSound
public ConeSound(MediaContainer soundData, float initialGain, int loopCount, boolean release, boolean continuous, boolean enable, Bounds region, float priority, Point3f position, Point2f[] distanceAttenuation, Vector3f direction, Point3f[] angularAttenuation)(Code)
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. 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 values. Each Point2f in the distanceAttenuation array contains a distance and a gain scale factor. Each Point3f in the angularAttenuation array contains an angular distance, a gain scale factor, and a filtering value (which is currently defined as a simple cutoff frequency).
Parameters:
  soundData - sound source data associated with this node
Parameters:
  initialGain - amplitude scale factor applied to sound
Parameters:
  loopCount - number of times sound is looped
Parameters:
  release - flag denoting playing sound to end
Parameters:
  continuous - denotes that sound silently plays when disabled
Parameters:
  enable - sound switched on/off
Parameters:
  region - scheduling bounds
Parameters:
  priority - playback ranking value
Parameters:
  position - 3D location of source
Parameters:
  distanceAttenuation - array of (distance,gain) pairs controlling attenuation values along the positive direction axis
Parameters:
  direction - vector defining cones' axii
Parameters:
  angularAttenuation - array of tuples defining angular gain/filtering



ConeSound
public ConeSound(MediaContainer soundData, float initialGain, int loopCount, boolean release, boolean continuous, boolean enable, Bounds region, float priority, float posX, float posY, float posZ, float[] distance, float[] distanceGain, float dirX, float dirY, float dirZ, float[] angle, float[] angularGain, float[] frequencyCutoff)(Code)
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. This form uses individual float parameters for elements of position, direction, distanceAttenuation array, and angularAttenuation array. It also accepts separate arrays for the distance and gain scale factors 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 setAngularAttenuation ConeSound method for details on how the separate angularDistance, angularGain, and filter arrays are interpreted.
Parameters:
  soundData - sound source data associated with this node
Parameters:
  initialGain - amplitude scale factor applied to sound
Parameters:
  loopCount - number of times sound is looped
Parameters:
  release - flag denoting playing sound to end
Parameters:
  continuous - denotes that sound silently plays when disabled
Parameters:
  enable - sound switched on/off
Parameters:
  region - scheduling bounds
Parameters:
  priority - playback ranking value
Parameters:
  posX - x coordinate of location of source
Parameters:
  posY - y coordinate of location of source
Parameters:
  posZ - z coordinate of location of source
Parameters:
  distance - array of front distance values used for attenuation
Parameters:
  distanceGain - array of front gain scale factors used for attenuation
Parameters:
  dirX - x coordinate cones' axii vector
Parameters:
  dirY - y coordinate cones' axii vector
Parameters:
  dirZ - z coordinate cones' axii vector
Parameters:
  angle - array of angle radians for angularAttenuation
Parameters:
  angularGain - array of gain scale factors for angularAttenuation
Parameters:
  frequencyCutoff - array of lowpass filter values in Hertz



ConeSound
public ConeSound(MediaContainer soundData, float initialGain, int loopCount, boolean release, boolean continuous, boolean enable, Bounds region, float priority, Point3f position, Point2f[] frontDistanceAttenuation, Point2f[] backDistanceAttenuation, Vector3f direction, Point3f[] angularAttenuation)(Code)
Constructs and initializes a new Cone Sound node explicitly setting all PointSound and ConeSound fields as arguments: the PointSound position, front and back distance attenuation Point2f array, and ConeSound direction vector and Point3f angular attenuation.
Parameters:
  soundData - sound source data associated with this node
Parameters:
  initialGain - amplitude scale factor applied to sound
Parameters:
  loopCount - number of times sound is looped
Parameters:
  release - flag denoting playing sound to end
Parameters:
  continuous - denotes that sound silently plays when disabled
Parameters:
  enable - sound switched on/off
Parameters:
  region - scheduling bounds
Parameters:
  priority - playback ranking value
Parameters:
  position - 3D location of source
Parameters:
  frontDistanceAttenuation - array of (distance,gain) pairs controlling attenuation values along the positive direction axis
Parameters:
  backDistanceAttenuation - array of (distance,gain) pairs controlling attenuation values along the negative direction axis
Parameters:
  direction - vector defining cones' axii
Parameters:
  angularAttenuation - array of tuples defining angular gain/filtering



ConeSound
public ConeSound(MediaContainer soundData, float initialGain, int loopCount, boolean release, boolean continuous, boolean enable, Bounds region, float priority, float posX, float posY, float posZ, float[] frontDistance, float[] frontDistanceGain, float[] backDistance, float[] backDistanceGain, float dirX, float dirY, float dirZ, float[] angle, float[] angularGain, float[] frequencyCutoff)(Code)
Constructs and initializes a new Cone Sound node explicitly setting all PointSound and ConeSound fields as arguments but all the vector and point arguments are broken into individual float array components.
Parameters:
  soundData - sound source data associated with this node
Parameters:
  initialGain - amplitude scale factor applied to sound
Parameters:
  loopCount - number of times sound is looped
Parameters:
  release - flag denoting playing sound to end
Parameters:
  continuous - denotes that sound silently plays when disabled
Parameters:
  enable - sound switched on/off
Parameters:
  region - scheduling bounds
Parameters:
  priority - playback ranking value
Parameters:
  posX - x coordinate of location of source
Parameters:
  posY - y coordinate of location of source
Parameters:
  posZ - z coordinate of location of source
Parameters:
  frontDistance - array of front distance values used for attenuation
Parameters:
  frontDistanceGain - array of front gain scale factors used for attenuation
Parameters:
  backDistance - array of back distance values used for attenuation
Parameters:
  backDistanceGain - array of back gain scale factors used for attenuation
Parameters:
  dirX - x coordinate cones' axii vector
Parameters:
  dirY - y coordinate cones' axii vector
Parameters:
  dirZ - z coordinate cones' axii vector
Parameters:
  angle - array of angle radians for angularAttenuation
Parameters:
  angularGain - array of gain scale factors for angularAttenuation
Parameters:
  frequencyCutoff - array of lowpass filter values in Hertz




Method Detail
cloneNode
public Node cloneNode(boolean forceDuplicate)(Code)
Creates a new instance of the node. This routine is called by cloneTree to duplicate the current node.
Parameters:
  forceDuplicate - when set to true, causes theduplicateOnCloneTree flag to be ignored. Whenfalse, the value of each node'sduplicateOnCloneTree variable determines whetherNodeComponent data is duplicated or copied.
See Also:   Node.cloneTree
See Also:   Node.cloneNode
See Also:   Node.duplicateNode
See Also:   NodeComponent.setDuplicateOnCloneTree



createRetained
void createRetained()(Code)
Creates the retained mode ConeSoundRetained object that this ConeSound object will point to.



duplicateAttributes
void duplicateAttributes(Node originalNode, boolean forceDuplicate)(Code)
Copies all ConeSound information from originalNode into the current node. This method is called from the cloneNode method which is, in turn, called by the cloneTree method.


Parameters:
  originalNode - the original node to duplicate.
Parameters:
  forceDuplicate - when set to true, causes theduplicateOnCloneTree flag to be ignored. Whenfalse, the value of each node'sduplicateOnCloneTree variable determines whetherNodeComponent data is duplicated or copied.
exception:
  RestrictedAccessException - if this object is part of a liveor compiled scenegraph.
See Also:   Node.duplicateNode
See Also:   Node.cloneTree
See Also:   NodeComponent.setDuplicateOnCloneTree




duplicateNode
public void duplicateNode(Node originalNode, boolean forceDuplicate)(Code)
Copies all node information from originalNode into the current node. This method is called from the cloneNode method which is, in turn, called by the cloneTree method.

For any NodeComponent objects contained by the object being duplicated, each NodeComponent object's duplicateOnCloneTree value is used to determine whether the NodeComponent should be duplicated in the new node or if just a reference to the current node should be placed in the new node. This flag can be overridden by setting the forceDuplicate parameter in the cloneTree method to true.
NOTE: Applications should not call this method directly. It should only be called by the cloneNode method.
Parameters:
  originalNode - the original node to duplicate.
Parameters:
  forceDuplicate - when set to true, causes theduplicateOnCloneTree flag to be ignored. Whenfalse, the value of each node'sduplicateOnCloneTree variable determines whetherNodeComponent data is duplicated or copied.
exception:
  ClassCastException - if originalNode is not an instance of ConeSound
See Also:   Node.cloneTree
See Also:   Node.cloneNode
See Also:   NodeComponent.setDuplicateOnCloneTree




getAngularAttenuation
public void getAngularAttenuation(Point3f[] attenuation)(Code)
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.
Parameters:
  attenuation - the array to receive the attenuation values applied to gain when listener is between cones
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



getAngularAttenuation
public void getAngularAttenuation(float[] distance, float[] gain, float[] filter)(Code)
Copies the array of attenuation values from this sound, including gain and filter, into the separate arrays. The arrays must be large enough to hold all of the values.
Parameters:
  distance - array containing angular distance
Parameters:
  gain - array containing angular gain attenuation
Parameters:
  filter - array containing angular low-pass frequency cutoff values
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



getAngularAttenuationLength
public int getAngularAttenuationLength()(Code)
Retrieves angular attenuation array length. All arrays are forced to same size.
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



getDirection
public void getDirection(Vector3f direction)(Code)
Retrieves this sound's direction and places it in the vector provided.
Parameters:
  direction - axis of cones; 'direction' of sound
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



getDistanceGain
public void getDistanceGain(Point2f[] frontAttenuation, Point2f[] backAttenuation)(Code)
Gets this sound's elliptical distance attenuation. The attenuation values are copied into the specified arrays. The arrays must be large enough to hold all of the forward distances and backward distances attenuation values. 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.
Parameters:
  frontAttenuation - arrays containing forward distances attenuation pairs
Parameters:
  backAttenuation - arrays containing backward distances attenuation pairs
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



getDistanceGain
public void getDistanceGain(float[] frontDistance, float[] frontGain, float[] backDistance, float[] backGain)(Code)
Gets this sound's elliptical distance gain attenuation values in separate arrays. The arrays must be large enough to hold all of the values.
Parameters:
  frontDistance - array of float distances along the sound axis
Parameters:
  frontGain - array of non-negative scale factors associated with front distances
Parameters:
  backDistance - array of float negative distances along the sound axis
Parameters:
  backGain - array of non-negative scale factors associated with back distances
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



setAngularAttenuation
public void setAngularAttenuation(Point2f[] attenuation)(Code)
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.
Parameters:
  attenuation - array containing angular distance and gain
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



setAngularAttenuation
public void setAngularAttenuation(Point3f[] attenuation)(Code)
In the second form of setAngularAttenuation, an array of all three values is supplied.
Parameters:
  attenuation - array containing angular distance, gain, and filter
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



setAngularAttenuation
public void setAngularAttenuation(float[] distance, float[] gain, float[] filter)(Code)
Sets angular attenuation including gain and filter using separate arrays. The third form of setAngularAttenuation accepts three separate arrays for these angular attenuation values. These arrays should be of the same length. If the angularGain or filtering array length is greater than 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 angularDistance array.
Parameters:
  distance - array containing angular distance
Parameters:
  gain - array containing angular gain attenuation
Parameters:
  filter - array containing angular low-pass frequency cutoff values
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



setBackDistanceGain
public void setBackDistanceGain(Point2f[] attenuation)(Code)
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.
Parameters:
  attenuation - defined by pairs of (distance,gain-scale-factor)
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



setBackDistanceGain
public void setBackDistanceGain(float[] distance, float[] gain)(Code)
Sets this sound's back distance gain attenuation as separate arrays.
Parameters:
  distance - array of monotonically-increasing floats
Parameters:
  gain - array of non-negative scale factors
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



setDirection
public void setDirection(Vector3f direction)(Code)
Sets this sound's direction from the vector provided.
Parameters:
  direction - the new direction
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



setDirection
public void setDirection(float x, float y, float z)(Code)
Sets this sound's direction from the three values provided.
Parameters:
  x - the new x direction
Parameters:
  y - the new y direction
Parameters:
  z - the new z direction
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



setDistanceGain
public void setDistanceGain(Point2f[] frontAttenuation, Point2f[] backAttenuation)(Code)
Sets this sound's distance gain elliptical attenuation - where gain scale factor is applied to sound based on distance listener is from sound source.
Parameters:
  frontAttenuation - defined by pairs of (distance,gain-scale-factor)
Parameters:
  backAttenuation - defined by pairs of (distance,gain-scale-factor)
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



setDistanceGain
public void setDistanceGain(float[] frontDistance, float[] frontGain, float[] backDistance, float[] backGain)(Code)
Sets this sound's distance gain attenuation as an array of Point2fs.
Parameters:
  frontDistance - array of monotonically-increasing floats
Parameters:
  frontGain - array of non-negative scale factors
Parameters:
  backDistance - array of monotonically-increasing floats
Parameters:
  backGain - array of non-negative scale factors
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



Fields inherited from javax.media.j3d.PointSound
final public static int ALLOW_DISTANCE_GAIN_READ(Code)(Java Doc)
final public static int ALLOW_DISTANCE_GAIN_WRITE(Code)(Java Doc)
final public static int ALLOW_POSITION_READ(Code)(Java Doc)
final public static int ALLOW_POSITION_WRITE(Code)(Java Doc)

Methods inherited from javax.media.j3d.PointSound
public Node cloneNode(boolean forceDuplicate)(Code)(Java Doc)
void createRetained()(Code)(Java Doc)
void duplicateAttributes(Node originalNode, boolean forceDuplicate)(Code)(Java Doc)
public void duplicateNode(Node originalNode, boolean forceDuplicate)(Code)(Java Doc)
public void getDistanceGain(Point2f[] attenuation)(Code)(Java Doc)
public void getDistanceGain(float[] distance, float[] gain)(Code)(Java Doc)
public int getDistanceGainLength()(Code)(Java Doc)
public void getPosition(Point3f position)(Code)(Java Doc)
public void setDistanceGain(Point2f[] attenuation)(Code)(Java Doc)
public void setDistanceGain(float[] distance, float[] gain)(Code)(Java Doc)
public void setPosition(Point3f position)(Code)(Java Doc)
public void setPosition(float x, float y, float z)(Code)(Java Doc)

Fields inherited from javax.media.j3d.Sound
final public static int ALLOW_CHANNELS_USED_READ(Code)(Java Doc)
final public static int ALLOW_CONT_PLAY_READ(Code)(Java Doc)
final public static int ALLOW_CONT_PLAY_WRITE(Code)(Java Doc)
final public static int ALLOW_DURATION_READ(Code)(Java Doc)
final public static int ALLOW_ENABLE_READ(Code)(Java Doc)
final public static int ALLOW_ENABLE_WRITE(Code)(Java Doc)
final public static int ALLOW_INITIAL_GAIN_READ(Code)(Java Doc)
final public static int ALLOW_INITIAL_GAIN_WRITE(Code)(Java Doc)
final public static int ALLOW_IS_PLAYING_READ(Code)(Java Doc)
final public static int ALLOW_IS_READY_READ(Code)(Java Doc)
final public static int ALLOW_LOOP_READ(Code)(Java Doc)
final public static int ALLOW_LOOP_WRITE(Code)(Java Doc)
final public static int ALLOW_MUTE_READ(Code)(Java Doc)
final public static int ALLOW_MUTE_WRITE(Code)(Java Doc)
final public static int ALLOW_PAUSE_READ(Code)(Java Doc)
final public static int ALLOW_PAUSE_WRITE(Code)(Java Doc)
final public static int ALLOW_PRIORITY_READ(Code)(Java Doc)
final public static int ALLOW_PRIORITY_WRITE(Code)(Java Doc)
final public static int ALLOW_RATE_SCALE_FACTOR_READ(Code)(Java Doc)
final public static int ALLOW_RATE_SCALE_FACTOR_WRITE(Code)(Java Doc)
final public static int ALLOW_RELEASE_READ(Code)(Java Doc)
final public static int ALLOW_RELEASE_WRITE(Code)(Java Doc)
final public static int ALLOW_SCHEDULING_BOUNDS_READ(Code)(Java Doc)
final public static int ALLOW_SCHEDULING_BOUNDS_WRITE(Code)(Java Doc)
final public static int ALLOW_SOUND_DATA_READ(Code)(Java Doc)
final public static int ALLOW_SOUND_DATA_WRITE(Code)(Java Doc)
final public static int DURATION_UNKNOWN(Code)(Java Doc)
final public static int INFINITE_LOOPS(Code)(Java Doc)
final public static float NO_FILTER(Code)(Java Doc)

Methods inherited from javax.media.j3d.Sound
void duplicateAttributes(Node originalNode, boolean forceDuplicate)(Code)(Java Doc)
public boolean getContinuousEnable()(Code)(Java Doc)
public long getDuration()(Code)(Java Doc)
public boolean getEnable()(Code)(Java Doc)
public float getInitialGain()(Code)(Java Doc)
public int getLoop()(Code)(Java Doc)
public boolean getMute()(Code)(Java Doc)
public int getNumberOfChannelsUsed()(Code)(Java Doc)
public int getNumberOfChannelsUsed(View view)(Code)(Java Doc)
public boolean getPause()(Code)(Java Doc)
public float getPriority()(Code)(Java Doc)
public float getRateScaleFactor()(Code)(Java Doc)
public boolean getReleaseEnable()(Code)(Java Doc)
public BoundingLeaf getSchedulingBoundingLeaf()(Code)(Java Doc)
public Bounds getSchedulingBounds()(Code)(Java Doc)
public MediaContainer getSoundData()(Code)(Java Doc)
public boolean isPlaying()(Code)(Java Doc)
public boolean isPlaying(View view)(Code)(Java Doc)
public boolean isPlayingSilently()(Code)(Java Doc)
public boolean isPlayingSilently(View view)(Code)(Java Doc)
public boolean isReady()(Code)(Java Doc)
public boolean isReady(View view)(Code)(Java Doc)
public void setContinuousEnable(boolean state)(Code)(Java Doc)
public void setEnable(boolean state)(Code)(Java Doc)
public void setInitialGain(float amplitude)(Code)(Java Doc)
public void setLoop(int loopCount)(Code)(Java Doc)
public void setMute(boolean state)(Code)(Java Doc)
public void setPause(boolean state)(Code)(Java Doc)
public void setPriority(float priority)(Code)(Java Doc)
public void setRateScaleFactor(float scaleFactor)(Code)(Java Doc)
public void setReleaseEnable(boolean state)(Code)(Java Doc)
public void setSchedulingBoundingLeaf(BoundingLeaf region)(Code)(Java Doc)
public void setSchedulingBounds(Bounds region)(Code)(Java Doc)
public void setSoundData(MediaContainer soundData)(Code)(Java Doc)
public void updateNodeReferences(NodeReferenceTable referenceTable)(Code)(Java Doc)


Fields inherited from javax.media.j3d.Node
final public static int ALLOW_AUTO_COMPUTE_BOUNDS_READ(Code)(Java Doc)
final public static int ALLOW_AUTO_COMPUTE_BOUNDS_WRITE(Code)(Java Doc)
final public static int ALLOW_BOUNDS_READ(Code)(Java Doc)
final public static int ALLOW_BOUNDS_WRITE(Code)(Java Doc)
final public static int ALLOW_COLLIDABLE_READ(Code)(Java Doc)
final public static int ALLOW_COLLIDABLE_WRITE(Code)(Java Doc)
final public static int ALLOW_LOCALE_READ(Code)(Java Doc)
final public static int ALLOW_LOCAL_TO_VWORLD_READ(Code)(Java Doc)
final public static int ALLOW_PARENT_READ(Code)(Java Doc)
final public static int ALLOW_PICKABLE_READ(Code)(Java Doc)
final public static int ALLOW_PICKABLE_WRITE(Code)(Java Doc)
final public static int ENABLE_COLLISION_REPORTING(Code)(Java Doc)
final public static int ENABLE_PICK_REPORTING(Code)(Java Doc)

Methods inherited from javax.media.j3d.Node
final void checkDuplicateNode(Node originalNode, boolean forceDuplicate)(Code)(Java Doc)
void checkForCycle()(Code)(Java Doc)
public Node cloneNode(boolean forceDuplicate)(Code)(Java Doc)
public Node cloneTree()(Code)(Java Doc)
public Node cloneTree(boolean forceDuplicate)(Code)(Java Doc)
public Node cloneTree(boolean forceDuplicate, boolean allowDanglingReferences)(Code)(Java Doc)
public Node cloneTree(NodeReferenceTable referenceTable)(Code)(Java Doc)
public Node cloneTree(NodeReferenceTable referenceTable, boolean forceDuplicate)(Code)(Java Doc)
public Node cloneTree(NodeReferenceTable referenceTable, boolean forceDuplicate, boolean allowDanglingReferences)(Code)(Java Doc)
Node cloneTree(boolean forceDuplicate, Hashtable nodeHashtable)(Code)(Java Doc)
void duplicateAttributes(Node originalNode, boolean forceDuplicate)(Code)(Java Doc)
public void duplicateNode(Node originalNode, boolean forceDuplicate)(Code)(Java Doc)
public Bounds getBounds()(Code)(Java Doc)
public boolean getBoundsAutoCompute()(Code)(Java Doc)
public boolean getCollidable()(Code)(Java Doc)
public void getLocalToVworld(Transform3D t)(Code)(Java Doc)
public void getLocalToVworld(SceneGraphPath path, Transform3D t)(Code)(Java Doc)
public Locale getLocale()(Code)(Java Doc)
public Node getParent()(Code)(Java Doc)
public boolean getPickable()(Code)(Java Doc)
public void setBounds(Bounds bounds)(Code)(Java Doc)
public void setBoundsAutoCompute(boolean autoCompute)(Code)(Java Doc)
public void setCollidable(boolean collidable)(Code)(Java Doc)
public void setPickable(boolean pickable)(Code)(Java Doc)

Fields inherited from javax.media.j3d.SceneGraphObject
Hashtable nodeHashtable(Code)(Java Doc)
SceneGraphObjectRetained retained(Code)(Java Doc)

Methods inherited from javax.media.j3d.SceneGraphObject
final boolean capabilityBitsEmpty()(Code)(Java Doc)
final void checkForLiveOrCompiled()(Code)(Java Doc)
final public void clearCapability(int bit)(Code)(Java Doc)
final public void clearCapabilityIsFrequent(int bit)(Code)(Java Doc)
final void clearLive()(Code)(Java Doc)
void createRetained()(Code)(Java Doc)
protected void duplicateSceneGraphObject(SceneGraphObject originalNode)(Code)(Java Doc)
final public boolean getCapability(int bit)(Code)(Java Doc)
final public boolean getCapabilityIsFrequent(int bit)(Code)(Java Doc)
public String getName()(Code)(Java Doc)
String getNamePrefix()(Code)(Java Doc)
NodeComponent getNodeComponent(NodeComponent originalNodeComponent, boolean forceDuplicate, Hashtable hashtable)(Code)(Java Doc)
public Object getUserData()(Code)(Java Doc)
final public boolean isCompiled()(Code)(Java Doc)
final public boolean isLive()(Code)(Java Doc)
final boolean isLiveOrCompiled()(Code)(Java Doc)
final public void setCapability(int bit)(Code)(Java Doc)
final public void setCapabilityIsFrequent(int bit)(Code)(Java Doc)
final void setCompiled()(Code)(Java Doc)
void setDefaultReadCapabilities(int[] bits)(Code)(Java Doc)
final void setLive()(Code)(Java Doc)
public void setName(String name)(Code)(Java Doc)
public void setUserData(Object userData)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public void updateNodeReferences(NodeReferenceTable referenceTable)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.