consolidate openal
svn path=/trunk/tao/; revision=67691
This commit is contained in:
Родитель
fc3a22b2fe
Коммит
6bdafc75d4
|
@ -1,60 +0,0 @@
|
|||
#region License
|
||||
/*
|
||||
MIT License
|
||||
Copyright ©2003-2005 Tao Framework Team
|
||||
http://www.taoframework.com
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
#endregion License
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Security;
|
||||
using System.Security.Permissions;
|
||||
|
||||
[assembly: AllowPartiallyTrustedCallers]
|
||||
[assembly: AssemblyCompany("Tao Framework - http://www.taoframework.com")]
|
||||
#if DEBUG
|
||||
[assembly: AssemblyConfiguration("Debug")]
|
||||
#else
|
||||
[assembly: AssemblyConfiguration("Retail")]
|
||||
#endif
|
||||
[assembly: AssemblyCopyright("Copyright ©2003-2005 Tao Framework Team. All rights reserved.")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: AssemblyDefaultAlias("OpenAlExamples.Boxes")]
|
||||
[assembly: AssemblyDelaySign(false)]
|
||||
[assembly: AssemblyDescription("OpenAL Boxes example.")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyInformationalVersion("1.0.0.0")]
|
||||
|
||||
[assembly: AssemblyKeyName("")]
|
||||
#if DEBUG
|
||||
[assembly: AssemblyProduct("OpenAlExamples.Boxes.exe *** Debug Build ***")]
|
||||
#else
|
||||
[assembly: AssemblyProduct("OpenAlExamples.Boxes.exe")]
|
||||
#endif
|
||||
[assembly: AssemblyTitle("OpenAL Boxes example.")]
|
||||
[assembly: AssemblyTrademark("Tao Framework - http://www.taoframework.com")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: CLSCompliant(true)]
|
||||
[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
|
||||
[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.SkipVerification)]
|
||||
[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.UnmanagedCode)]
|
|
@ -1,317 +0,0 @@
|
|||
#region License
|
||||
/*
|
||||
MIT License
|
||||
Copyright ©2003-2005 Tao Framework Team
|
||||
http://www.taoframework.com
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
#endregion License
|
||||
|
||||
#region Original Credits / License
|
||||
// http://www.dev-gallery.com
|
||||
#endregion Original Credits / License
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Tao.FreeGlut;
|
||||
using Tao.OpenAl;
|
||||
using Tao.OpenGl;
|
||||
|
||||
namespace OpenAlExamples {
|
||||
#region Class Documentation
|
||||
/// <summary>
|
||||
/// Using OpenAL (Open Audio Library) and OpenGL to create a 3D application with 3D sound
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Original Author: http://www.dev-gallery.com
|
||||
/// http://www.dev-gallery.com/programming/openAL/basic/basicOpenAL_1.htm
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C# Implementation: Randy Ridge
|
||||
/// http://www.taoframework.com
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// The author's original code had many ifdefs for linux/windows specific things.
|
||||
/// Using the Tao implementation of OpenAL this should not be necessary. Also,
|
||||
/// the author used some IASIG methods from OpenAL to set some environments up on
|
||||
/// Windows. These are poorly documented by OpenAL and I'm not sure what state
|
||||
/// they're in currently, so I've left them out here.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
#endregion Class Documentation
|
||||
public sealed class Boxes {
|
||||
// --- Fields ---
|
||||
#region Private Constants
|
||||
private const int NUM_BUFFERS = 3;
|
||||
private const int NUM_SOURCES = 3;
|
||||
#endregion Private Constants
|
||||
|
||||
#region Private Fields
|
||||
private static float[] listenerPosition = {0, 0, 4};
|
||||
private static float[] listenerVelocity = {0, 0, 0};
|
||||
private static float[] listenerOrientation = {0, 0, -1, 0, 1, 0};
|
||||
private static float[] redPosition = {-2, 0, 0};
|
||||
private static float[] redVelocity = {0, 0, 0};
|
||||
private static float[] greenPosition = {2, 0, 0};
|
||||
private static float[] greenVelocity = {0, 0, 0};
|
||||
private static float[] bluePosition = {0, 0, -4};
|
||||
private static float[] blueVelocity = {0, 0, 0};
|
||||
private static int[] buffer = new int[NUM_BUFFERS];
|
||||
private static int[] source = new int[NUM_SOURCES];
|
||||
private static int window;
|
||||
private static int size;
|
||||
private static float frequency;
|
||||
private static int format;
|
||||
private static IntPtr data = IntPtr.Zero;
|
||||
//private static int loop;
|
||||
#endregion Private Fields
|
||||
|
||||
// --- Entry Point ---
|
||||
#region Main()
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static void Main() {
|
||||
Glut.glutInit();
|
||||
Glut.glutInitDisplayMode(Glut.GLUT_DEPTH | Glut.GLUT_DOUBLE | Glut.GLUT_RGB);
|
||||
Glut.glutInitWindowSize(400, 400);
|
||||
Alut.alutInit();
|
||||
window = Glut.glutCreateWindow("OpenAL & OpenGL | www.dev-gallery.com");
|
||||
Init();
|
||||
Console.WriteLine("Controls:");
|
||||
Console.WriteLine("1: Activate Red Sound");
|
||||
Console.WriteLine("2: Activate Green Sound");
|
||||
Console.WriteLine("3: Activate Blue Sound");
|
||||
Console.WriteLine("4: Deactivate Red Sound");
|
||||
Console.WriteLine("5: Deactivate Green Sound");
|
||||
Console.WriteLine("6: Deactivate Blue Sound");
|
||||
Console.WriteLine("W: Move Forward");
|
||||
Console.WriteLine("A: Move Left");
|
||||
Console.WriteLine("S: Move Backward");
|
||||
Console.WriteLine("D: Move Right");
|
||||
Console.WriteLine("ESC: Exit");
|
||||
Glut.glutDisplayFunc(new Glut.DisplayCallback(Display));
|
||||
Glut.glutKeyboardFunc(new Glut.KeyboardCallback(Keyboard));
|
||||
Glut.glutReshapeFunc(new Glut.ReshapeCallback(Reshape));
|
||||
Glut.glutMainLoop();
|
||||
}
|
||||
#endregion Main()
|
||||
|
||||
// --- Lesson Methods ---
|
||||
#region Display()
|
||||
private static void Display() {
|
||||
Gl.glClear(Gl.GL_COLOR_BUFFER_BIT | Gl.GL_DEPTH_BUFFER_BIT);
|
||||
Gl.glPushMatrix();
|
||||
Gl.glRotatef(20, 1, 1, 0);
|
||||
|
||||
Gl.glPushMatrix();
|
||||
Gl.glTranslatef(redPosition[0], redPosition[1], redPosition[2]);
|
||||
Gl.glColor3f(1, 0, 0);
|
||||
Glut.glutWireCube(0.5);
|
||||
Gl.glPopMatrix();
|
||||
|
||||
Gl.glPushMatrix();
|
||||
Gl.glTranslatef(greenPosition[0], greenPosition[1], greenPosition[2]);
|
||||
Gl.glColor3f(0, 1, 0);
|
||||
Glut.glutWireCube(0.5);
|
||||
Gl.glPopMatrix();
|
||||
|
||||
Gl.glPushMatrix();
|
||||
Gl.glTranslatef(bluePosition[0], bluePosition[1], bluePosition[2]);
|
||||
Gl.glColor3f(0, 0, 1);
|
||||
Glut.glutWireCube(0.5);
|
||||
Gl.glPopMatrix();
|
||||
|
||||
Gl.glPushMatrix();
|
||||
Gl.glTranslatef(listenerPosition[0], listenerPosition[1], listenerPosition[2]);
|
||||
Gl.glColor3f(1, 1, 1);
|
||||
Glut.glutWireCube(0.5);
|
||||
Gl.glPopMatrix();
|
||||
Gl.glPopMatrix();
|
||||
Glut.glutSwapBuffers();
|
||||
}
|
||||
#endregion Display()
|
||||
|
||||
#region string FindFile(string fileName)
|
||||
private static string FindFile(string fileName) {
|
||||
string originalName = fileName;
|
||||
|
||||
string filePath = Path.Combine("..", "..");
|
||||
string fileDirectory = "Data";
|
||||
|
||||
if (File.Exists(fileName))
|
||||
{
|
||||
filePath = "";
|
||||
fileDirectory = "";
|
||||
}
|
||||
else if (File.Exists(Path.Combine(fileDirectory, fileName)))
|
||||
{
|
||||
filePath = "";
|
||||
}
|
||||
//else {
|
||||
// Console.WriteLine("Could not locate file: " + originalName);
|
||||
// return null;
|
||||
//}
|
||||
return Path.Combine(Path.Combine(filePath, fileDirectory), fileName);
|
||||
}
|
||||
#endregion string FindFile(string fileName)
|
||||
|
||||
#region Init()
|
||||
private static void Init() {
|
||||
Gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
|
||||
Al.alListenerfv(Al.AL_POSITION, listenerPosition);
|
||||
Al.alListenerfv(Al.AL_VELOCITY, listenerVelocity);
|
||||
Al.alListenerfv(Al.AL_ORIENTATION, listenerOrientation);
|
||||
|
||||
Al.alGetError();
|
||||
Al.alGenBuffers(NUM_BUFFERS, buffer);
|
||||
if(Al.alGetError() != Al.AL_NO_ERROR) {
|
||||
Console.WriteLine("Error creating buffers.");
|
||||
Environment.Exit(-1);
|
||||
}
|
||||
|
||||
string fileName = "";
|
||||
fileName = FindFile("OpenAlExamples.Boxes.C.wav");
|
||||
if(fileName == null) {
|
||||
Environment.Exit(-1);
|
||||
}
|
||||
data = Alut.alutLoadMemoryFromFile(fileName, out format, out size, out frequency);
|
||||
Al.alBufferData(buffer[0], format, data, size, (int)frequency);
|
||||
//Alut.alutUnloadWAV(format, out data, size, frequency);
|
||||
|
||||
fileName = FindFile("OpenAlExamples.Boxes.B.wav");
|
||||
if(fileName == null) {
|
||||
Environment.Exit(-1);
|
||||
}
|
||||
data = Alut.alutLoadMemoryFromFile(fileName, out format, out size, out frequency);
|
||||
Al.alBufferData(buffer[1], format, data, size, (int)frequency);
|
||||
//Alut.alutUnloadWAV(format, out data, size, frequency);
|
||||
|
||||
fileName = FindFile("OpenAlExamples.Boxes.A.wav");
|
||||
if(fileName == null) {
|
||||
Environment.Exit(-1);
|
||||
}
|
||||
data = Alut.alutLoadMemoryFromFile(fileName, out format, out size, out frequency);
|
||||
Al.alBufferData(buffer[2], format, data, size, (int)frequency);
|
||||
//Alut.alutUnloadWAV(format, out data, size, frequency);
|
||||
|
||||
Al.alGetError();
|
||||
Al.alGenSources(NUM_SOURCES, source);
|
||||
if(Al.alGetError() != Al.AL_NO_ERROR) {
|
||||
Console.WriteLine("Error creating sources.");
|
||||
Environment.Exit(-1);
|
||||
}
|
||||
|
||||
Al.alSourcef(source[0], Al.AL_PITCH, 1.0f);
|
||||
Al.alSourcef(source[0], Al.AL_GAIN, 1.0f);
|
||||
Al.alSourcefv(source[0], Al.AL_POSITION, redPosition);
|
||||
Al.alSourcefv(source[0], Al.AL_VELOCITY, redVelocity);
|
||||
Al.alSourcei(source[0], Al.AL_BUFFER, buffer[0]);
|
||||
Al.alSourcei(source[0], Al.AL_LOOPING, Al.AL_TRUE);
|
||||
|
||||
Al.alSourcef(source[1], Al.AL_PITCH, 1.0f);
|
||||
Al.alSourcef(source[1], Al.AL_GAIN, 1.0f);
|
||||
Al.alSourcefv(source[1], Al.AL_POSITION, greenPosition);
|
||||
Al.alSourcefv(source[1], Al.AL_VELOCITY, greenVelocity);
|
||||
Al.alSourcei(source[1], Al.AL_BUFFER, buffer[1]);
|
||||
Al.alSourcei(source[1], Al.AL_LOOPING, Al.AL_TRUE);
|
||||
|
||||
Al.alSourcef(source[2], Al.AL_PITCH, 1.0f);
|
||||
Al.alSourcef(source[2], Al.AL_GAIN, 1.0f);
|
||||
Al.alSourcefv(source[2], Al.AL_POSITION, bluePosition);
|
||||
Al.alSourcefv(source[2], Al.AL_VELOCITY, blueVelocity);
|
||||
Al.alSourcei(source[2], Al.AL_BUFFER, buffer[2]);
|
||||
Al.alSourcei(source[2], Al.AL_LOOPING, Al.AL_TRUE);
|
||||
}
|
||||
#endregion Init()
|
||||
|
||||
#region Keyboard(byte key, int x, int y)
|
||||
private static void Keyboard(byte key, int x, int y) {
|
||||
switch(key) {
|
||||
case (byte) '1':
|
||||
Al.alSourcePlay(source[0]);
|
||||
break;
|
||||
case (byte) '2':
|
||||
Al.alSourcePlay(source[1]);
|
||||
break;
|
||||
case (byte) '3':
|
||||
Al.alSourcePlay(source[2]);
|
||||
break;
|
||||
case (byte) '4':
|
||||
Al.alSourceStop(source[0]);
|
||||
break;
|
||||
case (byte) '5':
|
||||
Al.alSourceStop(source[1]);
|
||||
break;
|
||||
case (byte) '6':
|
||||
Al.alSourceStop(source[2]);
|
||||
break;
|
||||
case (byte) 'w':
|
||||
case (byte) 'W':
|
||||
listenerPosition[2] -= 0.1f;
|
||||
Al.alListenerfv(Al.AL_POSITION, listenerPosition);
|
||||
break;
|
||||
case (byte) 'a':
|
||||
case (byte) 'A':
|
||||
listenerPosition[0] -= 0.1f;
|
||||
Al.alListenerfv(Al.AL_POSITION, listenerPosition);
|
||||
break;
|
||||
case (byte) 's':
|
||||
case (byte) 'S':
|
||||
listenerPosition[2] += 0.1f;
|
||||
Al.alListenerfv(Al.AL_POSITION, listenerPosition);
|
||||
break;
|
||||
case (byte) 'd':
|
||||
case (byte) 'D':
|
||||
listenerPosition[0] += 0.1f;
|
||||
Al.alListenerfv(Al.AL_POSITION, listenerPosition);
|
||||
break;
|
||||
case 27:
|
||||
Al.alSourceStop(source[2]);
|
||||
Al.alSourceStop(source[1]);
|
||||
Al.alSourceStop(source[0]);
|
||||
Alut.alutExit();
|
||||
Glut.glutDestroyWindow(window);
|
||||
Environment.Exit(0);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
Glut.glutPostRedisplay();
|
||||
}
|
||||
#endregion Keyboard(byte key, int x, int y)
|
||||
|
||||
#region Reshape(int w, int h)
|
||||
private static void Reshape(int w, int h) {
|
||||
Gl.glViewport(0, 0, w, h);
|
||||
Gl.glMatrixMode(Gl.GL_PROJECTION);
|
||||
Gl.glLoadIdentity();
|
||||
Glu.gluPerspective(60.0, (float)w / (float) h, 1.0, 30.0);
|
||||
Gl.glMatrixMode(Gl.GL_MODELVIEW);
|
||||
Gl.glLoadIdentity();
|
||||
Gl.glTranslatef(0.0f, 0.0f, -6.6f);
|
||||
}
|
||||
#endregion Reshape(int w, int h)
|
||||
}
|
||||
}
|
Двоичные данные
examples/OpenAlExamples/Boxes/Data/OpenAlExamples.Boxes.A.wav
Двоичные данные
examples/OpenAlExamples/Boxes/Data/OpenAlExamples.Boxes.A.wav
Двоичный файл не отображается.
Двоичные данные
examples/OpenAlExamples/Boxes/Data/OpenAlExamples.Boxes.B.wav
Двоичные данные
examples/OpenAlExamples/Boxes/Data/OpenAlExamples.Boxes.B.wav
Двоичный файл не отображается.
Двоичные данные
examples/OpenAlExamples/Boxes/Data/OpenAlExamples.Boxes.C.wav
Двоичные данные
examples/OpenAlExamples/Boxes/Data/OpenAlExamples.Boxes.C.wav
Двоичный файл не отображается.
Двоичный файл не отображается.
|
@ -1,229 +0,0 @@
|
|||
#region License
|
||||
/*
|
||||
MIT License
|
||||
Copyright ©2003-2005 Tao Framework Team
|
||||
http://www.taoframework.com
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
#endregion License
|
||||
|
||||
#region Original Credits / License
|
||||
// Jesse Maurais (lightonthewater@hotmail.com)
|
||||
#endregion Original Credits / License
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using Tao.OpenAl;
|
||||
|
||||
namespace OpenAlExamples {
|
||||
#region Class Documentation
|
||||
/// <summary>
|
||||
/// OpenAL Lesson 1: Simple Static Sound
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Original Author: Jesse Maurais
|
||||
/// http://devmaster.net/articles/openal-tutorials/lesson1.php
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C# Implementation: Randy Ridge
|
||||
/// http://www.taoframework.com
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
#endregion Class Documentation
|
||||
public sealed class Lesson01 {
|
||||
// --- Fields ---
|
||||
#region Private Fields
|
||||
/*
|
||||
* These are OpenAL "names" (or "objects"). They store and id of a buffer
|
||||
* or a source object. Generally you would expect to see the implementation
|
||||
* use values that scale up from '1', but don't count on it. The spec does
|
||||
* not make this mandatory (as it is OpenGL). The id's can easily be memory
|
||||
* pointers as well. It will depend on the implementation.
|
||||
*/
|
||||
private static int buffer; // Buffers to hold sound data.
|
||||
private static int source; // Sources are points of emitting sound.
|
||||
|
||||
/*
|
||||
* These are 3D cartesian vector coordinates. A structure or class would be
|
||||
* a more flexible of handling these, but for the sake of simplicity we will
|
||||
* just leave it as is.
|
||||
*/
|
||||
private static float[] sourcePosition = {0, 0, 0}; // Position of the source sound.
|
||||
private static float[] sourceVelocity = {0, 0, 0}; // Velocity of the source sound.
|
||||
private static float[] listenerPosition = {0, 0, 0}; // Position of the Listener.
|
||||
private static float[] listenerVelocity = {0, 0, 0}; // Velocity of the Listener.
|
||||
|
||||
// Orientation of the Listener. (first 3 elements are "at", second 3 are "up")
|
||||
// Also note that these should be units of '1'.
|
||||
private static float[] listenerOrientation = {0, 0, -1, 0, 1, 0};
|
||||
#endregion Private Fields
|
||||
|
||||
// --- Entry Point ---
|
||||
#region Main()
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static void Main() {
|
||||
Console.WriteLine("MindCode's OpenAL Lesson 1: Single Static Source");
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("Controls (followed by Enter):");
|
||||
Console.WriteLine("p) Play");
|
||||
Console.WriteLine("s) Stop");
|
||||
Console.WriteLine("h) Hold (pause)");
|
||||
Console.WriteLine("q) Quit");
|
||||
Console.WriteLine();
|
||||
|
||||
// Initialize OpenAL and clear the error bit.
|
||||
Alut.alutInit();
|
||||
Al.alGetError();
|
||||
|
||||
// Load the wav data.
|
||||
if(!LoadALData()) {
|
||||
Console.WriteLine("Error loading data.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Initialize the listener in OpenAL.
|
||||
SetListenerValues();
|
||||
|
||||
// Loop.
|
||||
char c = ' ';
|
||||
while(c != 'q' && c != 'Q') {
|
||||
c = (char) Console.Read();
|
||||
switch(c) {
|
||||
// Pressing 'p' will begin playing the sample.
|
||||
case 'p':
|
||||
case 'P':
|
||||
Al.alSourcePlay(source);
|
||||
break;
|
||||
// Pressing 's' will stop the sample from playing.
|
||||
case 's':
|
||||
case 'S':
|
||||
Al.alSourceStop(source);
|
||||
break;
|
||||
// Pressing 'h' will pause the sample.
|
||||
case 'h':
|
||||
case 'H':
|
||||
Al.alSourcePause(source);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Exit procedure to clean up and free OpenAL resources.
|
||||
KillALData();
|
||||
}
|
||||
#endregion Main()
|
||||
|
||||
// --- Lesson Methods ---
|
||||
#region KillALData()
|
||||
/*
|
||||
* We have allocated memory for our buffers and sources which needs
|
||||
* to be returned to the system. This function frees that memory.
|
||||
*/
|
||||
private static void KillALData() {
|
||||
Al.alDeleteBuffers(1, ref buffer);
|
||||
Al.alDeleteSources(1, ref source);
|
||||
Alut.alutExit();
|
||||
}
|
||||
#endregion KillALData()
|
||||
|
||||
#region bool LoadALData()
|
||||
/*
|
||||
* This function will load our sample data from the disk using the Alut
|
||||
* utility and send the data into OpenAL as a buffer. A source is then
|
||||
* also created to play that buffer.
|
||||
*/
|
||||
private static bool LoadALData() {
|
||||
// Variables to load into.
|
||||
int format;
|
||||
int size;
|
||||
IntPtr data = IntPtr.Zero;
|
||||
float frequency;
|
||||
//int loop;
|
||||
|
||||
// Generate an OpenAL buffer.
|
||||
Al.alGenBuffers(1, out buffer);
|
||||
if(Al.alGetError() != Al.AL_NO_ERROR) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Attempt to locate the file.
|
||||
string fileName = "OpenAlExamples.Lesson01.FancyPants.wav";
|
||||
if(File.Exists(fileName)) {
|
||||
//fileName = fileName;
|
||||
}
|
||||
else if(File.Exists("Data/" + fileName)) {
|
||||
fileName = "Data/" + fileName;
|
||||
}
|
||||
else if(File.Exists("../../Data/" + fileName)) {
|
||||
fileName = "../../Data/" + fileName;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Load wav.
|
||||
data = Alut.alutLoadMemoryFromFile(fileName, out format, out size, out frequency);
|
||||
if(data == IntPtr.Zero) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Load wav data into the generated buffer.
|
||||
Al.alBufferData(buffer, format, data, size, (int)frequency);
|
||||
// Alut.alutUnloadWAV(format, out data, size, frequency);
|
||||
|
||||
// Generate an OpenAL source.
|
||||
Al.alGenSources(1, out source);
|
||||
if(Al.alGetError() != Al.AL_NO_ERROR) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Bind the buffer with the source.
|
||||
Al.alSourcei(source, Al.AL_BUFFER, buffer);
|
||||
Al.alSourcef(source, Al.AL_PITCH, 1.0f);
|
||||
Al.alSourcef(source, Al.AL_GAIN, 1.0f);
|
||||
Al.alSourcefv(source, Al.AL_POSITION, sourcePosition);
|
||||
Al.alSourcefv(source, Al.AL_VELOCITY, sourceVelocity);
|
||||
Al.alSourcei(source, Al.AL_LOOPING, 0);
|
||||
|
||||
// Do a final error check and then return.
|
||||
if(Al.alGetError() == Al.AL_NO_ERROR) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
#endregion bool LoadALData()
|
||||
|
||||
#region SetListenerValues()
|
||||
/*
|
||||
* We already defined certain values for the Listener, but we need
|
||||
* to tell OpenAL to use that data. This function does just that.
|
||||
*/
|
||||
private static void SetListenerValues() {
|
||||
Al.alListenerfv(Al.AL_POSITION, listenerPosition);
|
||||
Al.alListenerfv(Al.AL_VELOCITY, listenerVelocity);
|
||||
Al.alListenerfv(Al.AL_ORIENTATION, listenerOrientation);
|
||||
}
|
||||
#endregion SetListenerValues()
|
||||
}
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
#region License
|
||||
/*
|
||||
MIT License
|
||||
Copyright ©2003-2005 Tao Framework Team
|
||||
http://www.taoframework.com
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
#endregion License
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Security;
|
||||
using System.Security.Permissions;
|
||||
|
||||
[assembly: AllowPartiallyTrustedCallers]
|
||||
[assembly: AssemblyCompany("Tao Framework - http://www.taoframework.com")]
|
||||
#if DEBUG
|
||||
[assembly: AssemblyConfiguration("Debug")]
|
||||
#else
|
||||
[assembly: AssemblyConfiguration("Retail")]
|
||||
#endif
|
||||
[assembly: AssemblyCopyright("Copyright ©2003-2005 Tao Framework Team. All rights reserved.")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: AssemblyDefaultAlias("OpenAlExamples.Lesson01")]
|
||||
[assembly: AssemblyDelaySign(false)]
|
||||
[assembly: AssemblyDescription("OpenAL Lesson 01 example.")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyInformationalVersion("1.0.0.0")]
|
||||
|
||||
[assembly: AssemblyKeyName("")]
|
||||
#if DEBUG
|
||||
[assembly: AssemblyProduct("OpenAlExamples.Lesson01.exe *** Debug Build ***")]
|
||||
#else
|
||||
[assembly: AssemblyProduct("OpenAlExamples.Lesson01.exe")]
|
||||
#endif
|
||||
[assembly: AssemblyTitle("OpenAL Lesson 01 example.")]
|
||||
[assembly: AssemblyTrademark("Tao Framework - http://www.taoframework.com")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: CLSCompliant(true)]
|
||||
[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
|
||||
[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.SkipVerification)]
|
||||
[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.UnmanagedCode)]
|
Двоичный файл не отображается.
|
@ -1,229 +0,0 @@
|
|||
#region License
|
||||
/*
|
||||
MIT License
|
||||
Copyright ©2003-2005 Tao Framework Team
|
||||
http://www.taoframework.com
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
#endregion License
|
||||
|
||||
#region Original Credits / License
|
||||
// Jesse Maurais (lightonthewater@hotmail.com)
|
||||
#endregion Original Credits / License
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Timers;
|
||||
using Tao.OpenAl;
|
||||
|
||||
namespace OpenAlExamples {
|
||||
#region Class Documentation
|
||||
/// <summary>
|
||||
/// OpenAL Lesson 2: Looping and Fadeaway
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Original Author: Jesse Maurais
|
||||
/// http://devmaster.net/articles/openal-tutorials/lesson2.php
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C# Implementation: Randy Ridge
|
||||
/// http://www.taoframework.com
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
#endregion Class Documentation
|
||||
public sealed class Lesson02 {
|
||||
// --- Fields ---
|
||||
#region Private Fields
|
||||
/*
|
||||
* These are OpenAL "names" (or "objects"). They store and id of a buffer
|
||||
* or a source object. Generally you would expect to see the implementation
|
||||
* use values that scale up from '1', but don't count on it. The spec does
|
||||
* not make this mandatory (as it is OpenGL). The id's can easily be memory
|
||||
* pointers as well. It will depend on the implementation.
|
||||
*/
|
||||
private static int buffer; // Buffers to hold sound data.
|
||||
private static int source; // Sources are points of emitting sound.
|
||||
|
||||
/*
|
||||
* These are 3D cartesian vector coordinates. A structure or class would be
|
||||
* a more flexible of handling these, but for the sake of simplicity we will
|
||||
* just leave it as is.
|
||||
*/
|
||||
private static float[] sourcePosition = {0, 0, 0}; // Position of the source sound.
|
||||
private static float[] sourceVelocity = {0, 0, 0.1f}; // Velocity of the source sound.
|
||||
private static float[] listenerPosition = {0, 0, 0}; // Position of the Listener.
|
||||
private static float[] listenerVelocity = {0, 0, 0}; // Velocity of the Listener.
|
||||
|
||||
// Orientation of the Listener. (first 3 elements are "at", second 3 are "up")
|
||||
// Also note that these should be units of '1'.
|
||||
private static float[] listenerOrientation = {0, 0, -1, 0, 1, 0};
|
||||
#endregion Private Fields
|
||||
|
||||
// --- Entry Point ---
|
||||
#region Main()
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static void Main() {
|
||||
Console.WriteLine("MindCode's OpenAL Lesson 2: Looping and Fadeaway");
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("Footsteps will slowly start to fade into the distance.");
|
||||
Console.WriteLine("(Press Enter key to quit.)");
|
||||
|
||||
// Initialize OpenAL and clear the error bit.
|
||||
Alut.alutInit();
|
||||
Al.alGetError();
|
||||
|
||||
// Load the wav data.
|
||||
if(!LoadALData()) {
|
||||
Console.WriteLine("Error loading data.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Initialize the listener in OpenAL.
|
||||
SetListenerValues();
|
||||
|
||||
// Begin playing the source.
|
||||
Al.alSourcePlay(source);
|
||||
|
||||
// Loop
|
||||
int key = 0;
|
||||
Timer timer = new Timer();
|
||||
timer.Elapsed += new ElapsedEventHandler(Timer_Elapsed);
|
||||
timer.Interval = 200;
|
||||
timer.Enabled = true;
|
||||
|
||||
while(key == 0) {
|
||||
key = Console.Read();
|
||||
}
|
||||
|
||||
timer.Stop();
|
||||
|
||||
// Exit procedure to clean up and free OpenAL resources.
|
||||
KillALData();
|
||||
}
|
||||
#endregion Main()
|
||||
|
||||
// --- Lesson Methods ---
|
||||
#region KillALData()
|
||||
/*
|
||||
* We have allocated memory for our buffers and sources which needs
|
||||
* to be returned to the system. This function frees that memory.
|
||||
*/
|
||||
private static void KillALData() {
|
||||
Al.alDeleteBuffers(1, ref buffer);
|
||||
Al.alDeleteSources(1, ref source);
|
||||
Alut.alutExit();
|
||||
}
|
||||
#endregion KillALData()
|
||||
|
||||
#region bool LoadALData()
|
||||
/*
|
||||
* This function will load our sample data from the disk using the Alut
|
||||
* utility and send the data into OpenAL as a buffer. A source is then
|
||||
* also created to play that buffer.
|
||||
*/
|
||||
private static bool LoadALData() {
|
||||
// Variables to load into.
|
||||
int format;
|
||||
int size;
|
||||
IntPtr data = IntPtr.Zero;
|
||||
float frequency;
|
||||
//int loop;
|
||||
|
||||
// Generate an OpenAL buffer.
|
||||
Al.alGenBuffers(1, out buffer);
|
||||
if(Al.alGetError() != Al.AL_NO_ERROR) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Attempt to locate the file.
|
||||
string fileName = "OpenAlExamples.Lesson02.Footsteps.wav";
|
||||
if(File.Exists(fileName)) {
|
||||
//fileName = fileName;
|
||||
}
|
||||
else if(File.Exists("Data/" + fileName)) {
|
||||
fileName = "Data/" + fileName;
|
||||
}
|
||||
else if(File.Exists("../../Data/" + fileName)) {
|
||||
fileName = "../../Data/" + fileName;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Load wav.
|
||||
data = Alut.alutLoadMemoryFromFile(fileName, out format, out size, out frequency);
|
||||
if(data == IntPtr.Zero) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Load wav data into the generated buffer.
|
||||
Al.alBufferData(buffer, format, data, size, (int)frequency);
|
||||
//Alut.alutUnloadWAV(format, out data, size, frequency);
|
||||
|
||||
// Generate an OpenAL source.
|
||||
Al.alGenSources(1, out source);
|
||||
if(Al.alGetError() != Al.AL_NO_ERROR) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Bind the buffer with the source.
|
||||
Al.alSourcei(source, Al.AL_BUFFER, buffer);
|
||||
Al.alSourcef(source, Al.AL_PITCH, 1.0f);
|
||||
Al.alSourcef(source, Al.AL_GAIN, 1.0f);
|
||||
Al.alSourcefv(source, Al.AL_POSITION, sourcePosition);
|
||||
Al.alSourcefv(source, Al.AL_VELOCITY, sourceVelocity);
|
||||
Al.alSourcei(source, Al.AL_LOOPING, Al.AL_TRUE);
|
||||
|
||||
// Do a final error check and then return.
|
||||
if(Al.alGetError() == Al.AL_NO_ERROR) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
#endregion bool LoadALData()
|
||||
|
||||
#region SetListenerValues()
|
||||
/*
|
||||
* We already defined certain values for the Listener, but we need
|
||||
* to tell OpenAL to use that data. This function does just that.
|
||||
*/
|
||||
private static void SetListenerValues() {
|
||||
Al.alListenerfv(Al.AL_POSITION, listenerPosition);
|
||||
Al.alListenerfv(Al.AL_VELOCITY, listenerVelocity);
|
||||
Al.alListenerfv(Al.AL_ORIENTATION, listenerOrientation);
|
||||
}
|
||||
#endregion SetListenerValues()
|
||||
|
||||
// --- Event Handlers ---
|
||||
#region Timer_Elapsed(object source, ElapsedEventArgs e)
|
||||
private static void Timer_Elapsed(object s, ElapsedEventArgs e) {
|
||||
sourcePosition[0] += sourceVelocity[0];
|
||||
sourcePosition[1] += sourceVelocity[1];
|
||||
sourcePosition[2] += sourceVelocity[2];
|
||||
Al.alSourcefv(source, Al.AL_POSITION, sourcePosition);
|
||||
}
|
||||
#endregion Timer_Elapsed(object source, ElapsedEventArgs e)
|
||||
}
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
#region License
|
||||
/*
|
||||
MIT License
|
||||
Copyright ©2003-2005 Tao Framework Team
|
||||
http://www.taoframework.com
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
#endregion License
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Security;
|
||||
using System.Security.Permissions;
|
||||
|
||||
[assembly: AllowPartiallyTrustedCallers]
|
||||
[assembly: AssemblyCompany("Tao Framework - http://www.taoframework.com")]
|
||||
#if DEBUG
|
||||
[assembly: AssemblyConfiguration("Debug")]
|
||||
#else
|
||||
[assembly: AssemblyConfiguration("Retail")]
|
||||
#endif
|
||||
[assembly: AssemblyCopyright("Copyright ©2003-2005 Tao Framework Team. All rights reserved.")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: AssemblyDefaultAlias("OpenAlExamples.Lesson02")]
|
||||
[assembly: AssemblyDelaySign(false)]
|
||||
[assembly: AssemblyDescription("OpenAL Lesson 02 example.")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyInformationalVersion("1.0.0.0")]
|
||||
|
||||
[assembly: AssemblyKeyName("")]
|
||||
#if DEBUG
|
||||
[assembly: AssemblyProduct("OpenAlExamples.Lesson02.exe *** Debug Build ***")]
|
||||
#else
|
||||
[assembly: AssemblyProduct("OpenAlExamples.Lesson02.exe")]
|
||||
#endif
|
||||
[assembly: AssemblyTitle("OpenAL Lesson 02 example.")]
|
||||
[assembly: AssemblyTrademark("Tao Framework - http://www.taoframework.com")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: CLSCompliant(true)]
|
||||
[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
|
||||
[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.SkipVerification)]
|
||||
[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.UnmanagedCode)]
|
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
|
@ -1,308 +0,0 @@
|
|||
#region License
|
||||
/*
|
||||
MIT License
|
||||
Copyright ©2003-2005 Tao Framework Team
|
||||
http://www.taoframework.com
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
#endregion License
|
||||
|
||||
#region Original Credits / License
|
||||
// Jesse Maurais (lightonthewater@hotmail.com)
|
||||
#endregion Original Credits / License
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Timers;
|
||||
using Tao.OpenAl;
|
||||
|
||||
namespace OpenAlExamples {
|
||||
#region Class Documentation
|
||||
/// <summary>
|
||||
/// OpenAL Lesson 3: Multiple Sources
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Original Author: Jesse Maurais
|
||||
/// http://devmaster.net/articles/openal-tutorials/lesson3.php
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C# Implementation: Randy Ridge
|
||||
/// http://www.taoframework.com
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
#endregion Class Documentation
|
||||
public sealed class Lesson03 {
|
||||
// --- Fields ---
|
||||
#region Private Fields
|
||||
private const int NUM_BUFFERS = 3; // Maximum data buffers we will need.
|
||||
private const int NUM_SOURCES = 3; // Maximum emissions we will need.
|
||||
private const int BATTLE = 0; // These index the buffers and sources.
|
||||
private const int GUN1 = 1;
|
||||
private const int GUN2 = 2;
|
||||
|
||||
/*
|
||||
* These are OpenAL "names" (or "objects"). They store and id of a buffer
|
||||
* or a source object. Generally you would expect to see the implementation
|
||||
* use values that scale up from '1', but don't count on it. The spec does
|
||||
* not make this mandatory (as it is OpenGL). The id's can easily be memory
|
||||
* pointers as well. It will depend on the implementation.
|
||||
*/
|
||||
private static int[] buffer = new int[NUM_BUFFERS]; // Buffers to hold sound data.
|
||||
private static int[] source = new int[NUM_SOURCES]; // Sources are points of emitting sound.
|
||||
|
||||
/*
|
||||
* These are 3D cartesian vector coordinates. A structure or class would be
|
||||
* a more flexible of handling these, but for the sake of simplicity we will
|
||||
* just leave it as is.
|
||||
*/
|
||||
|
||||
// Position of the source sound.
|
||||
private static float[][] sourcePosition = new float[NUM_SOURCES][];
|
||||
|
||||
// Velocity of the source sound.
|
||||
private static float[][] sourceVelocity = new float[NUM_SOURCES][];
|
||||
|
||||
private static float[] listenerPosition = {0, 0, 0}; // Position of the Listener.
|
||||
private static float[] listenerVelocity = {0, 0, 0}; // Velocity of the Listener.
|
||||
|
||||
// Orientation of the Listener. (first 3 elements are "at", second 3 are "up")
|
||||
// Also note that these should be units of '1'.
|
||||
private static float[] listenerOrientation = {0, 0, -1, 0, 1, 0};
|
||||
|
||||
private static Random rand = new Random(); // Random number generator.
|
||||
#endregion Private Fields
|
||||
|
||||
// --- Entry Point ---
|
||||
#region Main()
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static void Main() {
|
||||
Console.WriteLine("MindCode's OpenAL Lesson 3: Multiple Sources");
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("(Press Enter key to quit.)");
|
||||
|
||||
for(int i = 0; i < NUM_SOURCES; i++) {
|
||||
sourcePosition[i] = new float[3];
|
||||
sourceVelocity[i] = new float[3];
|
||||
}
|
||||
|
||||
// Initialize OpenAL and clear the error bit.
|
||||
Alut.alutInit();
|
||||
Al.alGetError();
|
||||
|
||||
// Load the wav data.
|
||||
if(!LoadALData()) {
|
||||
Console.WriteLine("Error loading data.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Initialize the listener in OpenAL.
|
||||
SetListenerValues();
|
||||
|
||||
// Begin playing the source.
|
||||
Al.alSourcePlay(source[BATTLE]);
|
||||
|
||||
int state;
|
||||
int key = 0;
|
||||
|
||||
while(key == 0) {
|
||||
key = Console.Read();
|
||||
|
||||
for(int i = 1; i < NUM_SOURCES; i++) {
|
||||
Al.alGetSourcei(source[i], Al.AL_SOURCE_STATE, out state);
|
||||
|
||||
if(state != Al.AL_PLAYING) {
|
||||
// Pick a random position around the listener to play the source.
|
||||
double theta = (double) (rand.Next() % 360) * 3.14 / 180.0;
|
||||
|
||||
sourcePosition[i][0] = -(float)(Math.Cos(theta));
|
||||
sourcePosition[i][1] = -(float)(rand.Next() % 2);
|
||||
sourcePosition[i][2] = -(float)(Math.Sin(theta));
|
||||
|
||||
Al.alSourcefv(source[i], Al.AL_POSITION, sourcePosition[i]);
|
||||
|
||||
Al.alSourcePlay(source[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Exit procedure to clean up and free OpenAL resources.
|
||||
KillALData();
|
||||
}
|
||||
#endregion Main()
|
||||
|
||||
// --- Lesson Methods ---
|
||||
#region string FindFile(string fileName)
|
||||
private static string FindFile(string fileName) {
|
||||
if(File.Exists(fileName)) {
|
||||
return fileName;
|
||||
}
|
||||
else if(File.Exists("Data/" + fileName)) {
|
||||
return "Data/" + fileName;
|
||||
}
|
||||
else if(File.Exists("../../Data/" + fileName)) {
|
||||
return "../../Data/" + fileName;
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
#endregion string FindFile(string fileName)
|
||||
|
||||
#region KillALData()
|
||||
/*
|
||||
* We have allocated memory for our buffers and sources which needs
|
||||
* to be returned to the system. This function frees that memory.
|
||||
*/
|
||||
private static void KillALData() {
|
||||
Al.alDeleteBuffers(NUM_BUFFERS, buffer);
|
||||
Al.alDeleteSources(NUM_SOURCES, source);
|
||||
Alut.alutExit();
|
||||
}
|
||||
#endregion KillALData()
|
||||
|
||||
#region bool LoadALData()
|
||||
/*
|
||||
* This function will load our sample data from the disk using the Alut
|
||||
* utility and send the data into OpenAL as a buffer. A source is then
|
||||
* also created to play that buffer.
|
||||
*/
|
||||
private static bool LoadALData() {
|
||||
// Variables to load into.
|
||||
int format;
|
||||
int size;
|
||||
IntPtr data = IntPtr.Zero;
|
||||
float frequency;
|
||||
//int loop;
|
||||
|
||||
// Generate an OpenAL buffer.
|
||||
Al.alGenBuffers(NUM_BUFFERS, buffer);
|
||||
if(Al.alGetError() != Al.AL_NO_ERROR) {
|
||||
return false;
|
||||
}
|
||||
|
||||
string fileName = "";
|
||||
|
||||
// Attempt to locate the file.
|
||||
fileName = FindFile("OpenAlExamples.Lesson03.Battle.wav");
|
||||
if(fileName != null) {
|
||||
// Load wav.
|
||||
data = Alut.alutLoadMemoryFromFile(fileName, out format, out size, out frequency);
|
||||
if(data == IntPtr.Zero) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Load wav data into the generated buffer.
|
||||
Al.alBufferData(buffer[BATTLE], format, data, size, (int)frequency);
|
||||
//Alut.a(format, out data, size, frequency);
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Attempt to locate the file.
|
||||
fileName = FindFile("OpenAlExamples.Lesson03.Gun1.wav");
|
||||
if(fileName != null) {
|
||||
// Load wav.
|
||||
data = Alut.alutLoadMemoryFromFile(fileName, out format, out size, out frequency);
|
||||
if(data == IntPtr.Zero)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Load wav data into the generated buffer.
|
||||
Al.alBufferData(buffer[GUN1], format, data, size, (int)frequency);
|
||||
//Alut.alutUnloadWAV(format, out data, size, frequency);
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Attempt to locate the file.
|
||||
fileName = FindFile("OpenAlExamples.Lesson03.Gun2.wav");
|
||||
if(fileName != null) {
|
||||
// Load wav.
|
||||
data = Alut.alutLoadMemoryFromFile(fileName, out format, out size, out frequency);
|
||||
if(data == IntPtr.Zero)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Load wav data into the generated buffer.
|
||||
Al.alBufferData(buffer[GUN2], format, data, size, (int)frequency);
|
||||
// Alut.alutUnloadWAV(format, out data, size, frequency);
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Generate an OpenAL source.
|
||||
Al.alGenSources(NUM_SOURCES, source);
|
||||
if(Al.alGetError() != Al.AL_NO_ERROR) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Bind the buffer with the source.
|
||||
Al.alSourcei(source[BATTLE], Al.AL_BUFFER, buffer[BATTLE]);
|
||||
Al.alSourcef(source[BATTLE], Al.AL_PITCH, 1.0f);
|
||||
Al.alSourcef(source[BATTLE], Al.AL_GAIN, 1.0f);
|
||||
Al.alSourcefv(source[BATTLE], Al.AL_POSITION, sourcePosition[BATTLE]);
|
||||
Al.alSourcefv(source[BATTLE], Al.AL_VELOCITY, sourceVelocity[BATTLE]);
|
||||
Al.alSourcei(source[BATTLE], Al.AL_LOOPING, Al.AL_TRUE);
|
||||
|
||||
Al.alSourcei(source[GUN1], Al.AL_BUFFER, buffer[GUN1]);
|
||||
Al.alSourcef(source[GUN1], Al.AL_PITCH, 1.0f);
|
||||
Al.alSourcef(source[GUN1], Al.AL_GAIN, 1.0f);
|
||||
Al.alSourcefv(source[GUN1], Al.AL_POSITION, sourcePosition[GUN1]);
|
||||
Al.alSourcefv(source[GUN1], Al.AL_VELOCITY, sourceVelocity[GUN1]);
|
||||
Al.alSourcei(source[GUN1], Al.AL_LOOPING, Al.AL_FALSE);
|
||||
|
||||
Al.alSourcei(source[GUN2], Al.AL_BUFFER, buffer[GUN2]);
|
||||
Al.alSourcef(source[GUN2], Al.AL_PITCH, 1.0f);
|
||||
Al.alSourcef(source[GUN2], Al.AL_GAIN, 1.0f);
|
||||
Al.alSourcefv(source[GUN2], Al.AL_POSITION, sourcePosition[GUN2]);
|
||||
Al.alSourcefv(source[GUN2], Al.AL_VELOCITY, sourceVelocity[GUN2]);
|
||||
Al.alSourcei(source[GUN2], Al.AL_LOOPING, Al.AL_FALSE);
|
||||
|
||||
// Do a final error check and then return.
|
||||
if(Al.alGetError() == Al.AL_NO_ERROR) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
#endregion bool LoadALData()
|
||||
|
||||
#region SetListenerValues()
|
||||
/*
|
||||
* We already defined certain values for the Listener, but we need
|
||||
* to tell OpenAL to use that data. This function does just that.
|
||||
*/
|
||||
private static void SetListenerValues() {
|
||||
Al.alListenerfv(Al.AL_POSITION, listenerPosition);
|
||||
Al.alListenerfv(Al.AL_VELOCITY, listenerVelocity);
|
||||
Al.alListenerfv(Al.AL_ORIENTATION, listenerOrientation);
|
||||
}
|
||||
#endregion SetListenerValues()
|
||||
}
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
#region License
|
||||
/*
|
||||
MIT License
|
||||
Copyright ©2003-2005 Tao Framework Team
|
||||
http://www.taoframework.com
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
#endregion License
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Security;
|
||||
using System.Security.Permissions;
|
||||
|
||||
[assembly: AllowPartiallyTrustedCallers]
|
||||
[assembly: AssemblyCompany("Tao Framework - http://www.taoframework.com")]
|
||||
#if DEBUG
|
||||
[assembly: AssemblyConfiguration("Debug")]
|
||||
#else
|
||||
[assembly: AssemblyConfiguration("Retail")]
|
||||
#endif
|
||||
[assembly: AssemblyCopyright("Copyright ©2003-2005 Tao Framework Team. All rights reserved.")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: AssemblyDefaultAlias("OpenAlExamples.Lesson03")]
|
||||
[assembly: AssemblyDelaySign(false)]
|
||||
[assembly: AssemblyDescription("OpenAL Lesson 03 example.")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyInformationalVersion("1.0.0.0")]
|
||||
|
||||
[assembly: AssemblyKeyName("")]
|
||||
#if DEBUG
|
||||
[assembly: AssemblyProduct("OpenAlExamples.Lesson03.exe *** Debug Build ***")]
|
||||
#else
|
||||
[assembly: AssemblyProduct("OpenAlExamples.Lesson03.exe")]
|
||||
#endif
|
||||
[assembly: AssemblyTitle("OpenAL Lesson 03 example.")]
|
||||
[assembly: AssemblyTrademark("Tao Framework - http://www.taoframework.com")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: CLSCompliant(true)]
|
||||
[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
|
||||
[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.SkipVerification)]
|
||||
[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.UnmanagedCode)]
|
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
|
@ -1,371 +0,0 @@
|
|||
#region License
|
||||
/*
|
||||
MIT License
|
||||
Copyright ©2003-2005 Tao Framework Team
|
||||
http://www.taoframework.com
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
#endregion License
|
||||
|
||||
#region Original Credits / License
|
||||
// Jesse Maurais (lightonthewater@hotmail.com)
|
||||
#endregion Original Credits / License
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Timers;
|
||||
using Tao.OpenAl;
|
||||
|
||||
namespace OpenAlExamples {
|
||||
#region Class Documentation
|
||||
/// <summary>
|
||||
/// OpenAL Lesson 5: Sources Sharing Buffers
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Original Author: Jesse Maurais
|
||||
/// http://devmaster.net/articles/openal-tutorials/lesson5.php
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C# Implementation: Randy Ridge
|
||||
/// http://www.taoframework.com
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// Note the original author supplies two methods, InitOpenAL, and ExitOpenAL, that manually
|
||||
/// set up the OpenAL device and context and destroys them. These methods do *exactly* what
|
||||
/// Alut.alutInit() and Alut.alutExit() do. You can manually do so if you wish, but here
|
||||
/// I've elected just to use the Alut methods... You should however understand how to deal
|
||||
/// with this manually even if you're using Alut, just so you can have a clear understanding
|
||||
/// of what is going on.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
#endregion Class Documentation
|
||||
public sealed class Lesson05 {
|
||||
// --- Fields ---
|
||||
#region Private Fields
|
||||
// These index the buffers.
|
||||
private const int THUNDER = 0;
|
||||
private const int WATERDROP = 1;
|
||||
private const int STREAM = 2;
|
||||
private const int RAIN = 3;
|
||||
private const int CHIMES = 4;
|
||||
private const int OCEAN = 5;
|
||||
private const int NUM_BUFFERS = 6;
|
||||
|
||||
/*
|
||||
* These are OpenAL "names" (or "objects"). They store and id of a buffer
|
||||
* or a source object. Generally you would expect to see the implementation
|
||||
* use values that scale up from '1', but don't count on it. The spec does
|
||||
* not make this mandatory (as it is OpenGL). The id's can easily be memory
|
||||
* pointers as well. It will depend on the implementation.
|
||||
*/
|
||||
private static int[] buffer = new int[NUM_BUFFERS]; // Buffers to hold sound data.
|
||||
private static int source; // Sources are points of emitting sound.
|
||||
|
||||
/*
|
||||
* These are 3D cartesian vector coordinates. A structure or class would be
|
||||
* a more flexible of handling these, but for the sake of simplicity we will
|
||||
* just leave it as is.
|
||||
*/
|
||||
|
||||
// Position of the source sound.
|
||||
private static float[] sourcePosition = {0, 0, 0};
|
||||
|
||||
// Velocity of the source sound.
|
||||
private static float[] sourceVelocity = {0, 0, 0};
|
||||
|
||||
private static float[] listenerPosition = {0, 0, 0}; // Position of the Listener.
|
||||
private static float[] listenerVelocity = {0, 0, 0}; // Velocity of the Listener.
|
||||
|
||||
// Orientation of the Listener. (first 3 elements are "at", second 3 are "up")
|
||||
// Also note that these should be units of '1'.
|
||||
private static float[] listenerOrientation = {0, 0, -1, 0, 1, 0};
|
||||
#endregion Private Fields
|
||||
|
||||
// --- Entry Point ---
|
||||
#region Main()
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static void Main() {
|
||||
Console.WriteLine("MindCode's OpenAL Lesson 5: Sources Sharing Buffers");
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("Controls (followed by Enter):");
|
||||
Console.WriteLine("w) Water drops.");
|
||||
Console.WriteLine("t) Rolling thunder.");
|
||||
Console.WriteLine("s) Stream of trickling water.");
|
||||
Console.WriteLine("r) Rain.");
|
||||
Console.WriteLine("o) Lapping ocean waves.");
|
||||
Console.WriteLine("c) Wind chimes.");
|
||||
Console.WriteLine("q) Quit program.");
|
||||
|
||||
// Initialize OpenAL and clear the error bit.
|
||||
Alut.alutInit();
|
||||
Al.alGetError();
|
||||
|
||||
// Load the wav data.
|
||||
if(!LoadALData()) {
|
||||
Console.WriteLine("Error loading data.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Initialize the listener in OpenAL.
|
||||
SetListenerValues();
|
||||
|
||||
int c = 0;
|
||||
while(c != 'q' && c != 'Q') {
|
||||
c = Console.Read();
|
||||
|
||||
switch(c) {
|
||||
case 'w':
|
||||
case 'W':
|
||||
AddSource(WATERDROP);
|
||||
break;
|
||||
case 't':
|
||||
case 'T':
|
||||
AddSource(THUNDER);
|
||||
break;
|
||||
case 's':
|
||||
case 'S':
|
||||
AddSource(STREAM);
|
||||
break;
|
||||
case 'r':
|
||||
case 'R':
|
||||
AddSource(RAIN);
|
||||
break;
|
||||
case 'o':
|
||||
case 'O':
|
||||
AddSource(OCEAN);
|
||||
break;
|
||||
case 'c':
|
||||
case 'C':
|
||||
AddSource(CHIMES);
|
||||
break;
|
||||
};
|
||||
}
|
||||
|
||||
// Exit procedure to clean up and free OpenAL resources.
|
||||
KillALData();
|
||||
}
|
||||
#endregion Main()
|
||||
|
||||
// --- Lesson Methods ---
|
||||
#region AddSource(int type)
|
||||
private static void AddSource(int type) {
|
||||
Al.alGenSources(1, out source);
|
||||
if(Al.alGetError() != Al.AL_NO_ERROR) {
|
||||
Console.WriteLine("Error generating audio source.");
|
||||
Environment.Exit(-1);
|
||||
}
|
||||
|
||||
Al.alSourcei(source, Al.AL_BUFFER, buffer[type]);
|
||||
Al.alSourcei(source, Al.AL_BUFFER, buffer[type]);
|
||||
Al.alSourcef(source, Al.AL_PITCH, 1.0f);
|
||||
Al.alSourcef(source, Al.AL_GAIN, 1.0f);
|
||||
Al.alSourcefv(source, Al.AL_POSITION, sourcePosition);
|
||||
Al.alSourcefv(source, Al.AL_VELOCITY, sourceVelocity);
|
||||
Al.alSourcei(source, Al.AL_LOOPING, Al.AL_TRUE);
|
||||
|
||||
Al.alSourcePlay(source);
|
||||
}
|
||||
#endregion AddSource(int type)
|
||||
|
||||
#region string FindFile(string fileName)
|
||||
private static string FindFile(string fileName) {
|
||||
if(File.Exists(fileName)) {
|
||||
return fileName;
|
||||
}
|
||||
else if(File.Exists("Data/" + fileName)) {
|
||||
return "Data/" + fileName;
|
||||
}
|
||||
else if(File.Exists("../../Data/" + fileName)) {
|
||||
return "../../Data/" + fileName;
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
#endregion string FindFile(string fileName)
|
||||
|
||||
#region KillALData()
|
||||
/*
|
||||
* We have allocated memory for our buffers and sources which needs
|
||||
* to be returned to the system. This function frees that memory.
|
||||
*/
|
||||
private static void KillALData() {
|
||||
Al.alDeleteBuffers(NUM_BUFFERS, buffer);
|
||||
Al.alDeleteSources(1, ref source);
|
||||
Alut.alutExit();
|
||||
}
|
||||
#endregion KillALData()
|
||||
|
||||
#region bool LoadALData()
|
||||
/*
|
||||
* This function will load our sample data from the disk using the Alut
|
||||
* utility and send the data into OpenAL as a buffer. A source is then
|
||||
* also created to play that buffer.
|
||||
*/
|
||||
private static bool LoadALData() {
|
||||
// Variables to load into.
|
||||
int format;
|
||||
int size;
|
||||
IntPtr data = IntPtr.Zero;
|
||||
float frequency;
|
||||
//int loop;
|
||||
|
||||
// Generate an OpenAL buffer.
|
||||
Al.alGenBuffers(NUM_BUFFERS, buffer);
|
||||
if(Al.alGetError() != Al.AL_NO_ERROR) {
|
||||
return false;
|
||||
}
|
||||
|
||||
string fileName = "";
|
||||
|
||||
// Attempt to locate the file.
|
||||
fileName = FindFile("OpenAlExamples.Lesson05.Thunder.wav");
|
||||
if(fileName != null) {
|
||||
// Load wav.
|
||||
data = Alut.alutLoadMemoryFromFile(fileName, out format, out size, out frequency);
|
||||
if(data == IntPtr.Zero)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Load wav data into the generated buffer.
|
||||
Al.alBufferData(buffer[THUNDER], format, data, size, (int)frequency);
|
||||
//Alut.alutUnloadWAV(format, out data, size, frequency);
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Attempt to locate the file.
|
||||
fileName = FindFile("OpenAlExamples.Lesson05.Waterdrop.wav");
|
||||
if(fileName != null) {
|
||||
// Load wav.
|
||||
data = Alut.alutLoadMemoryFromFile(fileName, out format, out size, out frequency);
|
||||
if(data == IntPtr.Zero)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Load wav data into the generated buffer.
|
||||
Al.alBufferData(buffer[WATERDROP], format, data, size, (int)frequency);
|
||||
//Alut.alutUnloadWAV(format, out data, size, frequency);
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Attempt to locate the file.
|
||||
fileName = FindFile("OpenAlExamples.Lesson05.Stream.wav");
|
||||
if(fileName != null) {
|
||||
// Load wav.
|
||||
data = Alut.alutLoadMemoryFromFile(fileName, out format, out size, out frequency);
|
||||
if(data == IntPtr.Zero)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Load wav data into the generated buffer.
|
||||
Al.alBufferData(buffer[STREAM], format, data, size, (int)frequency);
|
||||
//Alut.alutUnloadWAV(format, out data, size, frequency);
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Attempt to locate the file.
|
||||
fileName = FindFile("OpenAlExamples.Lesson05.Rain.wav");
|
||||
if(fileName != null) {
|
||||
// Load wav.
|
||||
data = Alut.alutLoadMemoryFromFile(fileName, out format, out size, out frequency);
|
||||
if(data == IntPtr.Zero)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Load wav data into the generated buffer.
|
||||
Al.alBufferData(buffer[RAIN], format, data, size, (int)frequency);
|
||||
//Alut.alutUnloadWAV(format, out data, size, frequency);
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Attempt to locate the file.
|
||||
fileName = FindFile("OpenAlExamples.Lesson05.Ocean.wav");
|
||||
if(fileName != null) {
|
||||
// Load wav.
|
||||
data = Alut.alutLoadMemoryFromFile(fileName, out format, out size, out frequency);
|
||||
if(data == IntPtr.Zero)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Load wav data into the generated buffer.
|
||||
Al.alBufferData(buffer[OCEAN], format, data, size, (int)frequency);
|
||||
// Alut.alutUnloadWAV(format, out data, size, frequency);
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Attempt to locate the file.
|
||||
fileName = FindFile("OpenAlExamples.Lesson05.Chimes.wav");
|
||||
if(fileName != null) {
|
||||
// Load wav.
|
||||
data = Alut.alutLoadMemoryFromFile(fileName, out format, out size, out frequency);
|
||||
if(data == IntPtr.Zero)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Load wav data into the generated buffer.
|
||||
Al.alBufferData(buffer[CHIMES], format, data, size, (int)frequency);
|
||||
//Alut.alutUnloadWAV(format, out data, size, frequency);
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Do a final error check and then return.
|
||||
if(Al.alGetError() == Al.AL_NO_ERROR) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
#endregion bool LoadALData()
|
||||
|
||||
#region SetListenerValues()
|
||||
/*
|
||||
* We already defined certain values for the Listener, but we need
|
||||
* to tell OpenAL to use that data. This function does just that.
|
||||
*/
|
||||
private static void SetListenerValues() {
|
||||
Al.alListenerfv(Al.AL_POSITION, listenerPosition);
|
||||
Al.alListenerfv(Al.AL_VELOCITY, listenerVelocity);
|
||||
Al.alListenerfv(Al.AL_ORIENTATION, listenerOrientation);
|
||||
}
|
||||
#endregion SetListenerValues()
|
||||
}
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
#region License
|
||||
/*
|
||||
MIT License
|
||||
Copyright ©2003-2005 Tao Framework Team
|
||||
http://www.taoframework.com
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
#endregion License
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Security;
|
||||
using System.Security.Permissions;
|
||||
|
||||
[assembly: AllowPartiallyTrustedCallers]
|
||||
[assembly: AssemblyCompany("Tao Framework - http://www.taoframework.com")]
|
||||
#if DEBUG
|
||||
[assembly: AssemblyConfiguration("Debug")]
|
||||
#else
|
||||
[assembly: AssemblyConfiguration("Retail")]
|
||||
#endif
|
||||
[assembly: AssemblyCopyright("Copyright ©2003-2005 Tao Framework Team. All rights reserved.")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: AssemblyDefaultAlias("OpenAlExamples.Lesson05")]
|
||||
[assembly: AssemblyDelaySign(false)]
|
||||
[assembly: AssemblyDescription("OpenAL Lesson 05 example.")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyInformationalVersion("1.0.0.0")]
|
||||
|
||||
[assembly: AssemblyKeyName("")]
|
||||
#if DEBUG
|
||||
[assembly: AssemblyProduct("OpenAlExamples.Lesson05.exe *** Debug Build ***")]
|
||||
#else
|
||||
[assembly: AssemblyProduct("OpenAlExamples.Lesson05.exe")]
|
||||
#endif
|
||||
[assembly: AssemblyTitle("OpenAL Lesson 05 example.")]
|
||||
[assembly: AssemblyTrademark("Tao Framework - http://www.taoframework.com")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: CLSCompliant(true)]
|
||||
[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
|
||||
[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.SkipVerification)]
|
||||
[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.UnmanagedCode)]
|
|
@ -1,22 +0,0 @@
|
|||
MIT License
|
||||
Copyright ©2003-2005 Tao Framework Team
|
||||
http://www.taoframework.com
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,29 +0,0 @@
|
|||
OpenAlExamples
|
||||
Copyright ©2003-2005 Tao Framework Team
|
||||
http://www.taoframework.com
|
||||
All rights reserved.
|
||||
|
||||
These are C# ports of various OpenAL examples, most of which can be
|
||||
found at http://www.devmaster.net/articles.php?catID=6. They make use of
|
||||
OpenAL and some use FreeGLUT, make sure to have the appropriate native
|
||||
libraries for your system installed.
|
||||
|
||||
These examples aren't well documented, but they should be fairly easy
|
||||
to understand, particularly if you follow along with the originals,
|
||||
however, do not take them to be 'best practices' for .NET OpenAL and
|
||||
OpenGL development. The intent of these ports is as an introduction or
|
||||
as a comparison against the original native versions.
|
||||
|
||||
If you'd like to contribute you may want to try porting further OpenAL
|
||||
examples from http://www.devmaster.net/articles.php?catID=6 particularly
|
||||
lesson 08 and you might like to try porting the examples from the native
|
||||
OpenAL distribution.
|
||||
|
||||
Randy Ridge
|
||||
http://www.taoframework.com
|
||||
|
||||
|
||||
Change Log:
|
||||
|
||||
April 24, 2004
|
||||
Initial release, version 1.0.0.0.
|
|
@ -1,60 +0,0 @@
|
|||
#region License
|
||||
/*
|
||||
MIT License
|
||||
Copyright ©2003-2005 Tao Framework Team
|
||||
http://www.taoframework.com
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
#endregion License
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Security;
|
||||
using System.Security.Permissions;
|
||||
|
||||
[assembly: AllowPartiallyTrustedCallers]
|
||||
[assembly: AssemblyCompany("Tao Framework - http://www.taoframework.com")]
|
||||
#if DEBUG
|
||||
[assembly: AssemblyConfiguration("Debug")]
|
||||
#else
|
||||
[assembly: AssemblyConfiguration("Retail")]
|
||||
#endif
|
||||
[assembly: AssemblyCopyright("Copyright ©2003-2005 Tao Framework Team. All rights reserved.")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: AssemblyDefaultAlias("OpenAlExamples.Waterfall")]
|
||||
[assembly: AssemblyDelaySign(false)]
|
||||
[assembly: AssemblyDescription("OpenAL Waterfall example.")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyInformationalVersion("1.0.0.0")]
|
||||
|
||||
[assembly: AssemblyKeyName("")]
|
||||
#if DEBUG
|
||||
[assembly: AssemblyProduct("OpenAlExamples.Waterfall.exe *** Debug Build ***")]
|
||||
#else
|
||||
[assembly: AssemblyProduct("OpenAlExamples.Waterfall.exe")]
|
||||
#endif
|
||||
[assembly: AssemblyTitle("OpenAL Waterfall example.")]
|
||||
[assembly: AssemblyTrademark("Tao Framework - http://www.taoframework.com")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: CLSCompliant(true)]
|
||||
[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
|
||||
[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.SkipVerification)]
|
||||
[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.UnmanagedCode)]
|
|
@ -1,18 +0,0 @@
|
|||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1
|
||||
1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1
|
||||
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
|
||||
1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1
|
||||
1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1
|
||||
1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1
|
||||
1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1
|
||||
1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1
|
||||
1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1
|
||||
1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1
|
||||
1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1
|
||||
1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1
|
||||
1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1
|
||||
1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1
|
||||
1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1
|
||||
1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 192 KiB |
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 192 KiB |
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 192 KiB |
|
@ -1,849 +0,0 @@
|
|||
212
|
||||
0.000000 0.000000 0.000000 0.0 0.0 0
|
||||
2.000000 0.000000 0.000000 1.0 0.0 0
|
||||
2.000000 0.000000 2.000000 1.0 1.0 0
|
||||
0.000000 0.000000 2.000000 0.0 1.0 0
|
||||
2.000000 0.000000 0.000000 0.0 0.0 0
|
||||
4.000000 0.000000 0.000000 1.0 0.0 0
|
||||
4.000000 0.000000 2.000000 1.0 1.0 0
|
||||
2.000000 0.000000 2.000000 0.0 1.0 0
|
||||
4.000000 0.000000 0.000000 0.0 0.0 0
|
||||
6.000000 0.000000 0.000000 1.0 0.0 0
|
||||
6.000000 0.000000 2.000000 1.0 1.0 0
|
||||
4.000000 0.000000 2.000000 0.0 1.0 0
|
||||
6.000000 0.000000 0.000000 0.0 0.0 0
|
||||
8.000000 0.000000 0.000000 1.0 0.0 0
|
||||
8.000000 0.000000 2.000000 1.0 1.0 0
|
||||
6.000000 0.000000 2.000000 0.0 1.0 0
|
||||
9.000000 0.000000 0.000000 0.0 0.0 0
|
||||
11.000000 0.000000 0.000000 1.0 0.0 0
|
||||
11.000000 0.000000 2.000000 1.0 1.0 0
|
||||
9.000000 0.000000 2.000000 0.0 1.0 0
|
||||
11.000000 0.000000 0.000000 0.0 0.0 0
|
||||
13.000000 0.000000 0.000000 1.0 0.0 0
|
||||
13.000000 0.000000 2.000000 1.0 1.0 0
|
||||
11.000000 0.000000 2.000000 0.0 1.0 0
|
||||
13.000000 0.000000 0.000000 0.0 0.0 0
|
||||
15.000000 0.000000 0.000000 1.0 0.0 0
|
||||
15.000000 0.000000 2.000000 1.0 1.0 0
|
||||
13.000000 0.000000 2.000000 0.0 1.0 0
|
||||
15.000000 0.000000 0.000000 0.0 0.0 0
|
||||
17.000000 0.000000 0.000000 1.0 0.0 0
|
||||
17.000000 0.000000 2.000000 1.0 1.0 0
|
||||
15.000000 0.000000 2.000000 0.0 1.0 0
|
||||
0.000000 0.000000 2.000000 0.0 0.0 0
|
||||
2.000000 0.000000 2.000000 1.0 0.0 0
|
||||
2.000000 0.000000 4.000000 1.0 1.0 0
|
||||
0.000000 0.000000 4.000000 0.0 1.0 0
|
||||
2.000000 0.000000 2.000000 0.0 0.0 0
|
||||
4.000000 0.000000 2.000000 1.0 0.0 0
|
||||
4.000000 0.000000 4.000000 1.0 1.0 0
|
||||
2.000000 0.000000 4.000000 0.0 1.0 0
|
||||
4.000000 0.000000 2.000000 0.0 0.0 0
|
||||
6.000000 0.000000 2.000000 1.0 0.0 0
|
||||
6.000000 0.000000 4.000000 1.0 1.0 0
|
||||
4.000000 0.000000 4.000000 0.0 1.0 0
|
||||
6.000000 0.000000 2.000000 0.0 0.0 0
|
||||
8.000000 0.000000 2.000000 1.0 0.0 0
|
||||
8.000000 0.000000 4.000000 1.0 1.0 0
|
||||
6.000000 0.000000 4.000000 0.0 1.0 0
|
||||
9.000000 0.000000 2.000000 0.0 0.0 0
|
||||
11.000000 0.000000 2.000000 1.0 0.0 0
|
||||
11.000000 0.000000 4.000000 1.0 1.0 0
|
||||
9.000000 0.000000 4.000000 0.0 1.0 0
|
||||
11.000000 0.000000 2.000000 0.0 0.0 0
|
||||
13.000000 0.000000 2.000000 1.0 0.0 0
|
||||
13.000000 0.000000 4.000000 1.0 1.0 0
|
||||
11.000000 0.000000 4.000000 0.0 1.0 0
|
||||
13.000000 0.000000 2.000000 0.0 0.0 0
|
||||
15.000000 0.000000 2.000000 1.0 0.0 0
|
||||
15.000000 0.000000 4.000000 1.0 1.0 0
|
||||
13.000000 0.000000 4.000000 0.0 1.0 0
|
||||
15.000000 0.000000 2.000000 0.0 0.0 0
|
||||
17.000000 0.000000 2.000000 1.0 0.0 0
|
||||
17.000000 0.000000 4.000000 1.0 1.0 0
|
||||
15.000000 0.000000 4.000000 0.0 1.0 0
|
||||
0.000000 0.000000 4.000000 0.0 0.0 0
|
||||
2.000000 0.000000 4.000000 1.0 0.0 0
|
||||
2.000000 0.000000 6.000000 1.0 1.0 0
|
||||
0.000000 0.000000 6.000000 0.0 1.0 0
|
||||
2.000000 0.000000 4.000000 0.0 0.0 0
|
||||
4.000000 0.000000 4.000000 1.0 0.0 0
|
||||
4.000000 0.000000 6.000000 1.0 1.0 0
|
||||
2.000000 0.000000 6.000000 0.0 1.0 0
|
||||
4.000000 0.000000 4.000000 0.0 0.0 0
|
||||
6.000000 0.000000 4.000000 1.0 0.0 0
|
||||
6.000000 0.000000 6.000000 1.0 1.0 0
|
||||
4.000000 0.000000 6.000000 0.0 1.0 0
|
||||
6.000000 0.000000 4.000000 0.0 0.0 0
|
||||
8.000000 0.000000 4.000000 1.0 0.0 0
|
||||
8.000000 0.000000 6.000000 1.0 1.0 0
|
||||
6.000000 0.000000 6.000000 0.0 1.0 0
|
||||
9.000000 0.000000 4.000000 0.0 0.0 0
|
||||
11.000000 0.000000 4.000000 1.0 0.0 0
|
||||
11.000000 0.000000 6.000000 1.0 1.0 0
|
||||
9.000000 0.000000 6.000000 0.0 1.0 0
|
||||
11.000000 0.000000 4.000000 0.0 0.0 0
|
||||
13.000000 0.000000 4.000000 1.0 0.0 0
|
||||
13.000000 0.000000 6.000000 1.0 1.0 0
|
||||
11.000000 0.000000 6.000000 0.0 1.0 0
|
||||
13.000000 0.000000 4.000000 0.0 0.0 0
|
||||
15.000000 0.000000 4.000000 1.0 0.0 0
|
||||
15.000000 0.000000 6.000000 1.0 1.0 0
|
||||
13.000000 0.000000 6.000000 0.0 1.0 0
|
||||
15.000000 0.000000 4.000000 0.0 0.0 0
|
||||
17.000000 0.000000 4.000000 1.0 0.0 0
|
||||
17.000000 0.000000 6.000000 1.0 1.0 0
|
||||
15.000000 0.000000 6.000000 0.0 1.0 0
|
||||
0.000000 0.000000 6.000000 0.0 0.0 0
|
||||
2.000000 0.000000 6.000000 1.0 0.0 0
|
||||
2.000000 0.000000 8.000000 1.0 1.0 0
|
||||
0.000000 0.000000 8.000000 0.0 1.0 0
|
||||
2.000000 0.000000 6.000000 0.0 0.0 0
|
||||
4.000000 0.000000 6.000000 1.0 0.0 0
|
||||
4.000000 0.000000 8.000000 1.0 1.0 0
|
||||
2.000000 0.000000 8.000000 0.0 1.0 0
|
||||
4.000000 0.000000 6.000000 0.0 0.0 0
|
||||
6.000000 0.000000 6.000000 1.0 0.0 0
|
||||
6.000000 0.000000 8.000000 1.0 1.0 0
|
||||
4.000000 0.000000 8.000000 0.0 1.0 0
|
||||
6.000000 0.000000 6.000000 0.0 0.0 0
|
||||
8.000000 0.000000 6.000000 1.0 0.0 0
|
||||
8.000000 0.000000 8.000000 1.0 1.0 0
|
||||
6.000000 0.000000 8.000000 0.0 1.0 0
|
||||
9.000000 0.000000 6.000000 0.0 0.0 0
|
||||
11.000000 0.000000 6.000000 1.0 0.0 0
|
||||
11.000000 0.000000 8.000000 1.0 1.0 0
|
||||
9.000000 0.000000 8.000000 0.0 1.0 0
|
||||
11.000000 0.000000 6.000000 0.0 0.0 0
|
||||
13.000000 0.000000 6.000000 1.0 0.0 0
|
||||
13.000000 0.000000 8.000000 1.0 1.0 0
|
||||
11.000000 0.000000 8.000000 0.0 1.0 0
|
||||
13.000000 0.000000 6.000000 0.0 0.0 0
|
||||
15.000000 0.000000 6.000000 1.0 0.0 0
|
||||
15.000000 0.000000 8.000000 1.0 1.0 0
|
||||
13.000000 0.000000 8.000000 0.0 1.0 0
|
||||
15.000000 0.000000 6.000000 0.0 0.0 0
|
||||
17.000000 0.000000 6.000000 1.0 0.0 0
|
||||
17.000000 0.000000 8.000000 1.0 1.0 0
|
||||
15.000000 0.000000 8.000000 0.0 1.0 0
|
||||
0.000000 0.000000 8.000000 0.0 0.0 0
|
||||
2.000000 0.000000 8.000000 1.0 0.0 0
|
||||
2.000000 0.000000 10.000000 1.0 1.0 0
|
||||
0.000000 0.000000 10.000000 0.0 1.0 0
|
||||
2.000000 0.000000 8.000000 0.0 0.0 0
|
||||
4.000000 0.000000 8.000000 1.0 0.0 0
|
||||
4.000000 0.000000 10.000000 1.0 1.0 0
|
||||
2.000000 0.000000 10.000000 0.0 1.0 0
|
||||
4.000000 0.000000 8.000000 0.0 0.0 0
|
||||
6.000000 0.000000 8.000000 1.0 0.0 0
|
||||
6.000000 0.000000 10.000000 1.0 1.0 0
|
||||
4.000000 0.000000 10.000000 0.0 1.0 0
|
||||
6.000000 0.000000 8.000000 0.0 0.0 0
|
||||
8.000000 0.000000 8.000000 1.0 0.0 0
|
||||
8.000000 0.000000 10.000000 1.0 1.0 0
|
||||
6.000000 0.000000 10.000000 0.0 1.0 0
|
||||
9.000000 0.000000 8.000000 0.0 0.0 0
|
||||
11.000000 0.000000 8.000000 1.0 0.0 0
|
||||
11.000000 0.000000 10.000000 1.0 1.0 0
|
||||
9.000000 0.000000 10.000000 0.0 1.0 0
|
||||
11.000000 0.000000 8.000000 0.0 0.0 0
|
||||
13.000000 0.000000 8.000000 1.0 0.0 0
|
||||
13.000000 0.000000 10.000000 1.0 1.0 0
|
||||
11.000000 0.000000 10.000000 0.0 1.0 0
|
||||
13.000000 0.000000 8.000000 0.0 0.0 0
|
||||
15.000000 0.000000 8.000000 1.0 0.0 0
|
||||
15.000000 0.000000 10.000000 1.0 1.0 0
|
||||
13.000000 0.000000 10.000000 0.0 1.0 0
|
||||
15.000000 0.000000 8.000000 0.0 0.0 0
|
||||
17.000000 0.000000 8.000000 1.0 0.0 0
|
||||
17.000000 0.000000 10.000000 1.0 1.0 0
|
||||
15.000000 0.000000 10.000000 0.0 1.0 0
|
||||
0.000000 0.000000 10.000000 0.0 0.0 0
|
||||
2.000000 0.000000 10.000000 1.0 0.0 0
|
||||
2.000000 0.000000 12.000000 1.0 1.0 0
|
||||
0.000000 0.000000 12.000000 0.0 1.0 0
|
||||
2.000000 0.000000 10.000000 0.0 0.0 0
|
||||
4.000000 0.000000 10.000000 1.0 0.0 0
|
||||
4.000000 0.000000 12.000000 1.0 1.0 0
|
||||
2.000000 0.000000 12.000000 0.0 1.0 0
|
||||
4.000000 0.000000 10.000000 0.0 0.0 0
|
||||
6.000000 0.000000 10.000000 1.0 0.0 0
|
||||
6.000000 0.000000 12.000000 1.0 1.0 0
|
||||
4.000000 0.000000 12.000000 0.0 1.0 0
|
||||
6.000000 0.000000 10.000000 0.0 0.0 0
|
||||
8.000000 0.000000 10.000000 1.0 0.0 0
|
||||
8.000000 0.000000 12.000000 1.0 1.0 0
|
||||
6.000000 0.000000 12.000000 0.0 1.0 0
|
||||
9.000000 0.000000 10.000000 0.0 0.0 0
|
||||
11.000000 0.000000 10.000000 1.0 0.0 0
|
||||
11.000000 0.000000 12.000000 1.0 1.0 0
|
||||
9.000000 0.000000 12.000000 0.0 1.0 0
|
||||
11.000000 0.000000 10.000000 0.0 0.0 0
|
||||
13.000000 0.000000 10.000000 1.0 0.0 0
|
||||
13.000000 0.000000 12.000000 1.0 1.0 0
|
||||
11.000000 0.000000 12.000000 0.0 1.0 0
|
||||
13.000000 0.000000 10.000000 0.0 0.0 0
|
||||
15.000000 0.000000 10.000000 1.0 0.0 0
|
||||
15.000000 0.000000 12.000000 1.0 1.0 0
|
||||
13.000000 0.000000 12.000000 0.0 1.0 0
|
||||
15.000000 0.000000 10.000000 0.0 0.0 0
|
||||
17.000000 0.000000 10.000000 1.0 0.0 0
|
||||
17.000000 0.000000 12.000000 1.0 1.0 0
|
||||
15.000000 0.000000 12.000000 0.0 1.0 0
|
||||
0.000000 0.000000 12.000000 0.0 0.0 0
|
||||
2.000000 0.000000 12.000000 1.0 0.0 0
|
||||
2.000000 0.000000 14.000000 1.0 1.0 0
|
||||
0.000000 0.000000 14.000000 0.0 1.0 0
|
||||
2.000000 0.000000 12.000000 0.0 0.0 0
|
||||
4.000000 0.000000 12.000000 1.0 0.0 0
|
||||
4.000000 0.000000 14.000000 1.0 1.0 0
|
||||
2.000000 0.000000 14.000000 0.0 1.0 0
|
||||
4.000000 0.000000 12.000000 0.0 0.0 0
|
||||
6.000000 0.000000 12.000000 1.0 0.0 0
|
||||
6.000000 0.000000 14.000000 1.0 1.0 0
|
||||
4.000000 0.000000 14.000000 0.0 1.0 0
|
||||
6.000000 0.000000 12.000000 0.0 0.0 0
|
||||
8.000000 0.000000 12.000000 1.0 0.0 0
|
||||
8.000000 0.000000 14.000000 1.0 1.0 0
|
||||
6.000000 0.000000 14.000000 0.0 1.0 0
|
||||
9.000000 0.000000 12.000000 0.0 0.0 0
|
||||
11.000000 0.000000 12.000000 1.0 0.0 0
|
||||
11.000000 0.000000 14.000000 1.0 1.0 0
|
||||
9.000000 0.000000 14.000000 0.0 1.0 0
|
||||
11.000000 0.000000 12.000000 0.0 0.0 0
|
||||
13.000000 0.000000 12.000000 1.0 0.0 0
|
||||
13.000000 0.000000 14.000000 1.0 1.0 0
|
||||
11.000000 0.000000 14.000000 0.0 1.0 0
|
||||
13.000000 0.000000 12.000000 0.0 0.0 0
|
||||
15.000000 0.000000 12.000000 1.0 0.0 0
|
||||
15.000000 0.000000 14.000000 1.0 1.0 0
|
||||
13.000000 0.000000 14.000000 0.0 1.0 0
|
||||
15.000000 0.000000 12.000000 0.0 0.0 0
|
||||
17.000000 0.000000 12.000000 1.0 0.0 0
|
||||
17.000000 0.000000 14.000000 1.0 1.0 0
|
||||
15.000000 0.000000 14.000000 0.0 1.0 0
|
||||
0.000000 0.000000 14.000000 0.0 0.0 0
|
||||
2.000000 0.000000 14.000000 1.0 0.0 0
|
||||
2.000000 0.000000 16.000000 1.0 1.0 0
|
||||
0.000000 0.000000 16.000000 0.0 1.0 0
|
||||
2.000000 0.000000 14.000000 0.0 0.0 0
|
||||
4.000000 0.000000 14.000000 1.0 0.0 0
|
||||
4.000000 0.000000 16.000000 1.0 1.0 0
|
||||
2.000000 0.000000 16.000000 0.0 1.0 0
|
||||
4.000000 0.000000 14.000000 0.0 0.0 0
|
||||
6.000000 0.000000 14.000000 1.0 0.0 0
|
||||
6.000000 0.000000 16.000000 1.0 1.0 0
|
||||
4.000000 0.000000 16.000000 0.0 1.0 0
|
||||
6.000000 0.000000 14.000000 0.0 0.0 0
|
||||
8.000000 0.000000 14.000000 1.0 0.0 0
|
||||
8.000000 0.000000 16.000000 1.0 1.0 0
|
||||
6.000000 0.000000 16.000000 0.0 1.0 0
|
||||
9.000000 0.000000 14.000000 0.0 0.0 0
|
||||
11.000000 0.000000 14.000000 1.0 0.0 0
|
||||
11.000000 0.000000 16.000000 1.0 1.0 0
|
||||
9.000000 0.000000 16.000000 0.0 1.0 0
|
||||
11.000000 0.000000 14.000000 0.0 0.0 0
|
||||
13.000000 0.000000 14.000000 1.0 0.0 0
|
||||
13.000000 0.000000 16.000000 1.0 1.0 0
|
||||
11.000000 0.000000 16.000000 0.0 1.0 0
|
||||
13.000000 0.000000 14.000000 0.0 0.0 0
|
||||
15.000000 0.000000 14.000000 1.0 0.0 0
|
||||
15.000000 0.000000 16.000000 1.0 1.0 0
|
||||
13.000000 0.000000 16.000000 0.0 1.0 0
|
||||
15.000000 0.000000 14.000000 0.0 0.0 0
|
||||
17.000000 0.000000 14.000000 1.0 0.0 0
|
||||
17.000000 0.000000 16.000000 1.0 1.0 0
|
||||
15.000000 0.000000 16.000000 0.0 1.0 0
|
||||
0.000000 0.000000 0.000000 0.000000 0.000000 1
|
||||
2.000000 0.000000 0.000000 1.000000 0.000000 1
|
||||
2.000000 0.500000 0.000000 1.000000 0.250000 1
|
||||
0.000000 0.500000 0.000000 0.000000 0.250000 1
|
||||
2.000000 0.000000 0.000000 0.000000 0.000000 1
|
||||
4.000000 0.000000 0.000000 1.000000 0.000000 1
|
||||
4.000000 0.500000 0.000000 1.000000 0.250000 1
|
||||
2.000000 0.500000 0.000000 0.000000 0.250000 1
|
||||
4.000000 0.000000 0.000000 0.000000 0.000000 1
|
||||
6.000000 0.000000 0.000000 1.000000 0.000000 1
|
||||
6.000000 0.500000 0.000000 1.000000 0.250000 1
|
||||
4.000000 0.500000 0.000000 0.000000 0.250000 1
|
||||
6.000000 0.000000 0.000000 0.000000 0.000000 1
|
||||
8.000000 0.000000 0.000000 1.000000 0.000000 1
|
||||
8.000000 0.500000 0.000000 1.000000 0.250000 1
|
||||
6.000000 0.500000 0.000000 0.000000 0.250000 1
|
||||
8.000000 0.000000 0.000000 0.000000 0.000000 1
|
||||
10.000000 0.000000 0.000000 1.000000 0.000000 1
|
||||
10.000000 0.500000 0.000000 1.000000 0.250000 1
|
||||
8.000000 0.500000 0.000000 0.000000 0.250000 1
|
||||
10.000000 0.000000 0.000000 0.000000 0.000000 1
|
||||
12.000000 0.000000 0.000000 1.000000 0.000000 1
|
||||
12.000000 0.500000 0.000000 1.000000 0.250000 1
|
||||
10.000000 0.500000 0.000000 0.000000 0.250000 1
|
||||
12.000000 0.000000 0.000000 0.000000 0.000000 1
|
||||
14.000000 0.000000 0.000000 1.000000 0.000000 1
|
||||
14.000000 0.500000 0.000000 1.000000 0.250000 1
|
||||
12.000000 0.500000 0.000000 0.000000 0.250000 1
|
||||
14.000000 0.000000 0.000000 0.000000 0.000000 1
|
||||
16.000000 0.000000 0.000000 1.000000 0.000000 1
|
||||
16.000000 0.500000 0.000000 1.000000 0.250000 1
|
||||
14.000000 0.500000 0.000000 0.000000 0.250000 1
|
||||
16.000000 0.000000 0.000000 0.000000 0.000000 1
|
||||
17.000000 0.000000 0.000000 0.500000 0.000000 1
|
||||
17.000000 0.500000 0.000000 0.500000 0.250000 1
|
||||
16.000000 0.500000 0.000000 0.000000 0.250000 1
|
||||
-0.500000 0.000000 -0.500000 0.250000 0.000000 1
|
||||
0.000000 0.000000 -0.500000 0.500000 0.000000 1
|
||||
0.000000 0.500000 -0.500000 0.500000 0.250000 1
|
||||
-0.500000 0.500000 -0.500000 0.250000 0.250000 1
|
||||
0.000000 0.000000 -0.500000 0.000000 0.000000 1
|
||||
2.000000 0.000000 -0.500000 1.000000 0.000000 1
|
||||
2.000000 0.500000 -0.500000 1.000000 0.250000 1
|
||||
0.000000 0.500000 -0.500000 0.000000 0.250000 1
|
||||
2.000000 0.000000 -0.500000 0.000000 0.000000 1
|
||||
4.000000 0.000000 -0.500000 1.000000 0.000000 1
|
||||
4.000000 0.500000 -0.500000 1.000000 0.250000 1
|
||||
2.000000 0.500000 -0.500000 0.000000 0.250000 1
|
||||
4.000000 0.000000 -0.500000 0.000000 0.000000 1
|
||||
6.000000 0.000000 -0.500000 1.000000 0.000000 1
|
||||
6.000000 0.500000 -0.500000 1.000000 0.250000 1
|
||||
4.000000 0.500000 -0.500000 0.000000 0.250000 1
|
||||
6.000000 0.000000 -0.500000 0.000000 0.000000 1
|
||||
8.000000 0.000000 -0.500000 1.000000 0.000000 1
|
||||
8.000000 0.500000 -0.500000 1.000000 0.250000 1
|
||||
6.000000 0.500000 -0.500000 0.000000 0.250000 1
|
||||
8.000000 0.000000 -0.500000 0.000000 0.000000 1
|
||||
10.000000 0.000000 -0.500000 1.000000 0.000000 1
|
||||
10.000000 0.500000 -0.500000 1.000000 0.250000 1
|
||||
8.000000 0.500000 -0.500000 0.000000 0.250000 1
|
||||
10.000000 0.000000 -0.500000 0.000000 0.000000 1
|
||||
12.000000 0.000000 -0.500000 1.000000 0.000000 1
|
||||
12.000000 0.500000 -0.500000 1.000000 0.250000 1
|
||||
10.000000 0.500000 -0.500000 0.000000 0.250000 1
|
||||
12.000000 0.000000 -0.500000 0.000000 0.000000 1
|
||||
14.000000 0.000000 -0.500000 1.000000 0.000000 1
|
||||
14.000000 0.500000 -0.500000 1.000000 0.250000 1
|
||||
12.000000 0.500000 -0.500000 0.000000 0.250000 1
|
||||
14.000000 0.000000 -0.500000 0.000000 0.000000 1
|
||||
16.000000 0.000000 -0.500000 1.000000 0.000000 1
|
||||
16.000000 0.500000 -0.500000 1.000000 0.250000 1
|
||||
14.000000 0.500000 -0.500000 0.000000 0.250000 1
|
||||
16.000000 0.000000 -0.500000 0.000000 0.000000 1
|
||||
17.500000 0.000000 -0.500000 0.750000 0.000000 1
|
||||
17.500000 0.500000 -0.500000 0.750000 0.250000 1
|
||||
16.000000 0.500000 -0.500000 0.000000 0.250000 1
|
||||
-0.500000 0.500000 -0.500000 0.0 0.0 1
|
||||
0.000000 0.500000 -0.500000 1.0 0.0 1
|
||||
0.000000 0.500000 0.000000 1.0 1.0 1
|
||||
-0.500000 0.500000 0.000000 0.0 1.0 1
|
||||
0.000000 0.500000 -0.500000 0.0 0.0 1
|
||||
2.000000 0.500000 -0.500000 1.0 0.0 1
|
||||
2.000000 0.500000 0.000000 1.0 1.0 1
|
||||
0.000000 0.500000 0.000000 0.0 1.0 1
|
||||
2.000000 0.500000 -0.500000 0.0 0.0 1
|
||||
4.000000 0.500000 -0.500000 1.0 0.0 1
|
||||
4.000000 0.500000 0.000000 1.0 1.0 1
|
||||
2.000000 0.500000 0.000000 0.0 1.0 1
|
||||
4.000000 0.500000 -0.500000 0.0 0.0 1
|
||||
6.000000 0.500000 -0.500000 1.0 0.0 1
|
||||
6.000000 0.500000 0.000000 1.0 1.0 1
|
||||
4.000000 0.500000 0.000000 0.0 1.0 1
|
||||
6.000000 0.500000 -0.500000 0.0 0.0 1
|
||||
8.000000 0.500000 -0.500000 1.0 0.0 1
|
||||
8.000000 0.500000 0.000000 1.0 1.0 1
|
||||
6.000000 0.500000 0.000000 0.0 1.0 1
|
||||
8.000000 0.500000 -0.500000 0.0 0.0 1
|
||||
10.000000 0.500000 -0.500000 1.0 0.0 1
|
||||
10.000000 0.500000 0.000000 1.0 1.0 1
|
||||
8.000000 0.500000 0.000000 0.0 1.0 1
|
||||
10.000000 0.500000 -0.500000 0.0 0.0 1
|
||||
12.000000 0.500000 -0.500000 1.0 0.0 1
|
||||
12.000000 0.500000 0.000000 1.0 1.0 1
|
||||
10.000000 0.500000 0.000000 0.0 1.0 1
|
||||
12.000000 0.500000 -0.500000 0.0 0.0 1
|
||||
14.000000 0.500000 -0.500000 1.0 0.0 1
|
||||
14.000000 0.500000 0.000000 1.0 1.0 1
|
||||
12.000000 0.500000 0.000000 0.0 1.0 1
|
||||
14.000000 0.500000 -0.500000 0.0 0.0 1
|
||||
16.000000 0.500000 -0.500000 1.0 0.0 1
|
||||
16.000000 0.500000 0.000000 1.0 1.0 1
|
||||
14.000000 0.500000 0.000000 0.0 1.0 1
|
||||
16.000000 0.500000 -0.500000 0.0 0.0 1
|
||||
17.500000 0.500000 -0.500000 1.0 0.0 1
|
||||
17.500000 0.500000 0.000000 1.0 1.0 1
|
||||
16.000000 0.500000 0.000000 0.0 1.0 1
|
||||
0.000000 0.000000 0.000000 0.000000 0.000000 1
|
||||
0.000000 0.000000 2.000000 1.000000 0.000000 1
|
||||
0.000000 0.500000 2.000000 1.000000 0.250000 1
|
||||
0.000000 0.500000 0.000000 0.000000 0.250000 1
|
||||
0.000000 0.000000 2.000000 0.000000 0.000000 1
|
||||
0.000000 0.000000 4.000000 1.000000 0.000000 1
|
||||
0.000000 0.500000 4.000000 1.000000 0.250000 1
|
||||
0.000000 0.500000 2.000000 0.000000 0.250000 1
|
||||
0.000000 0.000000 4.000000 0.000000 0.000000 1
|
||||
0.000000 0.000000 6.000000 1.000000 0.000000 1
|
||||
0.000000 0.500000 6.000000 1.000000 0.250000 1
|
||||
0.000000 0.500000 4.000000 0.000000 0.250000 1
|
||||
0.000000 0.000000 6.000000 0.000000 0.000000 1
|
||||
0.000000 0.000000 8.000000 1.000000 0.000000 1
|
||||
0.000000 0.500000 8.000000 1.000000 0.250000 1
|
||||
0.000000 0.500000 6.000000 0.000000 0.250000 1
|
||||
0.000000 0.000000 8.000000 0.000000 0.000000 1
|
||||
0.000000 0.000000 10.000000 1.000000 0.000000 1
|
||||
0.000000 0.500000 10.000000 1.000000 0.250000 1
|
||||
0.000000 0.500000 8.000000 0.000000 0.250000 1
|
||||
0.000000 0.000000 10.000000 0.000000 0.000000 1
|
||||
0.000000 0.000000 12.000000 1.000000 0.000000 1
|
||||
0.000000 0.500000 12.000000 1.000000 0.250000 1
|
||||
0.000000 0.500000 10.000000 0.000000 0.250000 1
|
||||
0.000000 0.000000 12.000000 0.000000 0.000000 1
|
||||
0.000000 0.000000 14.000000 1.000000 0.000000 1
|
||||
0.000000 0.500000 14.000000 1.000000 0.250000 1
|
||||
0.000000 0.500000 12.000000 0.000000 0.250000 1
|
||||
0.000000 0.000000 14.000000 0.000000 0.000000 1
|
||||
0.000000 0.000000 16.000000 1.000000 0.000000 1
|
||||
0.000000 0.500000 16.000000 1.000000 0.250000 1
|
||||
0.000000 0.500000 14.000000 0.000000 0.250000 1
|
||||
-0.500000 0.000000 -0.500000 0.250000 0.000000 1
|
||||
-0.500000 0.000000 0.000000 0.500000 0.000000 1
|
||||
-0.500000 0.500000 0.000000 0.500000 0.250000 1
|
||||
-0.500000 0.500000 -0.500000 0.250000 0.250000 1
|
||||
-0.500000 0.000000 0.000000 0.000000 0.000000 1
|
||||
-0.500000 0.000000 2.000000 1.000000 0.000000 1
|
||||
-0.500000 0.500000 2.000000 1.000000 0.250000 1
|
||||
-0.500000 0.500000 0.000000 0.000000 0.250000 1
|
||||
-0.500000 0.000000 2.000000 0.000000 0.000000 1
|
||||
-0.500000 0.000000 4.000000 1.000000 0.000000 1
|
||||
-0.500000 0.500000 4.000000 1.000000 0.250000 1
|
||||
-0.500000 0.500000 2.000000 0.000000 0.250000 1
|
||||
-0.500000 0.000000 4.000000 0.000000 0.000000 1
|
||||
-0.500000 0.000000 6.000000 1.000000 0.000000 1
|
||||
-0.500000 0.500000 6.000000 1.000000 0.250000 1
|
||||
-0.500000 0.500000 4.000000 0.000000 0.250000 1
|
||||
-0.500000 0.000000 6.000000 0.000000 0.000000 1
|
||||
-0.500000 0.000000 8.000000 1.000000 0.000000 1
|
||||
-0.500000 0.500000 8.000000 1.000000 0.250000 1
|
||||
-0.500000 0.500000 6.000000 0.000000 0.250000 1
|
||||
-0.500000 0.000000 8.000000 0.000000 0.000000 1
|
||||
-0.500000 0.000000 10.000000 1.000000 0.000000 1
|
||||
-0.500000 0.500000 10.000000 1.000000 0.250000 1
|
||||
-0.500000 0.500000 8.000000 0.000000 0.250000 1
|
||||
-0.500000 0.000000 10.000000 0.000000 0.000000 1
|
||||
-0.500000 0.000000 12.000000 1.000000 0.000000 1
|
||||
-0.500000 0.500000 12.000000 1.000000 0.250000 1
|
||||
-0.500000 0.500000 10.000000 0.000000 0.250000 1
|
||||
-0.500000 0.000000 12.000000 0.000000 0.000000 1
|
||||
-0.500000 0.000000 14.000000 1.000000 0.000000 1
|
||||
-0.500000 0.500000 14.000000 1.000000 0.250000 1
|
||||
-0.500000 0.500000 12.000000 0.000000 0.250000 1
|
||||
-0.500000 0.000000 14.000000 0.000000 0.000000 1
|
||||
-0.500000 0.000000 16.000000 1.000000 0.000000 1
|
||||
-0.500000 0.500000 16.000000 1.000000 0.250000 1
|
||||
-0.500000 0.500000 14.000000 0.000000 0.250000 1
|
||||
-0.500000 0.500000 0.000000 0.0 0.0 1
|
||||
0.000000 0.500000 0.000000 1.0 0.0 1
|
||||
0.000000 0.500000 2.000000 1.0 1.0 1
|
||||
-0.500000 0.500000 2.000000 0.0 1.0 1
|
||||
-0.500000 0.500000 2.000000 0.0 0.0 1
|
||||
0.000000 0.500000 2.000000 1.0 0.0 1
|
||||
0.000000 0.500000 4.000000 1.0 1.0 1
|
||||
-0.500000 0.500000 4.000000 0.0 1.0 1
|
||||
-0.500000 0.500000 4.000000 0.0 0.0 1
|
||||
0.000000 0.500000 4.000000 1.0 0.0 1
|
||||
0.000000 0.500000 6.000000 1.0 1.0 1
|
||||
-0.500000 0.500000 6.000000 0.0 1.0 1
|
||||
-0.500000 0.500000 6.000000 0.0 0.0 1
|
||||
0.000000 0.500000 6.000000 1.0 0.0 1
|
||||
0.000000 0.500000 8.000000 1.0 1.0 1
|
||||
-0.500000 0.500000 8.000000 0.0 1.0 1
|
||||
-0.500000 0.500000 8.000000 0.0 0.0 1
|
||||
0.000000 0.500000 8.000000 1.0 0.0 1
|
||||
0.000000 0.500000 10.000000 1.0 1.0 1
|
||||
-0.500000 0.500000 10.000000 0.0 1.0 1
|
||||
-0.500000 0.500000 10.000000 0.0 0.0 1
|
||||
0.000000 0.500000 10.000000 1.0 0.0 1
|
||||
0.000000 0.500000 12.000000 1.0 1.0 1
|
||||
-0.500000 0.500000 12.000000 0.0 1.0 1
|
||||
-0.500000 0.500000 12.000000 0.0 0.0 1
|
||||
0.000000 0.500000 12.000000 1.0 0.0 1
|
||||
0.000000 0.500000 14.000000 1.0 1.0 1
|
||||
-0.500000 0.500000 14.000000 0.0 1.0 1
|
||||
-0.500000 0.500000 14.000000 0.0 0.0 1
|
||||
0.000000 0.500000 14.000000 1.0 0.0 1
|
||||
0.000000 0.500000 16.000000 1.0 1.0 1
|
||||
-0.500000 0.500000 16.000000 0.0 1.0 1
|
||||
17.000000 0.000000 0.000000 0.000000 0.000000 1
|
||||
17.000000 0.000000 2.000000 1.000000 0.000000 1
|
||||
17.000000 0.500000 2.000000 1.000000 0.250000 1
|
||||
17.000000 0.500000 0.000000 0.000000 0.250000 1
|
||||
17.000000 0.000000 2.000000 0.000000 0.000000 1
|
||||
17.000000 0.000000 4.000000 1.000000 0.000000 1
|
||||
17.000000 0.500000 4.000000 1.000000 0.250000 1
|
||||
17.000000 0.500000 2.000000 0.000000 0.250000 1
|
||||
17.000000 0.000000 4.000000 0.000000 0.000000 1
|
||||
17.000000 0.000000 6.000000 1.000000 0.000000 1
|
||||
17.000000 0.500000 6.000000 1.000000 0.250000 1
|
||||
17.000000 0.500000 4.000000 0.000000 0.250000 1
|
||||
17.000000 0.000000 6.000000 0.000000 0.000000 1
|
||||
17.000000 0.000000 8.000000 1.000000 0.000000 1
|
||||
17.000000 0.500000 8.000000 1.000000 0.250000 1
|
||||
17.000000 0.500000 6.000000 0.000000 0.250000 1
|
||||
17.000000 0.000000 8.000000 0.000000 0.000000 1
|
||||
17.000000 0.000000 10.000000 1.000000 0.000000 1
|
||||
17.000000 0.500000 10.000000 1.000000 0.250000 1
|
||||
17.000000 0.500000 8.000000 0.000000 0.250000 1
|
||||
17.000000 0.000000 10.000000 0.000000 0.000000 1
|
||||
17.000000 0.000000 12.000000 1.000000 0.000000 1
|
||||
17.000000 0.500000 12.000000 1.000000 0.250000 1
|
||||
17.000000 0.500000 10.000000 0.000000 0.250000 1
|
||||
17.000000 0.000000 12.000000 0.000000 0.000000 1
|
||||
17.000000 0.000000 14.000000 1.000000 0.000000 1
|
||||
17.000000 0.500000 14.000000 1.000000 0.250000 1
|
||||
17.000000 0.500000 12.000000 0.000000 0.250000 1
|
||||
17.000000 0.000000 14.000000 0.000000 0.000000 1
|
||||
17.000000 0.000000 16.000000 1.000000 0.000000 1
|
||||
17.000000 0.500000 16.000000 1.000000 0.250000 1
|
||||
17.000000 0.500000 14.000000 0.000000 0.250000 1
|
||||
17.500000 0.000000 -0.500000 0.250000 0.000000 1
|
||||
17.500000 0.000000 0.000000 0.500000 0.000000 1
|
||||
17.500000 0.500000 0.000000 0.500000 0.250000 1
|
||||
17.500000 0.500000 -0.500000 0.250000 0.250000 1
|
||||
17.500000 0.000000 0.000000 0.000000 0.000000 1
|
||||
17.500000 0.000000 2.000000 1.000000 0.000000 1
|
||||
17.500000 0.500000 2.000000 1.000000 0.250000 1
|
||||
17.500000 0.500000 0.000000 0.000000 0.250000 1
|
||||
17.500000 0.000000 2.000000 0.000000 0.000000 1
|
||||
17.500000 0.000000 4.000000 1.000000 0.000000 1
|
||||
17.500000 0.500000 4.000000 1.000000 0.250000 1
|
||||
17.500000 0.500000 2.000000 0.000000 0.250000 1
|
||||
17.500000 0.000000 4.000000 0.000000 0.000000 1
|
||||
17.500000 0.000000 6.000000 1.000000 0.000000 1
|
||||
17.500000 0.500000 6.000000 1.000000 0.250000 1
|
||||
17.500000 0.500000 4.000000 0.000000 0.250000 1
|
||||
17.500000 0.000000 6.000000 0.000000 0.000000 1
|
||||
17.500000 0.000000 8.000000 1.000000 0.000000 1
|
||||
17.500000 0.500000 8.000000 1.000000 0.250000 1
|
||||
17.500000 0.500000 6.000000 0.000000 0.250000 1
|
||||
17.500000 0.000000 8.000000 0.000000 0.000000 1
|
||||
17.500000 0.000000 10.000000 1.000000 0.000000 1
|
||||
17.500000 0.500000 10.000000 1.000000 0.250000 1
|
||||
17.500000 0.500000 8.000000 0.000000 0.250000 1
|
||||
17.500000 0.000000 10.000000 0.000000 0.000000 1
|
||||
17.500000 0.000000 12.000000 1.000000 0.000000 1
|
||||
17.500000 0.500000 12.000000 1.000000 0.250000 1
|
||||
17.500000 0.500000 10.000000 0.000000 0.250000 1
|
||||
17.500000 0.000000 12.000000 0.000000 0.000000 1
|
||||
17.500000 0.000000 14.000000 1.000000 0.000000 1
|
||||
17.500000 0.500000 14.000000 1.000000 0.250000 1
|
||||
17.500000 0.500000 12.000000 0.000000 0.250000 1
|
||||
17.500000 0.000000 14.000000 0.000000 0.000000 1
|
||||
17.500000 0.000000 16.000000 1.000000 0.000000 1
|
||||
17.500000 0.500000 16.000000 1.000000 0.250000 1
|
||||
17.500000 0.500000 14.000000 0.000000 0.250000 1
|
||||
17.000000 0.500000 0.000000 0.0 0.0 1
|
||||
17.500000 0.500000 0.000000 1.0 0.0 1
|
||||
17.500000 0.500000 2.000000 1.0 1.0 1
|
||||
17.000000 0.500000 2.000000 0.0 1.0 1
|
||||
17.000000 0.500000 2.000000 0.0 0.0 1
|
||||
17.500000 0.500000 2.000000 1.0 0.0 1
|
||||
17.500000 0.500000 4.000000 1.0 1.0 1
|
||||
17.000000 0.500000 4.000000 0.0 1.0 1
|
||||
17.000000 0.500000 4.000000 0.0 0.0 1
|
||||
17.500000 0.500000 4.000000 1.0 0.0 1
|
||||
17.500000 0.500000 6.000000 1.0 1.0 1
|
||||
17.000000 0.500000 6.000000 0.0 1.0 1
|
||||
17.000000 0.500000 6.000000 0.0 0.0 1
|
||||
17.500000 0.500000 6.000000 1.0 0.0 1
|
||||
17.500000 0.500000 8.000000 1.0 1.0 1
|
||||
17.000000 0.500000 8.000000 0.0 1.0 1
|
||||
17.000000 0.500000 8.000000 0.0 0.0 1
|
||||
17.500000 0.500000 8.000000 1.0 0.0 1
|
||||
17.500000 0.500000 10.000000 1.0 1.0 1
|
||||
17.000000 0.500000 10.000000 0.0 1.0 1
|
||||
17.000000 0.500000 10.000000 0.0 0.0 1
|
||||
17.500000 0.500000 10.000000 1.0 0.0 1
|
||||
17.500000 0.500000 12.000000 1.0 1.0 1
|
||||
17.000000 0.500000 12.000000 0.0 1.0 1
|
||||
17.000000 0.500000 12.000000 0.0 0.0 1
|
||||
17.500000 0.500000 12.000000 1.0 0.0 1
|
||||
17.500000 0.500000 14.000000 1.0 1.0 1
|
||||
17.000000 0.500000 14.000000 0.0 1.0 1
|
||||
17.000000 0.500000 14.000000 0.0 0.0 1
|
||||
17.500000 0.500000 14.000000 1.0 0.0 1
|
||||
17.500000 0.500000 16.000000 1.0 1.0 1
|
||||
17.000000 0.500000 16.000000 0.0 1.0 1
|
||||
8.000000 -2.000000 16.000000 0.000000 0.000000 2
|
||||
10.000000 -2.000000 16.000000 1.000000 0.000000 2
|
||||
10.000000 0.000000 16.000000 1.000000 1.000000 2
|
||||
8.000000 0.000000 16.000000 0.000000 1.000000 2
|
||||
0.000000 0.000000 16.000000 0.000000 0.000000 2
|
||||
2.000000 0.000000 16.000000 1.000000 0.000000 2
|
||||
2.000000 2.000000 16.000000 1.000000 1.000000 2
|
||||
0.000000 2.000000 16.000000 0.000000 1.000000 2
|
||||
2.000000 0.000000 16.000000 0.000000 0.000000 2
|
||||
4.000000 0.000000 16.000000 1.000000 0.000000 2
|
||||
4.000000 2.000000 16.000000 1.000000 1.000000 2
|
||||
2.000000 2.000000 16.000000 0.000000 1.000000 2
|
||||
4.000000 0.000000 16.000000 0.000000 0.000000 2
|
||||
6.000000 0.000000 16.000000 1.000000 0.000000 2
|
||||
6.000000 2.000000 16.000000 1.000000 1.000000 2
|
||||
4.000000 2.000000 16.000000 0.000000 1.000000 2
|
||||
6.000000 0.000000 16.000000 0.000000 0.000000 2
|
||||
8.000000 0.000000 16.000000 1.000000 0.000000 2
|
||||
8.000000 2.000000 16.000000 1.000000 1.000000 2
|
||||
6.000000 2.000000 16.000000 0.000000 1.000000 2
|
||||
8.000000 0.000000 16.000000 0.000000 0.000000 2
|
||||
10.000000 0.000000 16.000000 1.000000 0.000000 2
|
||||
10.000000 2.000000 16.000000 1.000000 1.000000 2
|
||||
8.000000 2.000000 16.000000 0.000000 1.000000 2
|
||||
10.000000 0.000000 16.000000 0.000000 0.000000 2
|
||||
12.000000 0.000000 16.000000 1.000000 0.000000 2
|
||||
12.000000 2.000000 16.000000 1.000000 1.000000 2
|
||||
10.000000 2.000000 16.000000 0.000000 1.000000 2
|
||||
12.000000 0.000000 16.000000 0.000000 0.000000 2
|
||||
14.000000 0.000000 16.000000 1.000000 0.000000 2
|
||||
14.000000 2.000000 16.000000 1.000000 1.000000 2
|
||||
12.000000 2.000000 16.000000 0.000000 1.000000 2
|
||||
14.000000 0.000000 16.000000 0.000000 0.000000 2
|
||||
17.000000 0.000000 16.000000 1.500000 0.000000 2
|
||||
17.000000 2.000000 16.000000 1.500000 1.000000 2
|
||||
14.000000 2.000000 16.000000 0.000000 1.000000 2
|
||||
0.000000 2.000000 16.000000 0.000000 0.000000 2
|
||||
2.000000 2.000000 16.000000 1.000000 0.000000 2
|
||||
2.000000 3.000000 16.000000 1.000000 0.500000 2
|
||||
0.000000 3.000000 16.000000 0.000000 0.500000 2
|
||||
2.000000 2.000000 16.000000 0.000000 0.000000 2
|
||||
4.000000 2.000000 16.000000 1.000000 0.000000 2
|
||||
4.000000 3.000000 16.000000 1.000000 0.500000 2
|
||||
2.000000 3.000000 16.000000 0.000000 0.500000 2
|
||||
4.000000 2.000000 16.000000 0.000000 0.000000 2
|
||||
6.000000 2.000000 16.000000 1.000000 0.000000 2
|
||||
6.000000 3.000000 16.000000 1.000000 0.500000 2
|
||||
4.000000 3.000000 16.000000 0.000000 0.500000 2
|
||||
6.000000 2.000000 16.000000 0.000000 0.000000 2
|
||||
8.000000 2.000000 16.000000 1.000000 0.000000 2
|
||||
8.000000 3.000000 16.000000 1.000000 0.500000 2
|
||||
6.000000 3.000000 16.000000 0.000000 0.500000 2
|
||||
9.000000 2.000000 16.000000 0.500000 0.000000 2
|
||||
10.000000 2.000000 16.000000 1.000000 0.000000 2
|
||||
10.000000 3.000000 16.000000 1.000000 0.500000 2
|
||||
9.000000 3.000000 16.000000 0.500000 0.500000 2
|
||||
10.000000 2.000000 16.000000 0.000000 0.000000 2
|
||||
12.000000 2.000000 16.000000 1.000000 0.000000 2
|
||||
12.000000 3.000000 16.000000 1.000000 0.500000 2
|
||||
10.000000 3.000000 16.000000 0.000000 0.500000 2
|
||||
12.000000 2.000000 16.000000 0.000000 0.000000 2
|
||||
14.000000 2.000000 16.000000 1.000000 0.000000 2
|
||||
14.000000 3.000000 16.000000 1.000000 0.500000 2
|
||||
12.000000 3.000000 16.000000 0.000000 0.500000 2
|
||||
14.000000 2.000000 16.000000 0.000000 0.000000 2
|
||||
17.000000 2.000000 16.000000 1.500000 0.000000 2
|
||||
17.000000 3.000000 16.000000 1.500000 0.500000 2
|
||||
14.000000 3.000000 16.000000 0.000000 0.500000 2
|
||||
9.000000 2.000000 16.000000 0.000000 0.000000 2
|
||||
9.000000 2.000000 24.000000 4.000000 0.000000 2
|
||||
9.000000 3.000000 24.000000 4.000000 0.500000 2
|
||||
9.000000 3.000000 16.000000 0.000000 0.500000 2
|
||||
8.000000 2.000000 16.000000 0.000000 0.000000 2
|
||||
8.000000 2.000000 24.000000 4.000000 0.000000 2
|
||||
8.000000 3.000000 24.000000 4.000000 0.500000 2
|
||||
8.000000 3.000000 16.000000 0.000000 0.500000 2
|
||||
8.000000 -0.600000 0.000000 0.0 0.0 2
|
||||
9.000000 -0.600000 0.000000 1.0 0.0 2
|
||||
9.000000 -0.600000 2.000000 1.0 1.0 2
|
||||
8.000000 -0.600000 2.000000 0.0 1.0 2
|
||||
8.000000 -0.600000 2.000000 0.0 0.0 2
|
||||
9.000000 -0.600000 2.000000 1.0 0.0 2
|
||||
9.000000 -0.600000 4.000000 1.0 1.0 2
|
||||
8.000000 -0.600000 4.000000 0.0 1.0 2
|
||||
8.000000 -0.600000 4.000000 0.0 0.0 2
|
||||
9.000000 -0.600000 4.000000 1.0 0.0 2
|
||||
9.000000 -0.600000 6.000000 1.0 1.0 2
|
||||
8.000000 -0.600000 6.000000 0.0 1.0 2
|
||||
8.000000 -0.600000 6.000000 0.0 0.0 2
|
||||
9.000000 -0.600000 6.000000 1.0 0.0 2
|
||||
9.000000 -0.600000 8.000000 1.0 1.0 2
|
||||
8.000000 -0.600000 8.000000 0.0 1.0 2
|
||||
8.000000 -0.600000 8.000000 0.0 0.0 2
|
||||
9.000000 -0.600000 8.000000 1.0 0.0 2
|
||||
9.000000 -0.600000 10.000000 1.0 1.0 2
|
||||
8.000000 -0.600000 10.000000 0.0 1.0 2
|
||||
8.000000 -0.600000 10.000000 0.0 0.0 2
|
||||
9.000000 -0.600000 10.000000 1.0 0.0 2
|
||||
9.000000 -0.600000 12.000000 1.0 1.0 2
|
||||
8.000000 -0.600000 12.000000 0.0 1.0 2
|
||||
8.000000 -0.600000 12.000000 0.0 0.0 2
|
||||
9.000000 -0.600000 12.000000 1.0 0.0 2
|
||||
9.000000 -0.600000 14.000000 1.0 1.0 2
|
||||
8.000000 -0.600000 14.000000 0.0 1.0 2
|
||||
8.000000 -0.600000 14.000000 0.0 0.0 2
|
||||
9.000000 -0.600000 14.000000 1.0 0.0 2
|
||||
9.000000 -0.600000 16.000000 1.0 1.0 2
|
||||
8.000000 -0.600000 16.000000 0.0 1.0 2
|
||||
8.000000 -0.600000 0.000000 0.000000 -0.300000 4
|
||||
8.000000 -0.600000 2.000000 1.000000 -0.300000 4
|
||||
8.000000 0.000000 2.000000 1.000000 0.000000 4
|
||||
8.000000 0.000000 0.000000 0.000000 0.000000 4
|
||||
8.000000 -0.600000 2.000000 0.000000 -0.300000 4
|
||||
8.000000 -0.600000 4.000000 1.000000 -0.300000 4
|
||||
8.000000 0.000000 4.000000 1.000000 0.000000 4
|
||||
8.000000 0.000000 2.000000 0.000000 0.000000 4
|
||||
8.000000 -0.600000 4.000000 0.000000 -0.300000 4
|
||||
8.000000 -0.600000 6.000000 1.000000 -0.300000 4
|
||||
8.000000 0.000000 6.000000 1.000000 0.000000 4
|
||||
8.000000 0.000000 4.000000 0.000000 0.000000 4
|
||||
8.000000 -0.600000 6.000000 0.000000 -0.300000 4
|
||||
8.000000 -0.600000 8.000000 1.000000 -0.300000 4
|
||||
8.000000 0.000000 8.000000 1.000000 0.000000 4
|
||||
8.000000 0.000000 6.000000 0.000000 0.000000 4
|
||||
8.000000 -0.600000 8.000000 0.000000 -0.300000 4
|
||||
8.000000 -0.600000 10.000000 1.000000 -0.300000 4
|
||||
8.000000 0.000000 10.000000 1.000000 0.000000 4
|
||||
8.000000 0.000000 8.000000 0.000000 0.000000 4
|
||||
8.000000 -0.600000 10.000000 0.000000 -0.300000 4
|
||||
8.000000 -0.600000 12.000000 1.000000 -0.300000 4
|
||||
8.000000 0.000000 12.000000 1.000000 0.000000 4
|
||||
8.000000 0.000000 10.000000 0.000000 0.000000 4
|
||||
8.000000 -0.600000 12.000000 0.000000 -0.300000 4
|
||||
8.000000 -0.600000 14.000000 1.000000 -0.300000 4
|
||||
8.000000 0.000000 14.000000 1.000000 0.000000 4
|
||||
8.000000 0.000000 12.000000 0.000000 0.000000 4
|
||||
8.000000 -0.600000 14.000000 0.000000 -0.300000 4
|
||||
8.000000 -0.600000 16.000000 1.000000 -0.300000 4
|
||||
8.000000 0.000000 16.000000 1.000000 0.000000 4
|
||||
8.000000 0.000000 14.000000 0.000000 0.000000 4
|
||||
9.000000 -0.600000 0.000000 0.000000 -0.300000 4
|
||||
9.000000 -0.600000 2.000000 1.000000 -0.300000 4
|
||||
9.000000 0.000000 2.000000 1.000000 0.000000 4
|
||||
9.000000 0.000000 0.000000 0.000000 0.000000 4
|
||||
9.000000 -0.600000 2.000000 0.000000 -0.300000 4
|
||||
9.000000 -0.600000 4.000000 1.000000 -0.300000 4
|
||||
9.000000 0.000000 4.000000 1.000000 0.000000 4
|
||||
9.000000 0.000000 2.000000 0.000000 0.000000 4
|
||||
9.000000 -0.600000 4.000000 0.000000 -0.300000 4
|
||||
9.000000 -0.600000 6.000000 1.000000 -0.300000 4
|
||||
9.000000 0.000000 6.000000 1.000000 0.000000 4
|
||||
9.000000 0.000000 4.000000 0.000000 0.000000 4
|
||||
9.000000 -0.600000 6.000000 0.000000 -0.300000 4
|
||||
9.000000 -0.600000 8.000000 1.000000 -0.300000 4
|
||||
9.000000 0.000000 8.000000 1.000000 0.000000 4
|
||||
9.000000 0.000000 6.000000 0.000000 0.000000 4
|
||||
9.000000 -0.600000 8.000000 0.000000 -0.300000 4
|
||||
9.000000 -0.600000 10.000000 1.000000 -0.300000 4
|
||||
9.000000 0.000000 10.000000 1.000000 0.000000 4
|
||||
9.000000 0.000000 8.000000 0.000000 0.000000 4
|
||||
9.000000 -0.600000 10.000000 0.000000 -0.300000 4
|
||||
9.000000 -0.600000 12.000000 1.000000 -0.300000 4
|
||||
9.000000 0.000000 12.000000 1.000000 0.000000 4
|
||||
9.000000 0.000000 10.000000 0.000000 0.000000 4
|
||||
9.000000 -0.600000 12.000000 0.000000 -0.300000 4
|
||||
9.000000 -0.600000 14.000000 1.000000 -0.300000 4
|
||||
9.000000 0.000000 14.000000 1.000000 0.000000 4
|
||||
9.000000 0.000000 12.000000 0.000000 0.000000 4
|
||||
9.000000 -0.600000 14.000000 0.000000 -0.300000 4
|
||||
9.000000 -0.600000 16.000000 1.000000 -0.300000 4
|
||||
9.000000 0.000000 16.000000 1.000000 0.000000 4
|
||||
9.000000 0.000000 14.000000 0.000000 0.000000 4
|
||||
8.000000 -0.500000 0.000000 0.000000 -0.250000 4
|
||||
9.000000 -0.500000 0.000000 0.500000 -0.250000 4
|
||||
9.000000 0.000000 0.000000 0.500000 0.000000 4
|
||||
8.000000 0.000000 0.000000 0.000000 0.000000 4
|
||||
7.750000 0.001000 13.000000 0.0 0.0 5
|
||||
9.250000 0.001000 13.000000 1.0 0.0 5
|
||||
9.250000 0.001000 14.000000 1.0 1.0 5
|
||||
7.750000 0.001000 14.000000 0.0 1.0 5
|
||||
7.750000 0.400000 13.000000 0.875000 0.200000 5
|
||||
9.250000 0.400000 13.000000 1.625000 0.200000 5
|
||||
9.250000 0.450000 13.000000 1.625000 0.225000 5
|
||||
7.750000 0.450000 13.000000 0.875000 0.225000 5
|
||||
7.750000 0.400000 13.050000 0.875000 0.200000 5
|
||||
9.250000 0.400000 13.050000 1.625000 0.200000 5
|
||||
9.250000 0.450000 13.050000 1.625000 0.225000 5
|
||||
7.750000 0.450000 13.050000 0.875000 0.225000 5
|
||||
7.750000 0.400000 13.000000 0.0 0.0 5
|
||||
9.250000 0.400000 13.000000 1.0 0.0 5
|
||||
9.250000 0.400000 13.050000 1.0 1.0 5
|
||||
7.750000 0.400000 13.050000 0.0 1.0 5
|
||||
7.750000 0.450000 13.000000 0.0 0.0 5
|
||||
9.250000 0.450000 13.000000 1.0 0.0 5
|
||||
9.250000 0.450000 13.050000 1.0 1.0 5
|
||||
7.750000 0.450000 13.050000 0.0 1.0 5
|
||||
7.750000 0.400000 13.950000 0.875000 0.200000 5
|
||||
9.250000 0.400000 13.950000 1.625000 0.200000 5
|
||||
9.250000 0.450000 13.950000 1.625000 0.225000 5
|
||||
7.750000 0.450000 13.950000 0.875000 0.225000 5
|
||||
7.750000 0.400000 14.000000 0.875000 0.200000 5
|
||||
9.250000 0.400000 14.000000 1.625000 0.200000 5
|
||||
9.250000 0.450000 14.000000 1.625000 0.225000 5
|
||||
7.750000 0.450000 14.000000 0.875000 0.225000 5
|
||||
7.750000 0.400000 13.950000 0.0 0.0 5
|
||||
9.250000 0.400000 13.950000 1.0 0.0 5
|
||||
9.250000 0.400000 14.000000 1.0 1.0 5
|
||||
7.750000 0.400000 14.000000 0.0 1.0 5
|
||||
7.750000 0.450000 13.950000 0.0 0.0 5
|
||||
9.250000 0.450000 13.950000 1.0 0.0 5
|
||||
9.250000 0.450000 14.000000 1.0 1.0 5
|
||||
7.750000 0.450000 14.000000 0.0 1.0 5
|
||||
7.750000 0.000000 13.000000 0.875000 0.000000 5
|
||||
7.800000 0.000000 13.000000 0.900000 0.000000 5
|
||||
7.800000 0.400000 13.000000 0.900000 0.200000 5
|
||||
7.750000 0.400000 13.000000 0.875000 0.200000 5
|
||||
7.750000 0.000000 13.050000 0.875000 0.000000 5
|
||||
7.800000 0.000000 13.050000 0.900000 0.000000 5
|
||||
7.800000 0.400000 13.050000 0.900000 0.200000 5
|
||||
7.750000 0.400000 13.050000 0.875000 0.200000 5
|
||||
7.750000 0.000000 13.000000 0.500000 0.000000 5
|
||||
7.750000 0.000000 13.050000 0.525000 0.000000 5
|
||||
7.750000 0.450000 13.050000 0.525000 0.225000 5
|
||||
7.750000 0.450000 13.000000 0.500000 0.225000 5
|
||||
7.800000 0.000000 13.000000 0.500000 0.000000 5
|
||||
7.800000 0.000000 13.050000 0.525000 0.000000 5
|
||||
7.800000 0.400000 13.050000 0.525000 0.200000 5
|
||||
7.800000 0.400000 13.000000 0.500000 0.200000 5
|
||||
7.750000 0.000000 13.950000 0.875000 0.000000 5
|
||||
7.800000 0.000000 13.950000 0.900000 0.000000 5
|
||||
7.800000 0.400000 13.950000 0.900000 0.200000 5
|
||||
7.750000 0.400000 13.950000 0.875000 0.200000 5
|
||||
7.750000 0.000000 14.000000 0.875000 0.000000 5
|
||||
7.800000 0.000000 14.000000 0.900000 0.000000 5
|
||||
7.800000 0.400000 14.000000 0.900000 0.200000 5
|
||||
7.750000 0.400000 14.000000 0.875000 0.200000 5
|
||||
7.750000 0.000000 13.950000 0.975000 0.000000 5
|
||||
7.750000 0.000000 14.000000 1.000000 0.000000 5
|
||||
7.750000 0.450000 14.000000 1.000000 0.225000 5
|
||||
7.750000 0.450000 13.950000 0.975000 0.225000 5
|
||||
7.800000 0.000000 13.950000 0.975000 0.000000 5
|
||||
7.800000 0.000000 14.000000 1.000000 0.000000 5
|
||||
7.800000 0.400000 14.000000 1.000000 0.200000 5
|
||||
7.800000 0.400000 13.950000 0.975000 0.200000 5
|
||||
9.200000 0.000000 13.000000 0.600000 0.000000 5
|
||||
9.250000 0.000000 13.000000 0.625000 0.000000 5
|
||||
9.250000 0.400000 13.000000 0.625000 0.200000 5
|
||||
9.200000 0.400000 13.000000 0.600000 0.200000 5
|
||||
9.200000 0.000000 13.050000 0.600000 0.000000 5
|
||||
9.250000 0.000000 13.050000 0.625000 0.000000 5
|
||||
9.250000 0.400000 13.050000 0.625000 0.200000 5
|
||||
9.200000 0.400000 13.050000 0.600000 0.200000 5
|
||||
9.200000 0.000000 13.000000 0.500000 0.000000 5
|
||||
9.200000 0.000000 13.050000 0.525000 0.000000 5
|
||||
9.200000 0.400000 13.050000 0.525000 0.200000 5
|
||||
9.200000 0.400000 13.000000 0.500000 0.200000 5
|
||||
9.250000 0.000000 13.000000 0.500000 0.000000 5
|
||||
9.250000 0.000000 13.050000 0.525000 0.000000 5
|
||||
9.250000 0.450000 13.050000 0.525000 0.225000 5
|
||||
9.250000 0.450000 13.000000 0.500000 0.225000 5
|
||||
9.200000 0.000000 13.950000 0.600000 0.000000 5
|
||||
9.250000 0.000000 13.950000 0.625000 0.000000 5
|
||||
9.250000 0.400000 13.950000 0.625000 0.200000 5
|
||||
9.200000 0.400000 13.950000 0.600000 0.200000 5
|
||||
9.200000 0.000000 14.000000 0.600000 0.000000 5
|
||||
9.250000 0.000000 14.000000 0.625000 0.000000 5
|
||||
9.250000 0.400000 14.000000 0.625000 0.200000 5
|
||||
9.200000 0.400000 14.000000 0.600000 0.200000 5
|
||||
9.200000 0.000000 13.950000 0.975000 0.000000 5
|
||||
9.200000 0.000000 14.000000 1.000000 0.000000 5
|
||||
9.200000 0.400000 14.000000 1.000000 0.200000 5
|
||||
9.200000 0.400000 13.950000 0.975000 0.200000 5
|
||||
9.250000 0.000000 13.950000 0.975000 0.000000 5
|
||||
9.250000 0.000000 14.000000 1.000000 0.000000 5
|
||||
9.250000 0.450000 14.000000 1.000000 0.225000 5
|
||||
9.250000 0.450000 13.950000 0.975000 0.225000 5
|
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 65 KiB |
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 192 KiB |
|
@ -1,37 +0,0 @@
|
|||
9
|
||||
8.000000 -0.500000 15.000000 0.0 0.0 3
|
||||
9.000000 -0.500000 15.000000 1.0 0.0 3
|
||||
9.000000 2.000000 16.000000 1.0 1.0 3
|
||||
8.000000 2.000000 16.000000 0.0 1.0 3
|
||||
8.000000 -0.500000 0.000000 0.0 0.0 3
|
||||
9.000000 -0.500000 0.000000 1.0 0.0 3
|
||||
9.000000 -0.500000 2.000000 1.0 1.0 3
|
||||
8.000000 -0.500000 2.000000 0.0 1.0 3
|
||||
8.000000 -0.500000 2.000000 0.0 0.0 3
|
||||
9.000000 -0.500000 2.000000 1.0 0.0 3
|
||||
9.000000 -0.500000 4.000000 1.0 1.0 3
|
||||
8.000000 -0.500000 4.000000 0.0 1.0 3
|
||||
8.000000 -0.500000 4.000000 0.0 0.0 3
|
||||
9.000000 -0.500000 4.000000 1.0 0.0 3
|
||||
9.000000 -0.500000 6.000000 1.0 1.0 3
|
||||
8.000000 -0.500000 6.000000 0.0 1.0 3
|
||||
8.000000 -0.500000 6.000000 0.0 0.0 3
|
||||
9.000000 -0.500000 6.000000 1.0 0.0 3
|
||||
9.000000 -0.500000 8.000000 1.0 1.0 3
|
||||
8.000000 -0.500000 8.000000 0.0 1.0 3
|
||||
8.000000 -0.500000 8.000000 0.0 0.0 3
|
||||
9.000000 -0.500000 8.000000 1.0 0.0 3
|
||||
9.000000 -0.500000 10.000000 1.0 1.0 3
|
||||
8.000000 -0.500000 10.000000 0.0 1.0 3
|
||||
8.000000 -0.500000 10.000000 0.0 0.0 3
|
||||
9.000000 -0.500000 10.000000 1.0 0.0 3
|
||||
9.000000 -0.500000 12.000000 1.0 1.0 3
|
||||
8.000000 -0.500000 12.000000 0.0 1.0 3
|
||||
8.000000 -0.500000 12.000000 0.0 0.0 3
|
||||
9.000000 -0.500000 12.000000 1.0 0.0 3
|
||||
9.000000 -0.500000 14.000000 1.0 1.0 3
|
||||
8.000000 -0.500000 14.000000 0.0 1.0 3
|
||||
8.000000 -0.500000 14.000000 0.0 0.0 3
|
||||
9.000000 -0.500000 14.000000 1.0 0.0 3
|
||||
9.000000 -0.500000 15.000000 1.0 1.0 3
|
||||
8.000000 -0.500000 15.000000 0.0 1.0 3
|
Двоичный файл не отображается.
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 192 KiB |
|
@ -1,173 +0,0 @@
|
|||
#region License
|
||||
/*
|
||||
MIT License
|
||||
Copyright ©2003-2005 Tao Framework Team
|
||||
http://www.taoframework.com
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
#endregion License
|
||||
|
||||
#region Original Credits / License
|
||||
// Dan Ricart (ricart3@tcnj.edu)
|
||||
#endregion Original Credits / License
|
||||
|
||||
using System;
|
||||
using Tao.OpenAl;
|
||||
|
||||
namespace OpenAlExamples {
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class Sound {
|
||||
// --- Fields ---
|
||||
#region Private Fields
|
||||
private IntPtr buffer = IntPtr.Zero;
|
||||
private int format;
|
||||
private float frequency;
|
||||
private int length;
|
||||
private int sourceId;
|
||||
private int bufferId;
|
||||
#endregion Private Fields
|
||||
|
||||
// --- Public Methods ---
|
||||
#region Destroy()
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public void Destroy() {
|
||||
Al.alDeleteSources(1, ref sourceId);
|
||||
Al.alDeleteBuffers(1, ref bufferId);
|
||||
}
|
||||
#endregion Destroy()
|
||||
|
||||
#region Play()
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public void Play() {
|
||||
Al.alSourcePlay(sourceId);
|
||||
}
|
||||
#endregion Play()
|
||||
|
||||
#region Load(string fileName, bool shouldLoop)
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="fileName"></param>
|
||||
/// <param name="shouldLoop"></param>
|
||||
public void Load(string fileName, bool shouldLoop) {
|
||||
// Load our sound
|
||||
//int looping;
|
||||
buffer = Alut.alutLoadMemoryFromFile(fileName, out format, out length, out frequency);
|
||||
//looping = shouldLoop ? Al.AL_TRUE : Al.AL_FALSE;
|
||||
|
||||
Al.alGenSources(1, out sourceId);
|
||||
Al.alGenBuffers(1, out bufferId);
|
||||
Al.alBufferData(bufferId, format, buffer, length, (int)frequency);
|
||||
Al.alSourcei(sourceId, Al.AL_BUFFER, bufferId);
|
||||
|
||||
//Alut.alutUnloadWAV(format, out buffer, length, frequency);
|
||||
|
||||
// Set the pitch
|
||||
Al.alSourcef(sourceId, Al.AL_PITCH, 1.0f);
|
||||
// Set the gain
|
||||
Al.alSourcef(sourceId, Al.AL_GAIN, 1.0f);
|
||||
// Set looping to loop
|
||||
Al.alSourcei(sourceId, Al.AL_LOOPING, 0);
|
||||
}
|
||||
#endregion Load(string fileName, bool shouldLoop)
|
||||
|
||||
#region SetListenerOrientation(float fx, float fy, float fz, float ux, float uy, float uz)
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="fx"></param>
|
||||
/// <param name="fy"></param>
|
||||
/// <param name="fz"></param>
|
||||
/// <param name="ux"></param>
|
||||
/// <param name="uy"></param>
|
||||
/// <param name="uz"></param>
|
||||
public void SetListenerOrientation(float fx, float fy, float fz, float ux, float uy, float uz) {
|
||||
//set the orientation using an array of floats
|
||||
float[] vec = new float[6];
|
||||
vec[0] = fx;
|
||||
vec[1] = fy;
|
||||
vec[2] = fz;
|
||||
vec[3] = ux;
|
||||
vec[4] = uy;
|
||||
vec[5] = uz;
|
||||
Al.alListenerfv(Al.AL_ORIENTATION, vec);
|
||||
}
|
||||
#endregion SetListenerOrientation(float fx, float fy, float fz, float ux, float uy, float uz)
|
||||
|
||||
#region SetListenerPosition(float x, float y, float z)
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="x"></param>
|
||||
/// <param name="y"></param>
|
||||
/// <param name="z"></param>
|
||||
public void SetListenerPosition(float x, float y, float z) {
|
||||
// Set the position using 3 seperate floats
|
||||
Al.alListener3f(Al.AL_POSITION, x, y, z);
|
||||
}
|
||||
#endregion SetListenerPosition(float x, float y, float z)
|
||||
|
||||
#region SetProperties(float x, float y, float z, float vx, float vy, float vz)
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="x"></param>
|
||||
/// <param name="y"></param>
|
||||
/// <param name="z"></param>
|
||||
/// <param name="vx"></param>
|
||||
/// <param name="vy"></param>
|
||||
/// <param name="vz"></param>
|
||||
public void SetProperties(float x, float y, float z, float vx, float vy, float vz) {
|
||||
// Set the sounds position and velocity
|
||||
Al.alSource3f(sourceId, Al.AL_POSITION, x, y, z);
|
||||
Al.alSource3f(sourceId, Al.AL_VELOCITY, vx, vy, vz);
|
||||
}
|
||||
#endregion SetProperties(float x, float y, float z, float vx, float vy, float vz)
|
||||
|
||||
#region SetSourceRelative()
|
||||
// This function makes a sound source relative so all direction and velocity
|
||||
// parameters become relative to the source rather than the listener. This is
|
||||
// useful for background music that you want to stay constant relative to the listener
|
||||
// no matter where they go.
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public void SetSourceRelative() {
|
||||
Al.alSourcei(sourceId, Al.AL_SOURCE_RELATIVE, Al.AL_TRUE);
|
||||
}
|
||||
#endregion SetSourceRelative()
|
||||
|
||||
#region Stop()
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public void Stop() {
|
||||
Al.alSourceStop(sourceId);
|
||||
}
|
||||
#endregion Stop()
|
||||
}
|
||||
}
|
|
@ -1,568 +0,0 @@
|
|||
#region License
|
||||
/*
|
||||
MIT License
|
||||
Copyright ©2003-2005 Tao Framework Team
|
||||
http://www.taoframework.com
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
#endregion License
|
||||
|
||||
#region Original Credits / License
|
||||
// Dan Ricart (ricart3@tcnj.edu)
|
||||
#endregion Original Credits / License
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Tao.FreeGlut;
|
||||
using Tao.OpenAl;
|
||||
using Tao.OpenGl;
|
||||
|
||||
namespace OpenAlExamples {
|
||||
#region Class Documentation
|
||||
/// <summary>
|
||||
/// Programming 3D Sound With OpenAL
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Original Author: Dan Ricart
|
||||
/// http://devmaster.net/articles/openal/openal.php
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C# Implementation: Randy Ridge
|
||||
/// http://www.taoframework.com
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// The author's original code used Windows-specific code for window management, OpenGL
|
||||
/// context creation, timing, and input. I've taken the liberty of using GLUT such that
|
||||
/// it cross-platform for those non-Windows users. It's not quite as smooth in the
|
||||
/// animation and control due to TickCount being a poor timer and my poor conversion of
|
||||
/// the mouse handling, however, it's good enough to get by.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
#endregion Class Documentation
|
||||
public sealed class Waterfall {
|
||||
// --- Fields ---
|
||||
#region Private Constants
|
||||
private const float PI_OVER_180 = 0.0174532925f;
|
||||
#endregion Private Constants
|
||||
|
||||
#region Private Fields
|
||||
// private static int window;
|
||||
// private static int windowWidth;
|
||||
// private static int windowHeight;
|
||||
private static float heading;
|
||||
private static float xPosition;
|
||||
private static float yPosition;
|
||||
private static float zPosition;
|
||||
private static float yRotation;
|
||||
private static float pitch;
|
||||
private static float waterOffset;
|
||||
private static int[] texture = new int[6];
|
||||
private static Sound sound = new Sound();
|
||||
private static int[ , ] collisionArray = new int[18, 19];
|
||||
private static int polygonCount;
|
||||
private static int waterPolygonCount;
|
||||
private static Polygon[] polygons;
|
||||
private static Polygon[] waterPolygons;
|
||||
private static float currentTime;
|
||||
private static float oldTime;
|
||||
private static float timeElapsed;
|
||||
private static float secondsPerFrame;
|
||||
private static float desiredDistance = 2.0f;
|
||||
private static float movementValue;
|
||||
private static int oldMouseX;
|
||||
private static int oldMouseY;
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Structs
|
||||
private struct Polygon {
|
||||
public float[] X;
|
||||
public float[] Y;
|
||||
public float[] Z;
|
||||
public float[] U;
|
||||
public float[] V;
|
||||
public int TextureId;
|
||||
}
|
||||
#endregion Private Structs
|
||||
|
||||
// --- Entry Point ---
|
||||
#region Main()
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static void Main() {
|
||||
Initialize();
|
||||
Glut.glutMainLoop();
|
||||
Finish();
|
||||
}
|
||||
#endregion Main()
|
||||
|
||||
// --- Lesson Methods ---
|
||||
#region Display()
|
||||
private static void Display() {
|
||||
float sceneRotationY;
|
||||
double[] matrix = new double[16];
|
||||
|
||||
Gl.glClear(Gl.GL_COLOR_BUFFER_BIT | Gl.GL_DEPTH_BUFFER_BIT); // Clear The Screen And Depth Buffer
|
||||
Gl.glLoadIdentity(); // Reset The View
|
||||
|
||||
sceneRotationY = 360.0f - yRotation; // Calculate The Scene Rotation
|
||||
|
||||
Gl.glRotatef(pitch, 1, 0, 0); // Adjust Player's Pitch
|
||||
Gl.glRotatef(sceneRotationY, 0, 1, 0); // Adjust Player's Rotation
|
||||
Gl.glTranslatef(-xPosition, -yPosition, -zPosition); // Move The Player
|
||||
|
||||
DrawLevel(); // Draw The Level
|
||||
DrawWater(); // Draw The Water
|
||||
|
||||
Gl.glGetDoublev(Gl.GL_MODELVIEW_MATRIX, matrix); // Get Current View Matrix
|
||||
|
||||
sound.SetListenerPosition(xPosition, yPosition, zPosition); // Set Listener Position
|
||||
// Set Listener Orientation, First 3 Numbers Are For The Forward Vector, Last Three Are For The Up Vector
|
||||
sound.SetListenerOrientation(-(float) matrix[2], -(float) matrix[6], -(float) matrix[10], (float) matrix[1], (float) matrix[5], (float) matrix[9]);
|
||||
|
||||
Gl.glFinish();
|
||||
Glut.glutSwapBuffers(); // Swap The Buffers
|
||||
}
|
||||
#endregion Display()
|
||||
|
||||
#region DrawLevel()
|
||||
private static void DrawLevel() {
|
||||
for(int i = 0; i < polygonCount; i++) { // Draw The Level Polygons
|
||||
Gl.glBindTexture(Gl.GL_TEXTURE_2D, texture[polygons[i].TextureId]);
|
||||
Gl.glBegin(Gl.GL_QUADS);
|
||||
for(int j = 0; j < 4; j++) {
|
||||
Gl.glTexCoord2f(polygons[i].U[j], polygons[i].V[j]);
|
||||
Gl.glVertex3f(polygons[i].X[j], polygons[i].Y[j], polygons[i].Z[j]);
|
||||
}
|
||||
Gl.glEnd();
|
||||
}
|
||||
}
|
||||
#endregion DrawLevel()
|
||||
|
||||
#region DrawWater()
|
||||
private static void DrawWater() {
|
||||
Gl.glEnable(Gl.GL_BLEND); // Enable Blending
|
||||
for(int i = 0; i < waterPolygonCount; i++) { // Now Draw The Water Polygons
|
||||
Gl.glBindTexture(Gl.GL_TEXTURE_2D, texture[waterPolygons[i].TextureId]);
|
||||
|
||||
Gl.glBegin(Gl.GL_QUADS);
|
||||
for(int j = 0; j < 4; j++) {
|
||||
Gl.glTexCoord2f(waterPolygons[i].U[j], waterPolygons[i].V[j] + waterOffset);
|
||||
Gl.glVertex3f(waterPolygons[i].X[j], waterPolygons[i].Y[j], waterPolygons[i].Z[j]);
|
||||
}
|
||||
Gl.glEnd();
|
||||
}
|
||||
Gl.glDisable(Gl.GL_BLEND); // Disable Blending
|
||||
}
|
||||
#endregion DrawWater()
|
||||
|
||||
#region Finish()
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static void Finish() {
|
||||
sound.Destroy();
|
||||
Alut.alutExit();
|
||||
}
|
||||
#endregion Finish()
|
||||
|
||||
#region string FindFile(string fileName)
|
||||
private static string FindFile(string fileName) {
|
||||
string originalName = fileName;
|
||||
|
||||
if(File.Exists(fileName)) {
|
||||
return fileName;
|
||||
}
|
||||
else if(File.Exists("Data/" + fileName)) {
|
||||
return "Data/" + fileName;
|
||||
}
|
||||
else if(File.Exists("../../Data/" + fileName)) {
|
||||
return "../../Data/" + fileName;
|
||||
}
|
||||
else {
|
||||
Console.WriteLine("Could not locate file: " + originalName);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
#endregion string FindFile(string fileName)
|
||||
|
||||
#region Idle()
|
||||
private static void Idle() {
|
||||
currentTime = Environment.TickCount;
|
||||
timeElapsed = currentTime - oldTime;
|
||||
secondsPerFrame = timeElapsed / 1000.0f;
|
||||
waterOffset += secondsPerFrame / 2.0f;
|
||||
if(waterOffset >= 1.0f) {
|
||||
waterOffset -= 1.0f;
|
||||
}
|
||||
// Environment.TickCount's resolution and latency isn't really good enough for this, so I'm manually setting a value
|
||||
movementValue = (float) desiredDistance * secondsPerFrame + 0.2f;
|
||||
Glut.glutPostRedisplay();
|
||||
oldTime = currentTime;
|
||||
}
|
||||
#endregion Idle()
|
||||
|
||||
#region Initialize()
|
||||
private static void Initialize() {
|
||||
Console.WriteLine("Controls:"); // Print Input Help
|
||||
Console.WriteLine("W: Move Forward");
|
||||
Console.WriteLine("A: Move Left");
|
||||
Console.WriteLine("S: Move Backward");
|
||||
Console.WriteLine("D: Move Right");
|
||||
Console.WriteLine("Mouse Controls View");
|
||||
Console.WriteLine("ESC: Exit");
|
||||
|
||||
Alut.alutInit(); // Initialize OpenAL
|
||||
|
||||
Glut.glutInit(); // Initialize GLUT
|
||||
// Set GL Context Properties
|
||||
Glut.glutInitDisplayMode(Glut.GLUT_DEPTH | Glut.GLUT_DOUBLE | Glut.GLUT_RGB);
|
||||
Glut.glutInitWindowSize(640, 480); // Set Window Size
|
||||
Glut.glutCreateWindow("OpenAL Tutorial"); // Create Window
|
||||
|
||||
Glut.glutDisplayFunc(new Glut.DisplayCallback(Display)); // Display Delegate
|
||||
Glut.glutKeyboardFunc(new Glut.KeyboardCallback(Keyboard)); // Keyboard Delegate
|
||||
Glut.glutIdleFunc(new Glut.IdleCallback(Idle)); // Idle Delegate
|
||||
// Mouse Movement Delegate
|
||||
Glut.glutPassiveMotionFunc(new Glut.PassiveMotionCallback(Mouse));
|
||||
Glut.glutReshapeFunc(new Glut.ReshapeCallback(Reshape)); // Window Resize Delegate
|
||||
|
||||
LoadLevel(); // Load The Level
|
||||
LoadWater(); // Load The Water
|
||||
LoadCollision(); // Load The Collision Map
|
||||
xPosition = 3.0f; // Set Our Initial Player Position
|
||||
yPosition = 1.0f;
|
||||
zPosition = 5.0f;
|
||||
LoadSounds(); // Load The Sounds
|
||||
LoadTextures(); // Load The Textures
|
||||
Gl.glEnable(Gl.GL_TEXTURE_2D); // Enable Texture Mapping
|
||||
Gl.glBlendFunc(Gl.GL_SRC_ALPHA, Gl.GL_ONE); // Set The Blending Function For Translucency
|
||||
Gl.glClearColor(0.0f, 0.8f, 1.0f, 0.0f); // Clear Background Color To A Turquiose Blueish Color
|
||||
Gl.glClearDepth(1.0); // Enables Clearing Of The Depth Buffer
|
||||
Gl.glDepthFunc(Gl.GL_LESS); // The Type Of Depth Test To Do
|
||||
Gl.glEnable(Gl.GL_DEPTH_TEST); // Enables Depth Testing
|
||||
Gl.glShadeModel(Gl.GL_SMOOTH); // Enables Smooth Color Shading
|
||||
Gl.glHint(Gl.GL_PERSPECTIVE_CORRECTION_HINT, Gl.GL_NICEST); // Really Nice Perspective Calculations
|
||||
|
||||
oldTime = currentTime = Environment.TickCount; // Initialize The Timer
|
||||
}
|
||||
#endregion Initialize()
|
||||
|
||||
#region Keyboard(byte key, int x, int y)
|
||||
private static void Keyboard(byte key, int x, int y) {
|
||||
float newX, newZ;
|
||||
int xp, zp;
|
||||
|
||||
switch(key) {
|
||||
case (byte) 'w':
|
||||
case (byte) 'W':
|
||||
newX = xPosition - (float) (Math.Sin(heading * PI_OVER_180) * movementValue);
|
||||
newZ = zPosition;
|
||||
xp = RoundUp(newX);
|
||||
zp = RoundUp(newZ);
|
||||
if(collisionArray[zp, xp] == 1) {
|
||||
newX = xPosition;
|
||||
}
|
||||
else {
|
||||
xPosition -= (float) (Math.Sin(heading * PI_OVER_180) * movementValue);
|
||||
}
|
||||
|
||||
newZ = zPosition - (float) (Math.Cos(heading * PI_OVER_180) * movementValue);
|
||||
xp = RoundUp(newX);
|
||||
zp = RoundUp(newZ);
|
||||
if(collisionArray[zp, xp] == 1) {
|
||||
newZ = zPosition;
|
||||
}
|
||||
else {
|
||||
zPosition -= (float) (Math.Cos(heading * PI_OVER_180) * movementValue);
|
||||
}
|
||||
break;
|
||||
case (byte) 's':
|
||||
case (byte) 'S':
|
||||
newX = xPosition + (float) Math.Sin(heading * PI_OVER_180) * movementValue;
|
||||
newZ = zPosition;
|
||||
xp = RoundUp(newX);
|
||||
zp = RoundUp(newZ);
|
||||
if(collisionArray[zp, xp] == 1) {
|
||||
newX = xPosition;
|
||||
}
|
||||
else {
|
||||
xPosition += (float) Math.Sin(heading * PI_OVER_180) * movementValue;
|
||||
}
|
||||
|
||||
newZ = zPosition + (float) Math.Cos(heading * PI_OVER_180) * movementValue;
|
||||
xp = RoundUp(newX);
|
||||
zp = RoundUp(newZ);
|
||||
if(collisionArray[zp, xp] == 1) {
|
||||
newZ = zPosition;
|
||||
}
|
||||
else {
|
||||
zPosition += (float) Math.Cos(heading * PI_OVER_180) * movementValue;
|
||||
}
|
||||
break;
|
||||
case (byte) 'a':
|
||||
case (byte) 'A':
|
||||
newX = xPosition + (float) Math.Sin((heading - 90) * PI_OVER_180) * movementValue;
|
||||
newZ = zPosition;
|
||||
xp = RoundUp(newX);
|
||||
zp = RoundUp(newZ);
|
||||
if(collisionArray[zp, xp] == 1) {
|
||||
newX = xPosition;
|
||||
}
|
||||
else {
|
||||
xPosition += (float) Math.Sin((heading - 90) * PI_OVER_180) * movementValue;
|
||||
}
|
||||
|
||||
newZ = zPosition + (float) Math.Cos((heading - 90) * PI_OVER_180) * movementValue;
|
||||
xp = RoundUp(newX);
|
||||
zp = RoundUp(newZ);
|
||||
if(collisionArray[zp, xp] == 1) {
|
||||
newZ = zPosition;
|
||||
}
|
||||
else {
|
||||
zPosition += (float) Math.Cos((heading - 90) * PI_OVER_180) * movementValue;
|
||||
}
|
||||
break;
|
||||
case (byte) 'd':
|
||||
case (byte) 'D':
|
||||
newX = xPosition + (float) Math.Sin((heading + 90) * PI_OVER_180) * movementValue;
|
||||
newZ = zPosition;
|
||||
xp = RoundUp(newX);
|
||||
zp = RoundUp(newZ);
|
||||
if(collisionArray[zp, xp] == 1) {
|
||||
newX = xPosition;
|
||||
}
|
||||
else {
|
||||
xPosition += (float) Math.Sin((heading + 90) * PI_OVER_180) * movementValue;
|
||||
}
|
||||
|
||||
newZ = zPosition + (float) Math.Cos((heading + 90) * PI_OVER_180) * movementValue;
|
||||
xp = RoundUp(newX);
|
||||
zp = RoundUp(newZ);
|
||||
if(collisionArray[zp, xp] == 1) {
|
||||
newZ = zPosition;
|
||||
}
|
||||
else {
|
||||
zPosition += (float) Math.Cos((heading + 90) * PI_OVER_180) * movementValue;
|
||||
}
|
||||
break;
|
||||
case 27:
|
||||
Environment.Exit(0);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endregion Keyboard(byte key, int x, int y)
|
||||
|
||||
#region Bitmap LoadBmp(string fileName)
|
||||
private static Bitmap LoadBmp(string fileName) { // Loads A Bitmap Image
|
||||
fileName = FindFile(fileName);
|
||||
Bitmap bitmap = new Bitmap(fileName); // Load And Return The Bitmap
|
||||
bitmap.RotateFlip(RotateFlipType.RotateNoneFlipY); // Flip The Bitmap Along The Y-Axis
|
||||
return bitmap; // Return The Bitmap
|
||||
}
|
||||
#endregion Bitmap LoadBmp(string fileName)
|
||||
|
||||
#region LoadCollision()
|
||||
private static void LoadCollision() {
|
||||
string fileName = FindFile("OpenAlExamples.Waterfall.Collision.txt");
|
||||
StreamReader reader = new StreamReader(fileName, new ASCIIEncoding());
|
||||
string line = "";
|
||||
string[] split;
|
||||
|
||||
for(int i = 17; i >= 0; i--) {
|
||||
ReadStr(reader, out line);
|
||||
line = line.Trim();
|
||||
split = line.Split();
|
||||
for(int j = 18; j >= 0; j--) {
|
||||
collisionArray[i, j] = Int32.Parse(split[j]);
|
||||
}
|
||||
}
|
||||
|
||||
reader.Close();
|
||||
}
|
||||
#endregion LoadCollision()
|
||||
|
||||
#region LoadLevel()
|
||||
private static void LoadLevel() {
|
||||
string fileName = FindFile("OpenAlExamples.Waterfall.Level.txt");
|
||||
StreamReader reader = new StreamReader(fileName, new ASCIIEncoding());
|
||||
string line = "";
|
||||
|
||||
ReadStr(reader, out line);
|
||||
polygonCount = Int32.Parse(line);
|
||||
polygons = new Polygon[polygonCount];
|
||||
|
||||
for(int i = 0; i < polygonCount; i++) {
|
||||
polygons[i].X = new float[4];
|
||||
polygons[i].Y = new float[4];
|
||||
polygons[i].Z = new float[4];
|
||||
polygons[i].U = new float[4];
|
||||
polygons[i].V = new float[4];
|
||||
for(int j = 0; j < 4; j++) {
|
||||
ReadStr(reader, out line);
|
||||
Match match = Regex.Match(line, @"(?<X>-?\d+.\d+)\s*(?<Y>-?\d+.\d+)\s*(?<Z>-?\d+.\d+)\s*(?<U>-?\d+.\d+)\s*(?<V>-?\d+.\d+)\s*(?<TexId>\d+)", RegexOptions.ExplicitCapture);
|
||||
polygons[i].X[j] = Single.Parse(match.Groups["X"].ToString());
|
||||
polygons[i].Y[j] = Single.Parse(match.Groups["Y"].ToString());
|
||||
polygons[i].Z[j] = Single.Parse(match.Groups["Z"].ToString());
|
||||
polygons[i].U[j] = Single.Parse(match.Groups["U"].ToString());
|
||||
polygons[i].V[j] = Single.Parse(match.Groups["V"].ToString());
|
||||
polygons[i].TextureId = Int32.Parse(match.Groups["TexId"].ToString());
|
||||
}
|
||||
}
|
||||
|
||||
reader.Close();
|
||||
}
|
||||
#endregion void LoadLevel()
|
||||
|
||||
#region LoadSounds()
|
||||
private static void LoadSounds() {
|
||||
string fileName = FindFile("OpenAlExamples.Waterfall.Water.wav");
|
||||
sound.Load(fileName, true); // Load The Water Sound
|
||||
sound.SetProperties(8.5f, 0.0f, 15.0f, 0.0f, 0.0f, 0.0f); // Set The Position Of The Sound Effect
|
||||
sound.Play(); // Start Playing The Sound
|
||||
sound.SetListenerPosition(xPosition, yPosition, zPosition); // Set The Initial Listener Position
|
||||
}
|
||||
#endregion LoadSounds()
|
||||
|
||||
#region LoadTextures()
|
||||
private static void LoadTextures() {
|
||||
Bitmap[] textureImage = new Bitmap[6]; // Storage Space For The Textures
|
||||
Rectangle rectangle; // Rectangle For Locking The Bitmap In Memory
|
||||
BitmapData textureData = null; // The Bitmap's Pixel Data
|
||||
|
||||
textureImage[0] = LoadBmp("OpenAlExamples.Waterfall.Grass.bmp");
|
||||
textureImage[1] = LoadBmp("OpenAlExamples.Waterfall.Evergreen.bmp");
|
||||
textureImage[2] = LoadBmp("OpenAlExamples.Waterfall.Rocks.bmp");
|
||||
textureImage[3] = LoadBmp("OpenAlExamples.Waterfall.Water.bmp");
|
||||
textureImage[4] = LoadBmp("OpenAlExamples.Waterfall.Dirt.bmp");
|
||||
textureImage[5] = LoadBmp("OpenAlExamples.Waterfall.Wood.bmp");
|
||||
|
||||
Gl.glGenTextures(6, texture); // Create The Textures
|
||||
for(int i = 0; i < 6; i++) {
|
||||
// Select The Whole Bitmap
|
||||
rectangle = new Rectangle(0, 0, textureImage[i].Width, textureImage[i].Height);
|
||||
// Get The Pixel Data From The Locked Bitmap
|
||||
textureData = textureImage[i].LockBits(rectangle, ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);
|
||||
|
||||
// Create Linear Filtered Texture
|
||||
Gl.glBindTexture(Gl.GL_TEXTURE_2D, texture[i]);
|
||||
Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_MAG_FILTER, Gl.GL_LINEAR);
|
||||
Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_MIN_FILTER, Gl.GL_LINEAR);
|
||||
Gl.glTexImage2D(Gl.GL_TEXTURE_2D, 0, Gl.GL_RGB8, textureData.Width, textureData.Height, 0, Gl.GL_BGR, Gl.GL_UNSIGNED_BYTE, textureData.Scan0);
|
||||
|
||||
if(textureImage[i] != null) { // If Texture Exists
|
||||
textureImage[i].UnlockBits(textureData); // Unlock The Pixel Data From Memory
|
||||
textureImage[i].Dispose(); // Free The Texture Image
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion LoadTextures()
|
||||
|
||||
#region LoadWater()
|
||||
private static void LoadWater() {
|
||||
string fileName = FindFile("OpenAlExamples.Waterfall.Water.txt");
|
||||
StreamReader reader = new StreamReader(fileName, new ASCIIEncoding());
|
||||
string line = "";
|
||||
|
||||
ReadStr(reader, out line);
|
||||
waterPolygonCount = Int32.Parse(line);
|
||||
waterPolygons = new Polygon[waterPolygonCount];
|
||||
|
||||
for(int i = 0; i < waterPolygonCount; i++) {
|
||||
waterPolygons[i].X = new float[4];
|
||||
waterPolygons[i].Y = new float[4];
|
||||
waterPolygons[i].Z = new float[4];
|
||||
waterPolygons[i].U = new float[4];
|
||||
waterPolygons[i].V = new float[4];
|
||||
for(int j = 0; j < 4; j++) {
|
||||
ReadStr(reader, out line);
|
||||
Match match = Regex.Match(line, @"(?<X>-?\d+.\d+)\s*(?<Y>-?\d+.\d+)\s*(?<Z>-?\d+.\d+)\s*(?<U>-?\d+.\d+)\s*(?<V>-?\d+.\d+)\s*(?<TexId>\d+)", RegexOptions.ExplicitCapture);
|
||||
waterPolygons[i].X[j] = Single.Parse(match.Groups["X"].ToString());
|
||||
waterPolygons[i].Y[j] = Single.Parse(match.Groups["Y"].ToString());
|
||||
waterPolygons[i].Z[j] = Single.Parse(match.Groups["Z"].ToString());
|
||||
waterPolygons[i].U[j] = Single.Parse(match.Groups["U"].ToString());
|
||||
waterPolygons[i].V[j] = Single.Parse(match.Groups["V"].ToString());
|
||||
waterPolygons[i].TextureId = Int32.Parse(match.Groups["TexId"].ToString());
|
||||
}
|
||||
}
|
||||
|
||||
reader.Close();
|
||||
}
|
||||
#endregion LoadWater()
|
||||
|
||||
#region Mouse(int x, int y)
|
||||
private static void Mouse(int x, int y) {
|
||||
// Compute Our New Direction
|
||||
heading -= x - oldMouseX;
|
||||
pitch += y - oldMouseY;
|
||||
yRotation = heading;
|
||||
oldMouseX = x;
|
||||
oldMouseY = y;
|
||||
}
|
||||
#endregion Mouse(int x, int y)
|
||||
|
||||
#region ReadStr(StreamReader stream, out string text)
|
||||
private static void ReadStr(StreamReader stream, out string text) {
|
||||
do {
|
||||
text = stream.ReadLine();
|
||||
} while((text.StartsWith("/")) || (text.StartsWith("\n")) || text == "");
|
||||
}
|
||||
#endregion ReadStr(StreamReader stream, out string text)
|
||||
|
||||
#region Reshape(int w, int h)
|
||||
private static void Reshape(int w, int h) {
|
||||
if(h == 0) { // Prevent A Divide By Zero Exception
|
||||
h = 1; // By Making Height Equal At Least One
|
||||
}
|
||||
//windowWidth = w;
|
||||
//windowHeight = h;
|
||||
Gl.glViewport(0, 0, w, h); // Reset The Current Viewport
|
||||
Gl.glMatrixMode(Gl.GL_PROJECTION); // Select The Projection Matrix
|
||||
Gl.glLoadIdentity(); // Reset The Projection Matrix
|
||||
Glu.gluPerspective(45.0, (float) w / (float) h, 0.1, 2000.0); // Calculate The Aspect Ratio Of The Window
|
||||
Gl.glMatrixMode(Gl.GL_MODELVIEW); // Select The Modelview Matrix
|
||||
Gl.glLoadIdentity(); // Reset The Modelview Matrix
|
||||
}
|
||||
#endregion Reshape(int w, int h)
|
||||
|
||||
#region int RoundUp(float x)
|
||||
private static int RoundUp(float x) {
|
||||
int n;
|
||||
|
||||
if(x < 0) {
|
||||
n = (int) x;
|
||||
}
|
||||
else {
|
||||
n = (int) x + 1;
|
||||
}
|
||||
|
||||
return n;
|
||||
}
|
||||
#endregion int RoundUp(float x)
|
||||
}
|
||||
}
|
|
@ -420,14 +420,14 @@
|
|||
</Match>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="OpenAlExamples.Boxes" path="../../examples/OpenAlExamples/Boxes" language="C#" type="WinExe" startupObject="OpenAlExamples.Boxes">
|
||||
<Project name="OpenAlExamples" path="../../examples/OpenAl" language="C#" type="WinExe" startupObject="OpenAlExamples.Program" designerFolder="Properties">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin/Debug</OutputPath>
|
||||
<KeyFile>../../../src/Tao.OpenAl/Tao.OpenAl.snk</KeyFile>
|
||||
<KeyFile>../../src/Tao.OpenAl/Tao.OpenAl.snk</KeyFile>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
</Options>
|
||||
</Configuration>
|
||||
|
@ -437,156 +437,22 @@
|
|||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin/Release</OutputPath>
|
||||
<KeyFile>../../../src/Tao.OpenAl/Tao.OpenAl.snk</KeyFile>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="Tao.OpenAl" />
|
||||
<Reference name="Tao.OpenGl" />
|
||||
|
||||
|
||||
<Reference name="Tao.FreeGlut" />
|
||||
<Files>
|
||||
<Match path="." pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="OpenAlExamples.Lesson01" path="../../examples/OpenAlExamples/Lesson01" language="C#" type="Exe" startupObject="OpenAlExamples.Lesson01">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin/Debug</OutputPath>
|
||||
<KeyFile>../../../src/Tao.OpenAl/Tao.OpenAl.snk</KeyFile>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE;WIN32</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin/Release</OutputPath>
|
||||
<KeyFile>../../../src/Tao.OpenAl/Tao.OpenAl.snk</KeyFile>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="Tao.OpenAl" />
|
||||
<Files>
|
||||
<Match path="." pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="OpenAlExamples.Lesson02" path="../../examples/OpenAlExamples/Lesson02" language="C#" type="Exe" startupObject="OpenAlExamples.Lesson02">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin/Debug</OutputPath>
|
||||
<KeyFile>../../../src/Tao.OpenAl/Tao.OpenAl.snk</KeyFile>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE;WIN32</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin/Release</OutputPath>
|
||||
<KeyFile>../../../src/Tao.OpenAl/Tao.OpenAl.snk</KeyFile>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="Tao.OpenAl" />
|
||||
<Files>
|
||||
<Match path="." pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="OpenAlExamples.Lesson03" path="../../examples/OpenAlExamples/Lesson03" language="C#" type="Exe" startupObject="OpenAlExamples.Lesson03">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin/Debug</OutputPath>
|
||||
<KeyFile>../../../src/Tao.OpenAl/Tao.OpenAl.snk</KeyFile>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE;WIN32</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin/Release</OutputPath>
|
||||
<KeyFile>../../../src/Tao.OpenAl/Tao.OpenAl.snk</KeyFile>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="Tao.OpenAl" />
|
||||
<Files>
|
||||
<Match path="." pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="OpenAlExamples.Lesson05" path="../../examples/OpenAlExamples/Lesson05" language="C#" type="Exe" startupObject="OpenAlExamples.Lesson05">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin/Debug</OutputPath>
|
||||
<KeyFile>../../../src/Tao.OpenAl/Tao.OpenAl.snk</KeyFile>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE;WIN32</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin/Release</OutputPath>
|
||||
<KeyFile>../../../src/Tao.OpenAl/Tao.OpenAl.snk</KeyFile>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="Tao.OpenAl" />
|
||||
<Files>
|
||||
<Match path="." pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="OpenAlExamples.Waterfall" path="../../examples/OpenAlExamples/Waterfall" language="C#" type="WinExe" startupObject="OpenAlExamples.Waterfall">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin/Debug</OutputPath>
|
||||
<KeyFile>../../../src/Tao.OpenAl/Tao.OpenAl.snk</KeyFile>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE;WIN32</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin/Release</OutputPath>
|
||||
<KeyFile>../../../src/Tao.OpenAl/Tao.OpenAl.snk</KeyFile>
|
||||
<KeyFile>../../src/Tao.OpenAl/Tao.OpenAl.snk</KeyFile>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="System.Windows.Forms" />
|
||||
<Reference name="System.Data" />
|
||||
<Reference name="System.Drawing" />
|
||||
<Reference name="Tao.OpenAl" />
|
||||
<Reference name="Tao.OpenGl" />
|
||||
<Reference name="Tao.FreeGlut" />
|
||||
<Files>
|
||||
<Match path="." pattern="*.cs" recurse="true"/>
|
||||
<File subType="Form" resourceName="OpenAlExamples">OpenAlExamples.cs</File>
|
||||
<Match path="." pattern="*.cs" recurse="true">
|
||||
<Exclude name="OpenAlExamples.cs"/>
|
||||
</Match>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="CgExamples.Gl_01_vertex_program" path="../../examples/CgExamples/Gl_01_vertex_program" language="C#" type="WinExe" startupObject="CgExamples.Gl_01_vertex_program">
|
||||
|
|
Загрузка…
Ссылка в новой задаче