Top Description Inners Fields Constructors Methods
org.lwjgl.test.openal

public Class PositionTest

extends BasicTest
Class Inheritance
Imports
java.nio.FloatBuffer, .IntBuffer, org.lwjgl.BufferUtils, .LWJGLUtil, org.lwjgl.input.Keyboard, .Mouse, org.lwjgl.openal.AL, org.lwjgl.opengl.Display, org.lwjgl.util.WaveData


This test demonstrates OpenAL positioning Based on the example by Chad Armstrong (http://www.edenwaith.com/products/pige/tutorials/openal.php)
Author
Brian Matzon
Version
$Revision$ $Id$

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class
PositionTest.GLUT

Minute implementation of GLUT: COPYRIGHT: The OpenGL Utility Toolkit distribution for Win32 (Windows NT & Windows 95) contains source code modified from the original source code for GLUT version 3.3 which was developed by Mark J.

Field Summary

Modifier and TypeField and Description
public static final int
CENTER

CENTER enumeration

private FloatBuffer
centerPosition

Position of center sound

private FloatBuffer
centerVelocity

Velocity of center sound

private boolean
finished

Whether the demo is done

private PositionTest.GLUT
glut

Small* glut implementation :)

public static final int
LEFT

LEFT enumeration

private FloatBuffer
leftPosition

Position of left sound

private FloatBuffer
leftVelocity

Velocity of left sound

private FloatBuffer
listenerOrientation

Orientation of listener

private FloatBuffer
listenerPosition

Position of listener

private FloatBuffer
listenerVelocity

Velocity of listener

private boolean
pauseMode

Whether in pause mode

public static final int
RIGHT

RIGHT enumeration

private FloatBuffer
rightPosition

Position of right sound

private FloatBuffer
rightVelocity

Velocity of right sound

private IntBuffer
soundBuffers

OpenAL buffers

private IntBuffer
soundSources

OpenAL sources

public static final int
WINDOW_HEIGHT

Height of window

public static final int
WINDOW_WIDTH

Width of window

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
execute(String[] args)

Runs the actual test, using supplied arguments

private void
handleInput()

Handles any input

public static void
main(String[]
String array containing arguments
args
)

main entry point

private void
paused(boolean
Which pause mode to enter
paused
)

Handles any changes in pause mode

private void
render()

Render the scene

private void
run()

Runs the actual demonstration

private void
setup()

Performs setup of demonstration

private void
shutdown()

Shutdown of demonstration

private void
startSounds()

Starts playing the sounds at different times

Inherited from org.lwjgl.test.openal.BasicTest:
alExitcreateFloatBufferexitpausesetDisplayMode

Field Detail

CENTERback to summary
public static final int CENTER

CENTER enumeration

centerPositionback to summary
private FloatBuffer centerPosition

Position of center sound

centerVelocityback to summary
private FloatBuffer centerVelocity

Velocity of center sound

finishedback to summary
private boolean finished

Whether the demo is done

glutback to summary
private PositionTest.GLUT glut

Small* glut implementation :)

LEFTback to summary
public static final int LEFT

LEFT enumeration

leftPositionback to summary
private FloatBuffer leftPosition

Position of left sound

leftVelocityback to summary
private FloatBuffer leftVelocity

Velocity of left sound

listenerOrientationback to summary
private FloatBuffer listenerOrientation

Orientation of listener

listenerPositionback to summary
private FloatBuffer listenerPosition

Position of listener

listenerVelocityback to summary
private FloatBuffer listenerVelocity

Velocity of listener

pauseModeback to summary
private boolean pauseMode

Whether in pause mode

rightPositionback to summary
private FloatBuffer rightPosition

Position of right sound

rightVelocityback to summary
private FloatBuffer rightVelocity

Velocity of right sound

soundBuffersback to summary
private IntBuffer soundBuffers

OpenAL buffers

soundSourcesback to summary
private IntBuffer soundSources

OpenAL sources

WINDOW_HEIGHTback to summary
public static final int WINDOW_HEIGHT

Height of window

WINDOW_WIDTHback to summary
public static final int WINDOW_WIDTH

Width of window

Constructor Detail

PositionTestback to summary
public PositionTest()

Method Detail

executeback to summary
protected void execute(String[] args)

Runs the actual test, using supplied arguments

handleInputback to summary
private void handleInput()

Handles any input

mainback to summary
public static void main(String[] args)

main entry point

Parameters
args:String[]

String array containing arguments

pausedback to summary
private void paused(boolean paused)

Handles any changes in pause mode

Parameters
paused:boolean

Which pause mode to enter

renderback to summary
private void render()

Render the scene

runback to summary
private void run()

Runs the actual demonstration

setupback to summary
private void setup() throws Exception

Performs setup of demonstration

shutdownback to summary
private void shutdown()

Shutdown of demonstration

startSoundsback to summary
private void startSounds()

Starts playing the sounds at different times

org.lwjgl.test.openal back to summary

pack-priv Class PositionTest.GLUT

extends Object
Class Inheritance

Minute implementation of GLUT:
COPYRIGHT: The OpenGL Utility Toolkit distribution for Win32 (Windows NT & Windows 95) contains source code modified from the original source code for GLUT version 3.3 which was developed by Mark J. Kilgard. The original source code for GLUT is Copyright 1997 by Mark J. Kilgard. GLUT for Win32 is Copyright 1997 by Nate Robins and is not in the public domain, but it is freely distributable without licensing fees. It is provided without guarantee or warrantee expressed or implied. It was ported with the permission of Mark J. Kilgard by Nate Robins. THIS SOURCE CODE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OR MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

Field Summary

Modifier and TypeField and Description
pack-priv int[][]
pack-priv float[][]
n

pack-priv float[][]
v

Constructor Summary

AccessConstructor and Description
pack-priv
GLUT()

Method Summary

Modifier and TypeMethod and Description
private void
drawBox(float size, int type)

public void
glutSolidCube(float size)

public void
glutWireCube(float size)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

facesback to summary
pack-priv int[][] faces
nback to summary
pack-priv float[][] n
vback to summary
pack-priv float[][] v

Constructor Detail

GLUTback to summary
pack-priv GLUT()

Method Detail

drawBoxback to summary
private void drawBox(float size, int type)
glutSolidCubeback to summary
public void glutSolidCube(float size)
glutWireCubeback to summary
public void glutWireCube(float size)