public class Soundscape extends Leaf
The Soundscape application region, different from a Sound node's scheduling region, is used to select which Soundscape (and thus which aural attribute object) is to be applied to the sounds being rendered. This selection is based on the position of the ViewPlatform (i.e., the listener), not the position of the sound.
It will be common that multiple Soundscape regions are contained within a scene graph. For example, two Soundscape regions within a single space the listener can move about: a region with a large open area on the right, and a smaller more constricted, less reverberant area on the left. The rever- beration attributes for these two regions could be set to approximate their physical differences so that active sounds are rendered differently depending on which region the listener is in.
Modifier and Type | Field and Description |
---|---|
static int |
ALLOW_APPLICATION_BOUNDS_READ
For Soundscape component objects, specifies that this object
allows read access to its application bounds
|
static int |
ALLOW_APPLICATION_BOUNDS_WRITE
For Soundscape component objects, specifies that this object
allows write access to its application bounds
|
static int |
ALLOW_ATTRIBUTES_READ
For Soundscape component objects, specifies that this object
allows the reading of it's aural attributes information
|
static int |
ALLOW_ATTRIBUTES_WRITE
For Soundscape component objects, specifies that this object
allows the writing of it's aural attribute information
|
ALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_LOCALE_READ, ALLOW_PARENT_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING
Constructor and Description |
---|
Soundscape()
Constructs and initializes a new Sound node using following
defaults:
application region: null (no active region)
aural attributes: null (uses default aural attributes)
|
Soundscape(Bounds region,
AuralAttributes attributes)
Constructs and initializes a new Sound node using specified
parameters
|
Modifier and Type | Method and Description |
---|---|
Node |
cloneNode(boolean forceDuplicate)
Creates a new instance of the node.
|
void |
duplicateNode(Node originalNode,
boolean forceDuplicate)
Copies all node information from
originalNode into
the current node. |
BoundingLeaf |
getApplicationBoundingLeaf()
Retrieves the Soundscape node's application bounding leaf.
|
Bounds |
getApplicationBounds()
Retrieves the Soundscape node's application bounds.
|
AuralAttributes |
getAuralAttributes()
Retrieve reference of Aural Attributes
|
void |
setApplicationBoundingLeaf(BoundingLeaf region)
Set the Soundscape's application region to the specified bounding leaf.
|
void |
setApplicationBounds(Bounds region)
Set the Soundscape's application region to the specified bounds
specified in local coordinates of this leaf node.
|
void |
setAuralAttributes(AuralAttributes attributes)
Set a set of aural attributes for this Soundscape
|
void |
updateNodeReferences(NodeReferenceTable referenceTable)
Callback used to allow a node to check if any scene graph objects
referenced
by that node have been duplicated via a call to
cloneTree . |
cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, getBounds, getBoundsAutoCompute, getCollidable, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString
public static final int ALLOW_APPLICATION_BOUNDS_READ
public static final int ALLOW_APPLICATION_BOUNDS_WRITE
public static final int ALLOW_ATTRIBUTES_READ
public static final int ALLOW_ATTRIBUTES_WRITE
public Soundscape()
public Soundscape(Bounds region, AuralAttributes attributes)
region
- application regionattributes
- array of aural attribute component objectspublic void setApplicationBounds(Bounds region)
region
- the bounds that contains the Soundscape's new application
region.CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic Bounds getApplicationBounds()
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void setApplicationBoundingLeaf(BoundingLeaf region)
region
- the bounding leaf node used to specify the Soundscape
node's new application region.CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic BoundingLeaf getApplicationBoundingLeaf()
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void setAuralAttributes(AuralAttributes attributes)
attributes
- aural attributesCapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic AuralAttributes getAuralAttributes()
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic Node cloneNode(boolean forceDuplicate)
cloneTree
to duplicate the current node.cloneNode
in class Node
forceDuplicate
- when set to true
, causes the
duplicateOnCloneTree
flag to be ignored. When
false
, the value of each node's
duplicateOnCloneTree
variable determines whether
NodeComponent data is duplicated or copied.Node.cloneTree()
,
Node.cloneNode(boolean)
,
Node.duplicateNode(org.scijava.java3d.Node, boolean)
,
NodeComponent.setDuplicateOnCloneTree(boolean)
public void duplicateNode(Node originalNode, boolean forceDuplicate)
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.
duplicateNode
in class Node
originalNode
- the original node to duplicate.forceDuplicate
- when set to true
, causes the
duplicateOnCloneTree
flag to be ignored. When
false
, the value of each node's
duplicateOnCloneTree
variable determines whether
NodeComponent data is duplicated or copied.ClassCastException
- if originalNode is not an instance of
Soundscape
Node.cloneTree()
,
Node.cloneNode(boolean)
,
NodeComponent.setDuplicateOnCloneTree(boolean)
public void updateNodeReferences(NodeReferenceTable referenceTable)
cloneTree
.
This method is called by cloneTree
after all nodes in
the sub-graph have been duplicated. The cloned Leaf node's method
will be called and the Leaf node can then look up any object references
by using the getNewObjectReference
method found in the
NodeReferenceTable
object. If a match is found, a
reference to the corresponding object in the newly cloned sub-graph
is returned. If no corresponding reference is found, either a
DanglingReferenceException is thrown or a reference to the original
object is returned depending on the value of the
allowDanglingReferences
parameter passed in the
cloneTree
call.
NOTE: Applications should not call this method directly. It should only be called by the cloneTree method.
updateNodeReferences
in class SceneGraphObject
referenceTable
- a NodeReferenceTableObject that contains the
getNewObjectReference
method needed to search for
new object instances.NodeReferenceTable
,
Node.cloneTree()
,
DanglingReferenceException
Copyright © 2016–2022 SciJava. All rights reserved.