< Zurück | Inhalt | Weiter >

From Helicopter.java


//Return the scheduling bounds for the Helicopter’s sound protected Bounds getSoundSchedulingBounds( boolean bCollide )

{

return new BoundingSphere( new Point3d(0,0,0), 20 );

}


image


The getSoundDistanceGain method returns an array of Point2f objects that define how the volume of the sound attenuates with distance. In the following example the sound is at 20 percent of its maximum intensity at 2 units distance and at 5 percent of maximum intensity at 20 units distance.

protected Point2f[] getSoundDistanceGain( boolean bCollide )

{

Point2f[] gainArray = new Point2f[2];


gainArray[0] = new Point2f( 2, 0.2f ); gainArray[1] = new Point2f( 20, 0.05f );


return gainArray;

}