Fixed all known build warnings, apart from missing xml comments.

This commit is contained in:
the_fiddler 2009-03-25 21:53:12 +00:00
parent 48ad1cad60
commit d4aef922bc
37 changed files with 480 additions and 465 deletions

View file

@ -23,7 +23,7 @@ namespace OpenTK.Audio
#region --- Fields ---
bool disposed;
bool is_processing;
bool is_processing, is_synchronized;
IntPtr device_handle;
ContextHandle context_handle;
bool context_exists;
@ -62,7 +62,6 @@ namespace OpenTK.Audio
#region public AudioContext()
/// <summary>Constructs a new AudioContext, using the default audio device.</summary>
/// <exception cref="NotSupportedException">Occurs when no audio devices are available.</exception>
public AudioContext()
: this(null, 0, 0, false, true) { }
@ -89,7 +88,6 @@ namespace OpenTK.Audio
/// Use AudioContext.AvailableDevices to obtain a list of all available audio devices.
/// devices.
/// </remarks>
/// <see cref="AudioContext(string device, int freq, int refresh, bool sync, int maxEfxSends)"/>
public AudioContext(string device, int freq) : this(device, freq, 0, false, true) { }
#endregion
@ -104,7 +102,6 @@ namespace OpenTK.Audio
/// Use AudioContext.AvailableDevices to obtain a list of all available audio devices.
/// devices.
/// </remarks>
/// <see cref="AudioContext(string device, int freq, int refresh, bool sync, int maxEfxSends)"/>
public AudioContext(string device, int freq, int refresh)
: this(device, freq, refresh, false, true) { }
@ -121,13 +118,12 @@ namespace OpenTK.Audio
/// Use AudioContext.AvailableDevices to obtain a list of all available audio devices.
/// devices.
/// </remarks>
/// <see cref="AudioContext(string device, int freq, int refresh, bool sync, int maxEfxSends)"/>
public AudioContext(string device, int freq, int refresh, bool sync)
: this(available_devices[0], freq, refresh, sync, true) { }
#endregion
#region public AudioContext(string device, int freq, int refresh, bool sync, int maxSends)
#region public AudioContext(string device, int freq, int refresh, bool sync, bool enableEfx)
/// <summary>Creates the audio context using the specified device and device parameters.</summary>
/// <param name="device">The device descriptor obtained through AudioContext.AvailableDevices.</param>
@ -137,10 +133,10 @@ namespace OpenTK.Audio
/// <param name="enableEfx">Indicates whether the EFX extension should be initialized, if present.</param>
/// <exception cref="ArgumentNullException">Occurs when the device string is invalid.</exception>
/// <exception cref="ArgumentOutOfRangeException">Occurs when a specified parameter is invalid.</exception>
/// <exception cref="InvalidAudioDeviceException">
/// <exception cref="AudioDeviceException">
/// Occurs when the specified device is not available, or is in use by another program.
/// </exception>
/// <exception cref="InvalidAudioContextException">
/// <exception cref="AudioContextException">
/// Occurs when an audio context could not be created with the specified parameters.
/// </exception>
/// <exception cref="NotSupportedException">
@ -228,7 +224,7 @@ namespace OpenTK.Audio
/// <exception cref="AudioDeviceException">
/// Occurs when the specified device is not available, or is in use by another program.
/// </exception>
/// <exception cref="AudioDeviceException">
/// <exception cref="AudioContextException">
/// Occurs when an audio context could not be created with the specified parameters.
/// </exception>
/// <exception cref="NotSupportedException">
@ -267,8 +263,6 @@ namespace OpenTK.Audio
CheckForAlcErrors();
device_name = Alc.GetString(device_handle, AlcGetString.DeviceSpecifier);
// Build the attribute list
List<int> attributes = new List<int>();
@ -314,8 +308,22 @@ namespace OpenTK.Audio
CheckForAlcErrors();
//device_name = Alc.GetString(device_handle, AlcGetString.DeviceSpecifier);
//Debug.Print(device_name);
device_name = Alc.GetString(device_handle, AlcGetString.DeviceSpecifier);
int attribute_count;
Alc.GetInteger(device_handle, AlcGetInteger.AttributesSize, sizeof(int), out attribute_count);
if (attribute_count > 0)
{
int[] device_attributes = new int[attribute_count];
Alc.GetInteger(device_handle, AlcGetInteger.AllAttributes, device_attributes.Length * sizeof(int), out device_attributes[0]);
foreach (int attr in device_attributes)
{
switch ((AlcContextAttributes)attr)
{
case AlcContextAttributes.Sync: IsSynchronized = true; break;
}
}
}
lock (audio_context_lock)
{
available_contexts.Add(this.context_handle, this);
@ -439,6 +447,21 @@ namespace OpenTK.Audio
#endregion
#region public bool IsProcessing
/// <summary>
/// Gets a System.Boolean indicating whether the AudioContext is
/// synchronized.
/// </summary>
/// <seealso cref="Process"/>
public bool IsSynchronized
{
get { return is_synchronized; }
private set { is_synchronized = value; }
}
#endregion
#region public void Process
/// <summary>
@ -457,7 +480,7 @@ namespace OpenTK.Audio
/// </remarks>
/// <exception cref="ObjectDisposedException">Occurs when this function is called after the AudioContext had been disposed.</exception>
/// <seealso cref="Suspend"/>
/// <seealso cref="IsSuspended"/>
/// <seealso cref="IsProcessing"/>
/// <seealso cref="IsSynchronized"/>
public void Process()
{
@ -488,7 +511,7 @@ namespace OpenTK.Audio
/// </remarks>
/// <exception cref="ObjectDisposedException">Occurs when this function is called after the AudioContext had been disposed.</exception>
/// <seealso cref="Process"/>
/// <seealso cref="IsSuspended"/>
/// <seealso cref="IsProcessing"/>
/// <seealso cref="IsSynchronized"/>
public void Suspend()
{

View file

@ -1180,7 +1180,7 @@ namespace OpenTK.Audio
}
/// <summary>This function queues a set of buffers on a source. All buffers attached to a source will be played in sequence, and the number of processed buffers can be detected using AL.GetSource with parameter ALGetSourcei.BuffersProcessed. When first created, a source will be of type ALSourceType.Undetermined. A successful AL.SourceQueueBuffers call will change the source type to ALSourceType.Streaming.</summary>
/// <param name="sid">The name of the source to queue buffers onto.</param>
/// <param name="source">The name of the source to queue buffers onto.</param>
/// <param name="buffer">The name of the buffer to be queued.</param>
public static void SourceQueueBuffer(int source, int buffer)
{
@ -1315,7 +1315,7 @@ namespace OpenTK.Audio
}
/// <summary>This function generates one buffer only, which contain audio data (see AL.BufferData). References to buffers are uint values, which are used wherever a buffer reference is needed (in calls such as AL.DeleteBuffers, AL.Source with parameter ALSourcei, AL.SourceQueueBuffers, and AL.SourceUnqueueBuffers).</summary>
/// <param name="buffers">Pointer to an uint value which will store the names of the new buffer.</param>
/// <param name="buffer">Pointer to an uint value which will store the names of the new buffer.</param>
[CLSCompliant(false)]
public static void GenBuffer(out uint buffer)
{
@ -1349,7 +1349,7 @@ namespace OpenTK.Audio
public static extern void DeleteBuffers(int n, [In] ref int buffers);
/// <summary>This function deletes one buffer only, freeing the resources used by the buffer. Buffers which are attached to a source can not be deleted. See AL.Source (ALSourcei) and AL.SourceUnqueueBuffers for information on how to detach a buffer from a source.</summary>
/// <param name="buffer">Pointer to a buffer name identifying the buffer to be deleted.</param>
/// <param name="buffers">Pointer to a buffer name identifying the buffer to be deleted.</param>
[CLSCompliant(false)]
public static void DeleteBuffers(uint[] buffers)
{
@ -1359,7 +1359,6 @@ namespace OpenTK.Audio
}
/// <summary>This function deletes one or more buffers, freeing the resources used by the buffer. Buffers which are attached to a source can not be deleted. See AL.Source (ALSourcei) and AL.SourceUnqueueBuffers for information on how to detach a buffer from a source.</summary>
/// <param name="n">The number of buffers to be deleted.</param>
/// <param name="buffers">Pointer to an array of buffer names identifying the buffers to be deleted.</param>
[CLSCompliant(true)]
public static void DeleteBuffers(int[] buffers)
@ -1390,14 +1389,14 @@ namespace OpenTK.Audio
#region IsBuffer
/// <summary>This function tests if a buffer name is valid, returning True if valid, False if not.</summary>
/// <param name="bid">A buffer Handle previously allocated with <see cref="AL.GenBuffers"/>.</param>
/// <param name="bid">A buffer Handle previously allocated with <see cref="GenBuffers(int)"/>.</param>
/// <returns>Success.</returns>
[CLSCompliant(false), DllImport(AL.Lib, EntryPoint = "alIsBuffer", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
public static extern bool IsBuffer(uint bid);
// AL_API ALboolean AL_APIENTRY alIsBuffer( ALuint bid );
/// <summary>This function tests if a buffer name is valid, returning True if valid, False if not.</summary>
/// <param name="bid">A buffer Handle previously allocated with <see cref="AL.GenBuffers"/>.</param>
/// <param name="bid">A buffer Handle previously allocated with <see cref="GenBuffers(int)"/>.</param>
/// <returns>Success.</returns>
[CLSCompliant(true)]
public static bool IsBuffer(int bid)
@ -1417,7 +1416,7 @@ namespace OpenTK.Audio
/// <param name="size">The size of the audio buffer in bytes.</param>
/// <param name="freq">The frequency of the audio buffer.</param>
[CLSCompliant(false), DllImport(AL.Lib, EntryPoint = "alBufferData", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
public static extern void BufferData(uint bid, ALFormat format, IntPtr data, int size, int freq);
public static extern void BufferData(uint bid, ALFormat format, IntPtr buffer, int size, int freq);
// AL_API void AL_APIENTRY alBufferData( ALuint bid, ALenum format, const ALvoid* buffer, ALsizei size, ALsizei freq );
/// <summary>This function fills a buffer with audio buffer. All the pre-defined formats are PCM buffer, but this function may be used by extensions to load other buffer types as well.</summary>
@ -1427,28 +1426,28 @@ namespace OpenTK.Audio
/// <param name="size">The size of the audio buffer in bytes.</param>
/// <param name="freq">The frequency of the audio buffer.</param>
[CLSCompliant(true)]
public static void BufferData(int bid, ALFormat format, IntPtr data, int size, int freq)
public static void BufferData(int bid, ALFormat format, IntPtr buffer, int size, int freq)
{
BufferData((uint)bid, format, data, size, freq);
BufferData((uint)bid, format, buffer, size, freq);
}
/// <summary>This function fills a buffer with audio buffer (PCM format).</summary>
/// <param name="bid">Buffer Handle/Name to be filled with buffer.</param>
/// <param name="buffer">A SoundData object containing the buffer to upload.</param>
[CLSCompliant(false)]
public static void BufferData(uint bid, SoundData data)
public static void BufferData(uint bid, SoundData buffer)
{
unsafe
{
fixed (byte* data_ptr = &data.Data[0])
BufferData(bid, data.SoundFormat.SampleFormatAsOpenALFormat, (IntPtr)data_ptr, data.Data.Length,
data.SoundFormat.SampleRate);
fixed (byte* data_ptr = &buffer.Data[0])
BufferData(bid, buffer.SoundFormat.SampleFormatAsOpenALFormat, (IntPtr)data_ptr, buffer.Data.Length,
buffer.SoundFormat.SampleRate);
}
}
/// <summary>This function fills a buffer with audio buffer (PCM format).</summary>
/// <param name="bid">Buffer Handle/Name to be filled with buffer.</param>
/// <param name="buffer">A SoundData object containing the buffer to upload.</param>
/// <param name="data">A SoundData object containing the buffer to upload.</param>
public static void BufferData(int bid, SoundData data)
{
unsafe

View file

@ -494,8 +494,8 @@ namespace OpenTK.Audio
/// <summary>This function is used to retrieve 3 floating point properties from Effect objects.</summary>
/// <param name="eid">Effect object identifier.</param>
/// <param name="pname">Effect property to retrieve.</param>
/// <param name="value">A Math.Vector3 to hold the values.</param>
/// <param name="param">Effect property to retrieve.</param>
/// <param name="values">A Math.Vector3 to hold the values.</param>
[CLSCompliant(false)]
public void GetEffect(uint eid, EfxEffect3f param, out Vector3 values)
{
@ -513,8 +513,8 @@ namespace OpenTK.Audio
/// <summary>This function is used to retrieve 3 floating point properties from Effect objects.</summary>
/// <param name="eid">Effect object identifier.</param>
/// <param name="pname">Effect property to retrieve.</param>
/// <param name="value">A Math.Vector3 to hold the values.</param>
/// <param name="param">Effect property to retrieve.</param>
/// <param name="values">A Math.Vector3 to hold the values.</param>
public void GetEffect(int eid, EfxEffect3f param, out Vector3 values)
{
@ -652,7 +652,7 @@ namespace OpenTK.Audio
}
/// <summary>This function deletes one Filter only.</summary>
/// <param name="filter">Pointer to an filter name/handle identifying the Filter Object to be deleted.</param>
/// <param name="filters">Pointer to an filter name/handle identifying the Filter Object to be deleted.</param>
[CLSCompliant(false)]
public void DeleteFilters(uint[] filters)
{
@ -661,7 +661,7 @@ namespace OpenTK.Audio
}
/// <summary>This function deletes one Filter only.</summary>
/// <param name="filter">Pointer to an filter name/handle identifying the Filter Object to be deleted.</param>
/// <param name="filters">Pointer to an filter name/handle identifying the Filter Object to be deleted.</param>
public void DeleteFilters(int[] filters)
{
if (filters == null) throw new ArgumentNullException("filters");
@ -983,7 +983,6 @@ namespace OpenTK.Audio
}
/// <summary>The DeleteAuxiliaryEffectSlots function is used to delete and free resources for Auxiliary Effect Slots previously created with GenAuxiliaryEffectSlots.</summary>
/// <param name="n">Number of Auxiliary Effect Slots to be deleted.</param>
/// <param name="slots">Pointer to n Effect Slot object identifiers.</param>
public void DeleteAuxiliaryEffectSlots(int[] slots)
{
@ -992,7 +991,7 @@ namespace OpenTK.Audio
}
/// <summary>This function deletes one AuxiliaryEffectSlot only.</summary>
/// <param name="slot">Pointer to an auxiliary effect slot name/handle identifying the Auxiliary Effect Slot Object to be deleted.</param>
/// <param name="slots">Pointer to an auxiliary effect slot name/handle identifying the Auxiliary Effect Slot Object to be deleted.</param>
[CLSCompliant(false)]
public void DeleteAuxiliaryEffectSlots(uint[] slots)
{

View file

@ -94,7 +94,7 @@ namespace OpenTK.Audio
/// <summary>This function creates a context using a specified device.</summary>
/// <param name="device">a pointer to a device</param>
/// <param name="attrlist">an array of a set of attributes: ALC_FREQUENCY, ALC_MONO_SOURCES, ALC_REFRESH, ALC_STEREO_SOURCES, ALC_SYNC</param>
/// <param name="attriblist">an array of a set of attributes: ALC_FREQUENCY, ALC_MONO_SOURCES, ALC_REFRESH, ALC_STEREO_SOURCES, ALC_SYNC</param>
/// <returns>Returns a pointer to the new context (NULL on failure).</returns>
/// <remarks>The attribute list can be NULL, or a zero terminated list of integer pairs composed of valid ALC attribute tokens and requested values.</remarks>
public static ContextHandle CreateContext(IntPtr device, int[] attriblist)
@ -267,7 +267,7 @@ namespace OpenTK.Audio
/// <param name="device">a pointer to the device to be queried.</param>
/// <param name="param">an attribute to be retrieved: ALC_MAJOR_VERSION, ALC_MINOR_VERSION, ALC_ATTRIBUTES_SIZE, ALC_ALL_ATTRIBUTES</param>
/// <param name="size">the size of the destination buffer provided. In bytes.</param>
/// <param name="buffer">a pointer to the buffer to be returned</param>
/// <param name="data">a pointer to the buffer to be returned</param>
[DllImport(Alc.Lib, EntryPoint = "alcGetIntegerv", ExactSpelling = true, CallingConvention = Alc.Style, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity()]
public static extern void GetInteger([In] IntPtr device, AlcGetInteger param, int size, [Out] out int data);
// ALC_API void ALC_APIENTRY alcGetIntegerv( ALCdevice *device, ALCenum param, ALCsizei size, ALCint *buffer );

View file

@ -100,7 +100,7 @@ namespace OpenTK.Audio
/// <param name="length">Size in Bytes of the sound buffer.</param>
/// <returns>OpenAL Buffer, 0 on failure.</returns>
[CLSCompliant(false), DllImport(Alut.Lib, EntryPoint = "alutCreateBufferFromFileImage", ExactSpelling = true, CallingConvention = Alut.Style), SuppressUnmanagedCodeSecurity()]
public static extern uint CreateBufferFromFileImage([In] IntPtr data, int length);
public static extern uint CreateBufferFromFileImage([In] IntPtr buffer, int length);
// ALUT_API ALuint ALUT_APIENTRY alutCreateBufferFromFileImage (const ALvoid *buffer, ALsizei length);

View file

@ -23,7 +23,8 @@ namespace OpenTK.Audio
/// <internal />
/// <summary>Constructs a new SoundData object.</summary>
/// <param name="buffer">An array of PCM buffer.</param>
/// <param name="format">The SoundFormat of these SoundData.</param>
/// <param name="data">An array of PCM buffer.</param>
internal SoundData(SoundFormat format, byte[] data)
{
if (data == null) throw new ArgumentNullException("buffer", "Must be a valid array of samples.");

View file

@ -55,8 +55,8 @@ namespace OpenTK
/// </summary>
/// <param name="mode">The OpenTK.Graphics.GraphicsMode of the control.</param>
/// <param name="major">The major version for the OpenGL GraphicsContext.</param>
/// <param name="major">The minor version for the OpenGL GraphicsContext.</param>
/// <param name="major">The GraphicsContextFlags for the OpenGL GraphicsContext.</param>
/// <param name="minor">The minor version for the OpenGL GraphicsContext.</param>
/// <param name="flags">The GraphicsContextFlags for the OpenGL GraphicsContext.</param>
public GLControl(GraphicsMode mode, int major, int minor, GraphicsContextFlags flags)
{
SetStyle(ControlStyles.Opaque, true);

View file

@ -164,7 +164,7 @@ namespace OpenTK
/// <param name="options">GameWindow options regarding window appearance and behavior.</param>
/// <param name="device">The OpenTK.Graphics.DisplayDevice to construct the GameWindow in.</param>
/// <param name="major">The major version for the OpenGL GraphicsContext.</param>
/// <param name="major">The minor version for the OpenGL GraphicsContext.</param>
/// <param name="minor">The minor version for the OpenGL GraphicsContext.</param>
/// <param name="flags">The GraphicsContextFlags version for the OpenGL GraphicsContext.</param>
public GameWindow(int width, int height, GraphicsMode mode, string title, GameWindowFlags options, DisplayDevice device,
int major, int minor, GraphicsContextFlags flags)
@ -351,10 +351,10 @@ namespace OpenTK
#region public bool Fullscreen
/// <summary>
/// TODO: This property is not implemented.
/// Gets or sets a value indicating whether the GameWindow is in fullscrren mode.
/// </summary>
///// <summary>
///// TODO: This property is not implemented.
///// Gets or sets a value indicating whether the GameWindow is in fullscrren mode.
///// </summary>
//public bool Fullscreen
//{
// get { if (disposed) throw new ObjectDisposedException("GameWindow"); return glWindow.Fullscreen; }
@ -448,7 +448,7 @@ namespace OpenTK
/// <summary>
/// Enters the game loop of the GameWindow updating and rendering at the maximum possible frequency.
/// </summary>
/// <see cref="public virtual void Run(double update_frequency, double render_frequency)"/>
/// <see cref="Run(double, double)"/>
public void Run()
{
if (disposed) throw new ObjectDisposedException("GameWindow");
@ -463,7 +463,7 @@ namespace OpenTK
/// Enters the game loop of the GameWindow updating the specified update frequency, while maintaining the
/// maximum possible render frequency.
/// </summary>
/// <see cref="public virtual void Run(double updateFrequency, double renderFrequency)"/>
/// <see cref="Run(double, double)"/>
public void Run(double updateFrequency)
{
if (disposed) throw new ObjectDisposedException("GameWindow");
@ -990,6 +990,7 @@ namespace OpenTK
/// <summary>
/// Gets or sets a double representing the target render period, in seconds.
/// </summary>
/// <remarks>
/// <para>A value of 0.0 indicates that RenderFrame events are generated at the maximum possible frequency (i.e. only limited by the hardware's capabilities).</para>
/// <para>Values lower than 0.005 seconds (200Hz) are clamped to 0.0. Values higher than 1.0 seconds (1Hz) are clamped to 1.0.</para>
/// </remarks>

View file

@ -308,9 +308,9 @@ namespace OpenTK.Graphics
#region public override bool Equals(object obj)
/// <summary>Determines whether the specified DisplayDevices are equal.</summary>
/// <param name="obj">The System.Object to check against.</param>
/// <returns>True if the System.Object is an equal DisplayDevice; false otherwise.</returns>
///// <summary>Determines whether the specified DisplayDevices are equal.</summary>
///// <param name="obj">The System.Object to check against.</param>
///// <returns>True if the System.Object is an equal DisplayDevice; false otherwise.</returns>
//public override bool Equals(object obj)
//{
// if (obj is DisplayDevice)
@ -329,9 +329,9 @@ namespace OpenTK.Graphics
#region public override int GetHashCode()
/// <summary>Returns a unique hash representing this DisplayDevice.</summary>
/// <returns>A System.Int32 that may serve as a hash code for this DisplayDevice.</returns>
//public override int GetHashCode()
///// <summary>Returns a unique hash representing this DisplayDevice.</summary>
///// <returns>A System.Int32 that may serve as a hash code for this DisplayDevice.</returns>
////public override int GetHashCode()
//{
// return current_resolution.GetHashCode() ^ IsPrimary.GetHashCode() ^ available_resolutions.Count;
//}

View file

@ -31,6 +31,8 @@ namespace OpenTK.Graphics
using System.Runtime.InteropServices;
#pragma warning disable 3019
#pragma warning disable 1591
#pragma warning disable 1572
#pragma warning disable 1573
static partial class GL
{

View file

@ -144,7 +144,6 @@ namespace OpenTK.Graphics
/// base OpenGL name of the function (e.g. "glVertex3fv" instead of "Vertex3").
/// </summary>
/// <param name="name">The name of the OpenGL function (eg. "glNewList")</param>
/// <param name="signature">The signature of the OpenGL function.</param>
/// <returns>
/// A System.Delegate that can be used to call this OpenGL function or null, if the specified
/// function name does not correspond to an OpenGL function or if the function is not
@ -212,7 +211,7 @@ namespace OpenTK.Graphics
/// <summary>
/// Tries to reload the given OpenGL function (core or extension).
/// </summary>
/// <param name="name">The name of the OpenGL function (i.e. glShaderSource)</param>
/// <param name="function">The name of the OpenGL function (i.e. glShaderSource)</param>
/// <returns>True if the function was found and reloaded, false otherwise.</returns>
/// <remarks>
/// <para>
@ -339,7 +338,7 @@ namespace OpenTK.Graphics
/// <summary>
/// Checks if a given OpenGL function is supported by the current context.
/// </summary>
/// <param name="method">The System.Reflection.MethodInfo for the OpenGL function.</param>
/// <param name="function">The System.Reflection.MethodInfo for the OpenGL function.</param>
/// <returns>True if the function is supported, false otherwise.</returns>
static bool SupportsFunction(MethodInfo function)
{
@ -532,7 +531,7 @@ namespace OpenTK.Graphics
/// <summary>
/// Retrieves the entry point for a dynamically exported OpenGL function.
/// </summary>
/// <param name="name">The function string for the OpenGL function (eg. "glNewList")</param>
/// <param name="function">The function string for the OpenGL function (eg. "glNewList")</param>
/// <returns>
/// An IntPtr contaning the address for the entry point, or IntPtr.Zero if the specified
/// OpenGL function is not dynamically exported.
@ -546,8 +545,6 @@ namespace OpenTK.Graphics
/// This function is cross-platform. It determines the underlying platform and uses the
/// correct wgl, glx or agl GetAddress function to retrieve the function pointer.
/// </para>
/// <see cref="Marshal.GetDelegateForFunctionPointer"/>
/// <seealso cref="Gl.GetDelegateForExtensionMethod"/>
/// </remarks>
private static IntPtr GetAddress(string function)
{

View file

@ -81,7 +81,7 @@ namespace OpenTK.Graphics
/// <summary>
/// Tries to reload the given GLU function (core or extension).
/// </summary>
/// <param name="name">The name of the GLU function.</param>
/// <param name="function">The name of the GLU function.</param>
/// <returns>True if the function was found and reloaded, false otherwise.</returns>
/// <remarks>
/// <para>

View file

@ -46,7 +46,7 @@ namespace OpenTK.Graphics
/// <summary>
/// Constructs a new GraphicsContext with the specified GraphicsMode and attaches it to the specified window.
/// </summary>
/// <param name="format">The OpenTK.Graphics.GraphicsMode of the GraphicsContext.</param>
/// <param name="mode">The OpenTK.Graphics.GraphicsMode of the GraphicsContext.</param>
/// <param name="window">The OpenTK.Platform.IWindowInfo to attach the GraphicsContext to.</param>
public GraphicsContext(GraphicsMode mode, IWindowInfo window)
: this(mode, window, 1, 0, GraphicsContextFlags.Default)
@ -55,7 +55,7 @@ namespace OpenTK.Graphics
/// <summary>
/// Constructs a new GraphicsContext with the specified GraphicsMode, version and flags, and attaches it to the specified window.
/// </summary>
/// <param name="format">The OpenTK.Graphics.GraphicsMode of the GraphicsContext.</param>
/// <param name="mode">The OpenTK.Graphics.GraphicsMode of the GraphicsContext.</param>
/// <param name="window">The OpenTK.Platform.IWindowInfo to attach the GraphicsContext to.</param>
/// <param name="major">The major version of the new GraphicsContext.</param>
/// <param name="minor">The minor version of the new GraphicsContext.</param>
@ -457,7 +457,6 @@ namespace OpenTK.Graphics
/// A pointer to the specified function or IntPtr.Zero if the function isn't
/// available in the current opengl context.
/// </returns>
/// <see cref="Marshal.GetDelegateForFunctionPointer"/>
IntPtr IGraphicsContextInternal.GetAddress(string function)
{
return (implementation as IGraphicsContextInternal).GetAddress(function);

View file

@ -237,7 +237,7 @@ namespace OpenTK.Input
/// <summary>
/// Initializes a new instance of the <see cref="JoystickMoveEventArgs"/> class.
/// </summary>
/// <param name="index">The index of the joystick axis that was moved.</param>
/// <param name="axis">The index of the joystick axis that was moved.</param>
/// <param name="value">The absolute value of the joystick axis.</param>
/// <param name="delta">The relative change in value of the joystick axis.</param>
public JoystickMoveEventArgs(JoystickAxis axis, float value, float delta)
@ -355,7 +355,7 @@ namespace OpenTK.Input
/// <summary>
/// Gets a System.Boolean indicating whether the specified JoystickButton is pressed.
/// </summary>
/// <param name="index">The JoystickButton to check.</param>
/// <param name="button">The JoystickButton to check.</param>
/// <returns>True if the JoystickButton is pressed; false otherwise.</returns>
public bool this[JoystickButton button]
{
@ -448,7 +448,7 @@ namespace OpenTK.Input
/// <summary>
/// Gets a System.Single indicating the absolute position of the JoystickAxis.
/// </summary>
/// <param name="index">The JoystickAxis to check.</param>
/// <param name="axis">The JoystickAxis to check.</param>
/// <returns>A System.Single in the range [-1, 1].</returns>
public float this[JoystickAxis axis]
{

View file

@ -160,7 +160,7 @@ namespace OpenTK.Input
/// <summary>
/// Gets a System.Boolean indicating the state of the specified MouseButton.
/// </summary>
/// <param name="key">The MouseButton to check.</param>
/// <param name="button">The MouseButton to check.</param>
/// <returns>True if the MouseButton is pressed, false otherwise.</returns>
public bool this[MouseButton button]
{

View file

@ -130,7 +130,7 @@ namespace OpenTK.Math
/// <summary>
/// Convert radians to degrees
/// </summary>
/// <param name="degrees">An angle in radians</param>
/// <param name="radians">An angle in radians</param>
/// <returns>The angle expressed in degrees</returns>
public static float RadiansToDegrees(float radians)
{

View file

@ -391,8 +391,9 @@ namespace OpenTK.Math
/// <summary>
/// Post multiply this matrix by another matrix
/// </summary>
/// <param name="right">The matrix to multiply</param>
/// <returns>A new Matrix44 that is the result of the multiplication</returns>
/// <param name="left">The left operand of the multiplication.</param>
/// <param name="right">The right operand of the multiplication.</param>
/// <returns>A new instance that is the result of the multiplication</returns>
public static Matrix4 Mult(Matrix4 left, Matrix4 right)
{
Vector4 col0 = right.Column0;
@ -553,6 +554,7 @@ namespace OpenTK.Math
/// Calculate the transpose of the given matrix
/// </summary>
/// <param name="mat">The matrix to transpose</param>
/// <param name="result">The result of the calculation</param>
public static void Transpose(ref Matrix4 mat, out Matrix4 result)
{
result.Row0 = mat.Column0;
@ -642,7 +644,7 @@ namespace OpenTK.Math
#region IEquatable<Matrix4> Members
/// <summary>Indicates whether the current matrix is equal to another matrix.</summary>
/// <param name="matrix">An matrix to compare with this matrix.</param>
/// <param name="other">An matrix to compare with this matrix.</param>
/// <returns>true if the current matrix is equal to the matrix parameter; otherwise, false.</returns>
public bool Equals(Matrix4 other)
{

View file

@ -423,8 +423,9 @@ namespace OpenTK.Math
/// <summary>
/// Post multiply this matrix by another matrix
/// </summary>
/// <param name="right">The matrix to multiply</param>
/// <returns>A new Matrix44 that is the result of the multiplication</returns>
/// <param name="left">The left operand of the multiplication.</param>
/// <param name="right">The right operand of the multiplication.</param>
/// <returns>A new instance that is the result of the multiplication</returns>
public static Matrix4d Mult(Matrix4d left, Matrix4d right)
{
Vector4d col0 = right.Column0;
@ -585,6 +586,7 @@ namespace OpenTK.Math
/// Calculate the transpose of the given matrix
/// </summary>
/// <param name="mat">The matrix to transpose</param>
/// <param name="result">The result of the calculation</param>
public static void Transpose(ref Matrix4d mat, out Matrix4d result)
{
result.Row0 = mat.Column0;
@ -674,7 +676,7 @@ namespace OpenTK.Math
#region IEquatable<Matrix4d> Members
/// <summary>Indicates whether the current matrix is equal to another matrix.</summary>
/// <param name="matrix">An matrix to compare with this matrix.</param>
/// <param name="other">An matrix to compare with this matrix.</param>
/// <returns>true if the current matrix is equal to the matrix parameter; otherwise, false.</returns>
public bool Equals(Matrix4d other)
{

View file

@ -532,10 +532,10 @@ namespace OpenTK.Math
/// </summary>
/// <param name="other">The other object to be used in the comparison.</param>
/// <returns>True if both objects are Quaternions of equal value. Otherwise it returns false.</returns>
public override bool Equals(object o)
public override bool Equals(object other)
{
if (o is Quaternion == false) return false;
return this == (Quaternion)o;
if (other is Quaternion == false) return false;
return this == (Quaternion)other;
}
#endregion

View file

@ -532,10 +532,10 @@ namespace OpenTK.Math
/// </summary>
/// <param name="other">The other object to be used in the comparison.</param>
/// <returns>True if both objects are Quaternions of equal value. Otherwise it returns false.</returns>
public override bool Equals(object o)
public override bool Equals(object other)
{
if (o is Quaterniond == false) return false;
return this == (Quaterniond)o;
if (other is Quaterniond == false) return false;
return this == (Quaterniond)other;
}
#endregion

View file

@ -173,7 +173,7 @@ namespace OpenTK.Math
/// <summary>
/// Gets the length (magnitude) of the vector.
/// </summary>
/// <see cref="FastLength"/>
/// <see cref="LengthFast"/>
/// <seealso cref="LengthSquared"/>
public float Length
{
@ -196,7 +196,6 @@ namespace OpenTK.Math
/// </remarks>
/// <see cref="Length"/>
/// <seealso cref="LengthSquared"/>
/// <seealso cref="OpenTK.Math.FastSqrt"/>
public float LengthFast
{
get
@ -217,7 +216,7 @@ namespace OpenTK.Math
/// for comparisons.
/// </remarks>
/// <see cref="Length"/>
/// <seealso cref="FastLength"/>
/// <seealso cref="LengthFast"/>
public float LengthSquared
{
get
@ -849,7 +848,7 @@ namespace OpenTK.Math
#region IEquatable<Vector2> Members
/// <summary>Indicates whether the current vector is equal to another vector.</summary>
/// <param name="vector">A vector to compare with this vector.</param>
/// <param name="other">A vector to compare with this vector.</param>
/// <returns>true if the current vector is equal to the vector parameter; otherwise, false.</returns>
public bool Equals(Vector2 other)
{

View file

@ -172,7 +172,6 @@ namespace OpenTK.Math
/// for comparisons.
/// </remarks>
/// <see cref="Length"/>
/// <seealso cref="FastLength"/>
public double LengthSquared
{
get
@ -327,7 +326,7 @@ namespace OpenTK.Math
/// Multiply a vector and a scalar
/// </summary>
/// <param name="a">Vector operand</param>
/// <param name="f">Scalar operand</param>
/// <param name="d">Scalar operand</param>
/// <returns>Result of the multiplication</returns>
public static Vector2d Mult(Vector2d a, double d)
{
@ -340,7 +339,7 @@ namespace OpenTK.Math
/// Multiply a vector and a scalar
/// </summary>
/// <param name="a">Vector operand</param>
/// <param name="f">Scalar operand</param>
/// <param name="d">Scalar operand</param>
/// <param name="result">Result of the multiplication</param>
public static void Mult(ref Vector2d a, double d, out Vector2d result)
{
@ -356,7 +355,7 @@ namespace OpenTK.Math
/// Divide a vector by a scalar
/// </summary>
/// <param name="a">Vector operand</param>
/// <param name="f">Scalar operand</param>
/// <param name="d">Scalar operand</param>
/// <returns>Result of the division</returns>
public static Vector2d Div(Vector2d a, double d)
{
@ -370,7 +369,7 @@ namespace OpenTK.Math
/// Divide a vector by a scalar
/// </summary>
/// <param name="a">Vector operand</param>
/// <param name="f">Scalar operand</param>
/// <param name="d">Scalar operand</param>
/// <param name="result">Result of the division</param>
public static void Div(ref Vector2d a, double d, out Vector2d result)
{
@ -752,7 +751,7 @@ namespace OpenTK.Math
#region IEquatable<Vector2d> Members
/// <summary>Indicates whether the current vector is equal to another vector.</summary>
/// <param name="vector">A vector to compare with this vector.</param>
/// <param name="other">A vector to compare with this vector.</param>
/// <returns>true if the current vector is equal to the vector parameter; otherwise, false.</returns>
public bool Equals(Vector2d other)
{

View file

@ -186,7 +186,6 @@ namespace OpenTK.Math
/// <summary>
/// Returns this Half2 instance's contents as Vector2d.
/// </summary>
/// <param name="v">OpenTK.Math.Vector2d</param>
public Vector2d ToVector2d()
{
return new Vector2d(X, Y);
@ -197,7 +196,7 @@ namespace OpenTK.Math
#region Conversions
/// <summary>Converts OpenTK.Math.Vector2 to OpenTK.Math.Half2.</summary>
/// <param name="v4f">The Vector2 to convert.</param>
/// <param name="v">The Vector2 to convert.</param>
/// <returns>The resulting Half vector.</returns>
public static explicit operator Vector2h(Vector2 v)
{
@ -205,7 +204,7 @@ namespace OpenTK.Math
}
/// <summary>Converts OpenTK.Math.Vector2d to OpenTK.Math.Half2.</summary>
/// <param name="v4d">The Vector2d to convert.</param>
/// <param name="v">The Vector2d to convert.</param>
/// <returns>The resulting Half vector.</returns>
public static explicit operator Vector2h(Vector2d v)
{
@ -213,7 +212,7 @@ namespace OpenTK.Math
}
/// <summary>Converts OpenTK.Math.Half2 to OpenTK.Math.Vector2.</summary>
/// <param name="h4">The Half2 to convert.</param>
/// <param name="h">The Half2 to convert.</param>
/// <returns>The resulting Vector2.</returns>
public static explicit operator Vector2(Vector2h h)
{
@ -221,7 +220,7 @@ namespace OpenTK.Math
}
/// <summary>Converts OpenTK.Math.Half2 to OpenTK.Math.Vector2d.</summary>
/// <param name="h4">The Half2 to convert.</param>
/// <param name="h">The Half2 to convert.</param>
/// <returns>The resulting Vector2d.</returns>
public static explicit operator Vector2d(Vector2h h)
{

View file

@ -115,7 +115,7 @@ namespace OpenTK.Math
/// <summary>Add the Vector passed as parameter to this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
public void Add( Vector3 right )
public void Add(Vector3 right)
{
this.X += right.X;
this.Y += right.Y;
@ -125,7 +125,7 @@ namespace OpenTK.Math
/// <summary>Add the Vector passed as parameter to this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[CLSCompliant(false)]
public void Add( ref Vector3 right )
public void Add(ref Vector3 right)
{
this.X += right.X;
this.Y += right.Y;
@ -138,7 +138,7 @@ namespace OpenTK.Math
/// <summary>Subtract the Vector passed as parameter from this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
public void Sub( Vector3 right )
public void Sub(Vector3 right)
{
this.X -= right.X;
this.Y -= right.Y;
@ -148,7 +148,7 @@ namespace OpenTK.Math
/// <summary>Subtract the Vector passed as parameter from this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[CLSCompliant(false)]
public void Sub( ref Vector3 right )
public void Sub(ref Vector3 right)
{
this.X -= right.X;
this.Y -= right.Y;
@ -161,7 +161,7 @@ namespace OpenTK.Math
/// <summary>Multiply this instance by a scalar.</summary>
/// <param name="f">Scalar operand.</param>
public void Mult( float f )
public void Mult(float f)
{
this.X *= f;
this.Y *= f;
@ -174,7 +174,7 @@ namespace OpenTK.Math
/// <summary>Divide this instance by a scalar.</summary>
/// <param name="f">Scalar operand.</param>
public void Div( float f )
public void Div(float f)
{
float mult = 1.0f / f;
this.X *= mult;
@ -189,7 +189,7 @@ namespace OpenTK.Math
/// <summary>
/// Gets the length (magnitude) of the vector.
/// </summary>
/// <see cref="FastLength"/>
/// <see cref="LengthFast"/>
/// <seealso cref="LengthSquared"/>
public float Length
{
@ -212,7 +212,6 @@ namespace OpenTK.Math
/// </remarks>
/// <see cref="Length"/>
/// <seealso cref="LengthSquared"/>
/// <seealso cref="OpenTK.Math.FastSqrt"/>
public float LengthFast
{
get
@ -233,7 +232,7 @@ namespace OpenTK.Math
/// for comparisons.
/// </remarks>
/// <see cref="Length"/>
/// <seealso cref="FastLength"/>
/// <seealso cref="LengthFast"/>
public float LengthSquared
{
get
@ -291,7 +290,7 @@ namespace OpenTK.Math
/// <summary>Scales this instance by the given parameter.</summary>
/// <param name="scale">The scaling of the individual components.</param>
public void Scale( Vector3 scale )
public void Scale(Vector3 scale)
{
this.X *= scale.X;
this.Y *= scale.Y;
@ -301,7 +300,7 @@ namespace OpenTK.Math
/// <summary>Scales this instance by the given parameter.</summary>
/// <param name="scale">The scaling of the individual components.</param>
[CLSCompliant(false)]
public void Scale( ref Vector3 scale )
public void Scale(ref Vector3 scale)
{
this.X *= scale.X;
this.Y *= scale.Y;
@ -675,7 +674,7 @@ namespace OpenTK.Math
/// <param name="left">First operand</param>
/// <param name="right">Second operand</param>
/// <param name="result">The dot product of the two inputs</param>
public static void Dot( ref Vector3 left, ref Vector3 right, out float result )
public static void Dot(ref Vector3 left, ref Vector3 right, out float result)
{
result = left.X * right.X + left.Y * right.Y + left.Z * right.Z;
}
@ -737,11 +736,11 @@ namespace OpenTK.Math
/// <param name="b">Second input vector</param>
/// <param name="blend">The blend factor. a when blend=0, b when blend=1.</param>
/// <param name="result">a when blend=0, b when blend=1, and a linear combination otherwise</param>
public static void Lerp( ref Vector3 a, ref Vector3 b, float blend, out Vector3 result )
public static void Lerp(ref Vector3 a, ref Vector3 b, float blend, out Vector3 result)
{
result.X = blend * ( b.X - a.X ) + a.X;
result.Y = blend * ( b.Y - a.Y ) + a.Y;
result.Z = blend * ( b.Z - a.Z ) + a.Z;
result.X = blend * (b.X - a.X) + a.X;
result.Y = blend * (b.Y - a.Y) + a.Y;
result.Z = blend * (b.Z - a.Z) + a.Z;
}
#endregion
@ -769,19 +768,19 @@ namespace OpenTK.Math
/// <param name="u">First Barycentric Coordinate.</param>
/// <param name="v">Second Barycentric Coordinate.</param>
/// <param name="result">Output Vector. a when u=v=0, b when u=1,v=0, c when u=0,v=1, and a linear combination of a,b,c otherwise</param>
public static void BaryCentric( ref Vector3 a, ref Vector3 b, ref Vector3 c, float u, float v, out Vector3 result )
public static void BaryCentric(ref Vector3 a, ref Vector3 b, ref Vector3 c, float u, float v, out Vector3 result)
{
result = a; // copy
Vector3 temp = b; // copy
temp.Sub( ref a );
temp.Mult( u );
result.Add( ref temp );
temp.Sub(ref a);
temp.Mult(u);
result.Add(ref temp);
temp = c; // copy
temp.Sub( ref a );
temp.Mult( v );
result.Add( ref temp );
temp.Sub(ref a);
temp.Mult(v);
result.Add(ref temp);
}
#endregion
@ -809,7 +808,7 @@ namespace OpenTK.Math
/// <param name="vec">The vector to transform</param>
/// <param name="mat">The desired transformation</param>
/// <param name="result">The transformed vector</param>
public static void TransformVector( ref Vector3 vec, ref Matrix4 mat, out Vector3 result)
public static void TransformVector(ref Vector3 vec, ref Matrix4 mat, out Vector3 result)
{
result.X = vec.X * mat.Row0.X +
vec.Y * mat.Row1.X +
@ -846,10 +845,10 @@ namespace OpenTK.Math
/// <param name="norm">The normal to transform</param>
/// <param name="mat">The desired transformation</param>
/// <param name="result">The transformed normal</param>
public static void TransformNormal( ref Vector3 norm, ref Matrix4 mat, out Vector3 result)
public static void TransformNormal(ref Vector3 norm, ref Matrix4 mat, out Vector3 result)
{
Matrix4 Inverse = Matrix4.Invert( mat );
Vector3.TransformNormalInverse( ref norm, ref Inverse, out result );
Matrix4 Inverse = Matrix4.Invert(mat);
Vector3.TransformNormalInverse(ref norm, ref Inverse, out result);
}
/// <summary>Transform a Normal by the (transpose of the) given Matrix</summary>
@ -858,7 +857,7 @@ namespace OpenTK.Math
/// Use this version if you already have the inverse of the desired transform to hand
/// </remarks>
/// <param name="norm">The normal to transform</param>
/// <param name="mat">The inverse of the desired transformation</param>
/// <param name="invMat">The inverse of the desired transformation</param>
/// <returns>The transformed normal</returns>
public static Vector3 TransformNormalInverse(Vector3 norm, Matrix4 invMat)
{
@ -875,9 +874,9 @@ namespace OpenTK.Math
/// Use this version if you already have the inverse of the desired transform to hand
/// </remarks>
/// <param name="norm">The normal to transform</param>
/// <param name="mat">The inverse of the desired transformation</param>
/// <param name="invMat">The inverse of the desired transformation</param>
/// <param name="result">The transformed normal</param>
public static void TransformNormalInverse( ref Vector3 norm, ref Matrix4 invMat, out Vector3 result )
public static void TransformNormalInverse(ref Vector3 norm, ref Matrix4 invMat, out Vector3 result)
{
result.X = norm.X * invMat.Row0.X +
norm.Y * invMat.Row0.Y +
@ -909,7 +908,7 @@ namespace OpenTK.Math
/// <param name="pos">The position to transform</param>
/// <param name="mat">The desired transformation</param>
/// <param name="result">The transformed position</param>
public static void TransformPosition( ref Vector3 pos, ref Matrix4 mat, out Vector3 result )
public static void TransformPosition(ref Vector3 pos, ref Matrix4 mat, out Vector3 result)
{
result.X = pos.X * mat.Row0.X +
pos.Y * mat.Row1.X +
@ -928,7 +927,7 @@ namespace OpenTK.Math
}
/// <summary>Transform a Vector by the given Matrix</summary>
/// <param name="pos">The vector to transform</param>
/// <param name="vec">The vector to transform</param>
/// <param name="mat">The desired transformation</param>
/// <returns>The transformed vector</returns>
public static Vector4 Transform(Vector3 vec, Matrix4 mat)
@ -943,17 +942,17 @@ namespace OpenTK.Math
}
/// <summary>Transform a Vector by the given Matrix</summary>
/// <param name="pos">The vector to transform</param>
/// <param name="vec">The vector to transform</param>
/// <param name="mat">The desired transformation</param>
/// <param name="result">The transformed vector</param>
public static void Transform( ref Vector3 vec, ref Matrix4 mat, out Vector4 result )
public static void Transform(ref Vector3 vec, ref Matrix4 mat, out Vector4 result)
{
Vector4 v4 = new Vector4( vec.X, vec.Y, vec.Z, 1.0f );
Vector4.Transform( ref v4, ref mat, out result );
Vector4 v4 = new Vector4(vec.X, vec.Y, vec.Z, 1.0f);
Vector4.Transform(ref v4, ref mat, out result);
}
/// <summary>Transform a Vector3 by the given Matrix, and project the resulting Vector4 back to a Vector3</summary>
/// <param name="pos">The vector to transform</param>
/// <param name="vec">The vector to transform</param>
/// <param name="mat">The desired transformation</param>
/// <returns>The transformed vector</returns>
public static Vector3 TransformPerspective(Vector3 vec, Matrix4 mat)
@ -963,13 +962,13 @@ namespace OpenTK.Math
}
/// <summary>Transform a Vector3 by the given Matrix, and project the resulting Vector4 back to a Vector3</summary>
/// <param name="pos">The vector to transform</param>
/// <param name="vec">The vector to transform</param>
/// <param name="mat">The desired transformation</param>
/// <param name="result">The transformed vector</param>
public static void TransformPerspective( ref Vector3 vec, ref Matrix4 mat, out Vector3 result )
public static void TransformPerspective(ref Vector3 vec, ref Matrix4 mat, out Vector3 result)
{
Vector4 h;
Vector3.Transform( ref vec, ref mat, out h );
Vector3.Transform(ref vec, ref mat, out h);
result.X = h.X / h.W;
result.Y = h.Y / h.W;
result.Z = h.Z / h.W;
@ -996,11 +995,11 @@ namespace OpenTK.Math
/// <param name="second">The second vector.</param>
/// <param name="result">Angle (in radians) between the vectors.</param>
/// <remarks>Note that the returned angle is never bigger than the constant Pi.</remarks>
public static void CalculateAngle( ref Vector3 first, ref Vector3 second, out float result )
public static void CalculateAngle(ref Vector3 first, ref Vector3 second, out float result)
{
float temp;
Vector3.Dot( ref first, ref second, out temp );
result = (float)System.Math.Acos( temp / ( first.Length * second.Length ) );
Vector3.Dot(ref first, ref second, out temp);
result = (float)System.Math.Acos(temp / (first.Length * second.Length));
}
#endregion
@ -1132,7 +1131,7 @@ namespace OpenTK.Math
#region IEquatable<Vector3> Members
/// <summary>Indicates whether the current vector is equal to another vector.</summary>
/// <param name="vector">A vector to compare with this vector.</param>
/// <param name="other">A vector to compare with this vector.</param>
/// <returns>true if the current vector is equal to the vector parameter; otherwise, false.</returns>
public bool Equals(Vector3 other)
{

View file

@ -113,7 +113,7 @@ namespace OpenTK.Math
/// <summary>Add the Vector passed as parameter to this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
public void Add( Vector3d right )
public void Add(Vector3d right)
{
this.X += right.X;
this.Y += right.Y;
@ -123,7 +123,7 @@ namespace OpenTK.Math
/// <summary>Add the Vector passed as parameter to this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[CLSCompliant(false)]
public void Add( ref Vector3d right )
public void Add(ref Vector3d right)
{
this.X += right.X;
this.Y += right.Y;
@ -136,7 +136,7 @@ namespace OpenTK.Math
/// <summary>Subtract the Vector passed as parameter from this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
public void Sub( Vector3d right )
public void Sub(Vector3d right)
{
this.X -= right.X;
this.Y -= right.Y;
@ -146,7 +146,7 @@ namespace OpenTK.Math
/// <summary>Subtract the Vector passed as parameter from this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[CLSCompliant(false)]
public void Sub( ref Vector3d right )
public void Sub(ref Vector3d right)
{
this.X -= right.X;
this.Y -= right.Y;
@ -159,7 +159,7 @@ namespace OpenTK.Math
/// <summary>Multiply this instance by a scalar.</summary>
/// <param name="f">Scalar operand.</param>
public void Mult( double f )
public void Mult(double f)
{
this.X *= f;
this.Y *= f;
@ -172,7 +172,7 @@ namespace OpenTK.Math
/// <summary>Divide this instance by a scalar.</summary>
/// <param name="f">Scalar operand.</param>
public void Div( double f )
public void Div(double f)
{
double mult = 1.0 / f;
this.X *= mult;
@ -187,7 +187,7 @@ namespace OpenTK.Math
/// <summary>
/// Gets the length (magnitude) of the vector.
/// </summary>
/// <see cref="FastLength"/>
/// <see cref="LengthFast"/>
/// <seealso cref="LengthSquared"/>
public double Length
{
@ -210,7 +210,6 @@ namespace OpenTK.Math
/// </remarks>
/// <see cref="Length"/>
/// <seealso cref="LengthSquared"/>
/// <seealso cref="OpenTK.Math.FastSqrt"/>
public double LengthFast
{
get
@ -231,7 +230,7 @@ namespace OpenTK.Math
/// for comparisons.
/// </remarks>
/// <see cref="Length"/>
/// <seealso cref="FastLength"/>
/// <seealso cref="LengthFast"/>
public double LengthSquared
{
get
@ -289,7 +288,7 @@ namespace OpenTK.Math
/// <summary>Scales this instance by the given parameter.</summary>
/// <param name="scale">The scaling of the individual components.</param>
public void Scale( Vector3d scale )
public void Scale(Vector3d scale)
{
this.X *= scale.X;
this.Y *= scale.Y;
@ -299,7 +298,7 @@ namespace OpenTK.Math
/// <summary>Scales this instance by the given parameter.</summary>
/// <param name="scale">The scaling of the individual components.</param>
[CLSCompliant(false)]
public void Scale( ref Vector3d scale )
public void Scale(ref Vector3d scale)
{
this.X *= scale.X;
this.Y *= scale.Y;
@ -673,7 +672,7 @@ namespace OpenTK.Math
/// <param name="left">First operand</param>
/// <param name="right">Second operand</param>
/// <param name="result">The dot product of the two inputs</param>
public static void Dot( ref Vector3d left, ref Vector3d right, out double result )
public static void Dot(ref Vector3d left, ref Vector3d right, out double result)
{
result = left.X * right.X + left.Y * right.Y + left.Z * right.Z;
}
@ -735,11 +734,11 @@ namespace OpenTK.Math
/// <param name="b">Second input vector</param>
/// <param name="blend">The blend factor. a when blend=0, b when blend=1.</param>
/// <param name="result">a when blend=0, b when blend=1, and a linear combination otherwise</param>
public static void Lerp( ref Vector3d a, ref Vector3d b, double blend, out Vector3d result )
public static void Lerp(ref Vector3d a, ref Vector3d b, double blend, out Vector3d result)
{
result.X = blend * ( b.X - a.X ) + a.X;
result.Y = blend * ( b.Y - a.Y ) + a.Y;
result.Z = blend * ( b.Z - a.Z ) + a.Z;
result.X = blend * (b.X - a.X) + a.X;
result.Y = blend * (b.Y - a.Y) + a.Y;
result.Z = blend * (b.Z - a.Z) + a.Z;
}
#endregion
@ -767,19 +766,19 @@ namespace OpenTK.Math
/// <param name="u">First Barycentric Coordinate.</param>
/// <param name="v">Second Barycentric Coordinate.</param>
/// <param name="result">Output Vector. a when u=v=0, b when u=1,v=0, c when u=0,v=1, and a linear combination of a,b,c otherwise</param>
public static void BaryCentric( ref Vector3d a, ref Vector3d b, ref Vector3d c, float u, float v, out Vector3d result )
public static void BaryCentric(ref Vector3d a, ref Vector3d b, ref Vector3d c, float u, float v, out Vector3d result)
{
result = a; // copy
Vector3d temp = b; // copy
temp.Sub( ref a );
temp.Mult( u );
result.Add( ref temp );
temp.Sub(ref a);
temp.Mult(u);
result.Add(ref temp);
temp = c; // copy
temp.Sub( ref a );
temp.Mult( v );
result.Add( ref temp );
temp.Sub(ref a);
temp.Mult(v);
result.Add(ref temp);
}
#endregion
@ -806,7 +805,7 @@ namespace OpenTK.Math
/// <param name="vec">The vector to transform</param>
/// <param name="mat">The desired transformation</param>
/// <param name="result">The transformed vector</param>
public static void TransformVector( ref Vector3d vec, ref Matrix4d mat, out Vector3d result )
public static void TransformVector(ref Vector3d vec, ref Matrix4d mat, out Vector3d result)
{
result.X = vec.X * mat.Row0.X +
vec.Y * mat.Row1.X +
@ -843,10 +842,10 @@ namespace OpenTK.Math
/// <param name="norm">The normal to transform</param>
/// <param name="mat">The desired transformation</param>
/// <param name="result">The transformed normal</param>
public static void TransformNormal( ref Vector3d norm, ref Matrix4d mat, out Vector3d result )
public static void TransformNormal(ref Vector3d norm, ref Matrix4d mat, out Vector3d result)
{
Matrix4d Inverse = Matrix4d.Invert( mat );
Vector3d.TransformNormalInverse( ref norm, ref Inverse, out result );
Matrix4d Inverse = Matrix4d.Invert(mat);
Vector3d.TransformNormalInverse(ref norm, ref Inverse, out result);
}
/// <summary>Transform a Normal by the (transpose of the) given Matrix</summary>
@ -855,7 +854,7 @@ namespace OpenTK.Math
/// Use this version if you already have the inverse of the desired transform to hand
/// </remarks>
/// <param name="norm">The normal to transform</param>
/// <param name="mat">The inverse of the desired transformation</param>
/// <param name="invMat">The inverse of the desired transformation</param>
/// <returns>The transformed normal</returns>
public static Vector3d TransformNormalInverse(Vector3d norm, Matrix4d invMat)
{
@ -871,9 +870,9 @@ namespace OpenTK.Math
/// Use this version if you already have the inverse of the desired transform to hand
/// </remarks>
/// <param name="norm">The normal to transform</param>
/// <param name="mat">The inverse of the desired transformation</param>
/// <param name="invMat">The inverse of the desired transformation</param>
/// <param name="result">The transformed normal</param>
public static void TransformNormalInverse( ref Vector3d norm, ref Matrix4d invMat, out Vector3d result )
public static void TransformNormalInverse(ref Vector3d norm, ref Matrix4d invMat, out Vector3d result)
{
result.X = norm.X * invMat.Row0.X +
norm.Y * invMat.Row0.Y +
@ -904,7 +903,7 @@ namespace OpenTK.Math
/// <param name="pos">The position to transform</param>
/// <param name="mat">The desired transformation</param>
/// <param name="result">The transformed position</param>
public static void TransformPosition( ref Vector3d pos, ref Matrix4d mat, out Vector3d result )
public static void TransformPosition(ref Vector3d pos, ref Matrix4d mat, out Vector3d result)
{
result.X = pos.X * mat.Row0.X +
pos.Y * mat.Row1.X +
@ -923,7 +922,7 @@ namespace OpenTK.Math
}
/// <summary>Transform a Vector by the given Matrix</summary>
/// <param name="pos">The vector to transform</param>
/// <param name="vec">The vector to transform</param>
/// <param name="mat">The desired transformation</param>
/// <returns>The transformed vector</returns>
public static Vector4d Transform(Vector3d vec, Matrix4d mat)
@ -937,19 +936,19 @@ namespace OpenTK.Math
}
/// <summary>Transform a Vector by the given Matrix</summary>
/// <param name="pos">The vector to transform</param>
/// <param name="vec">The vector to transform</param>
/// <param name="mat">The desired transformation</param>
/// <param name="result">The transformed vector</param>
public static void Transform( ref Vector3d vec, ref Matrix4d mat, out Vector4d result )
public static void Transform(ref Vector3d vec, ref Matrix4d mat, out Vector4d result)
{
Vector4d v4 = new Vector4d( vec.X, vec.Y, vec.Z, 1.0f );
Vector4d.Transform( ref v4, ref mat, out result );
Vector4d v4 = new Vector4d(vec.X, vec.Y, vec.Z, 1.0f);
Vector4d.Transform(ref v4, ref mat, out result);
}
/// <summary>
/// Transform a Vector3d by the given Matrix, and project the resulting Vector4 back to a Vector3
/// </summary>
/// <param name="pos">The vector to transform</param>
/// <param name="vec">The vector to transform</param>
/// <param name="mat">The desired transformation</param>
/// <returns>The transformed vector</returns>
public static Vector3d TransformPerspective(Vector3d vec, Matrix4d mat)
@ -959,13 +958,13 @@ namespace OpenTK.Math
}
/// <summary>Transform a Vector3d by the given Matrix, and project the resulting Vector4d back to a Vector3d</summary>
/// <param name="pos">The vector to transform</param>
/// <param name="vec">The vector to transform</param>
/// <param name="mat">The desired transformation</param>
/// <param name="result">The transformed vector</param>
public static void TransformPerspective( ref Vector3d vec, ref Matrix4d mat, out Vector3d result )
public static void TransformPerspective(ref Vector3d vec, ref Matrix4d mat, out Vector3d result)
{
Vector4d h;
Vector3d.Transform( ref vec, ref mat, out h );
Vector3d.Transform(ref vec, ref mat, out h);
result.X = h.X / h.W;
result.Y = h.Y / h.W;
result.Z = h.Z / h.W;
@ -992,11 +991,11 @@ namespace OpenTK.Math
/// <param name="second">The second vector.</param>
/// <param name="result">Angle (in radians) between the vectors.</param>
/// <remarks>Note that the returned angle is never bigger than the constant Pi.</remarks>
public static void CalculateAngle( ref Vector3d first, ref Vector3d second, out double result )
public static void CalculateAngle(ref Vector3d first, ref Vector3d second, out double result)
{
double temp;
Vector3d.Dot( ref first, ref second, out temp );
result = System.Math.Acos( temp / ( first.Length * second.Length ) );
Vector3d.Dot(ref first, ref second, out temp);
result = System.Math.Acos(temp / (first.Length * second.Length));
}
#endregion
@ -1077,17 +1076,17 @@ namespace OpenTK.Math
/// <summary>Converts OpenTK.Math.Vector3 to OpenTK.Math.Vector3d.</summary>
/// <param name="v3">The Vector3 to convert.</param>
/// <returns>The resulting Vector3d.</returns>
public static explicit operator Vector3d( Vector3 v3 )
public static explicit operator Vector3d(Vector3 v3)
{
return new Vector3d( v3.X, v3.Y, v3.Z );
return new Vector3d(v3.X, v3.Y, v3.Z);
}
/// <summary>Converts OpenTK.Math.Vector3d to OpenTK.Math.Vector3.</summary>
/// <param name="v3d">The Vector3d to convert.</param>
/// <returns>The resulting Vector3.</returns>
public static explicit operator Vector3( Vector3d v3d )
public static explicit operator Vector3(Vector3d v3d)
{
return new Vector3( (float)v3d.X, (float)v3d.Y, (float)v3d.Z );
return new Vector3((float)v3d.X, (float)v3d.Y, (float)v3d.Z);
}
#endregion
@ -1144,7 +1143,7 @@ namespace OpenTK.Math
#region IEquatable<Vector3> Members
/// <summary>Indicates whether the current vector is equal to another vector.</summary>
/// <param name="vector">A vector to compare with this vector.</param>
/// <param name="other">A vector to compare with this vector.</param>
/// <returns>true if the current vector is equal to the vector parameter; otherwise, false.</returns>
public bool Equals(Vector3d other)
{

View file

@ -215,7 +215,6 @@ namespace OpenTK.Math
/// <summary>
/// Returns this Half3 instance's contents as Vector3d.
/// </summary>
/// <param name="v">OpenTK.Math.Vector3d</param>
public Vector3d ToVector3d()
{
return new Vector3d(X, Y, Z);
@ -226,7 +225,7 @@ namespace OpenTK.Math
#region Conversions
/// <summary>Converts OpenTK.Math.Vector3 to OpenTK.Math.Half3.</summary>
/// <param name="v4f">The Vector3 to convert.</param>
/// <param name="v3f">The Vector3 to convert.</param>
/// <returns>The resulting Half vector.</returns>
public static explicit operator Vector3h(Vector3 v3f)
{
@ -234,7 +233,7 @@ namespace OpenTK.Math
}
/// <summary>Converts OpenTK.Math.Vector3d to OpenTK.Math.Half3.</summary>
/// <param name="v4d">The Vector3d to convert.</param>
/// <param name="v3d">The Vector3d to convert.</param>
/// <returns>The resulting Half vector.</returns>
public static explicit operator Vector3h(Vector3d v3d)
{
@ -242,7 +241,7 @@ namespace OpenTK.Math
}
/// <summary>Converts OpenTK.Math.Half3 to OpenTK.Math.Vector3.</summary>
/// <param name="h4">The Half3 to convert.</param>
/// <param name="h3">The Half3 to convert.</param>
/// <returns>The resulting Vector3.</returns>
public static explicit operator Vector3(Vector3h h3)
{
@ -254,7 +253,7 @@ namespace OpenTK.Math
}
/// <summary>Converts OpenTK.Math.Half3 to OpenTK.Math.Vector3d.</summary>
/// <param name="h4">The Half3 to convert.</param>
/// <param name="h3">The Half3 to convert.</param>
/// <returns>The resulting Vector3d.</returns>
public static explicit operator Vector3d(Vector3h h3)
{

View file

@ -246,7 +246,7 @@ namespace OpenTK.Math
/// <summary>
/// Gets the length (magnitude) of the vector.
/// </summary>
/// <see cref="FastLength"/>
/// <see cref="LengthFast"/>
/// <seealso cref="LengthSquared"/>
public float Length
{
@ -269,7 +269,6 @@ namespace OpenTK.Math
/// </remarks>
/// <see cref="Length"/>
/// <seealso cref="LengthSquared"/>
/// <seealso cref="OpenTK.Math.FastSqrt"/>
public float LengthFast
{
get
@ -290,7 +289,7 @@ namespace OpenTK.Math
/// for comparisons.
/// </remarks>
/// <see cref="Length"/>
/// <seealso cref="FastLength"/>
/// <seealso cref="LengthFast"/>
public float LengthSquared
{
get
@ -782,7 +781,7 @@ namespace OpenTK.Math
#region Transform
/// <summary>Transform a Vector by the given Matrix</summary>
/// <param name="pos">The vector to transform</param>
/// <param name="vec">The vector to transform</param>
/// <param name="mat">The desired transformation</param>
/// <returns>The transformed vector</returns>
public static Vector4 Transform(Vector4 vec, Matrix4 mat)
@ -796,7 +795,7 @@ namespace OpenTK.Math
}
/// <summary>Transform a Vector by the given Matrix</summary>
/// <param name="pos">The vector to transform</param>
/// <param name="vec">The vector to transform</param>
/// <param name="mat">The desired transformation</param>
/// <param name="result">The transformed vector</param>
public static void Transform( ref Vector4 vec, ref Matrix4 mat, out Vector4 result )
@ -977,7 +976,7 @@ namespace OpenTK.Math
#region IEquatable<Vector4> Members
/// <summary>Indicates whether the current vector is equal to another vector.</summary>
/// <param name="vector">A vector to compare with this vector.</param>
/// <param name="other">A vector to compare with this vector.</param>
/// <returns>true if the current vector is equal to the vector parameter; otherwise, false.</returns>
public bool Equals(Vector4 other)
{

View file

@ -163,7 +163,7 @@ namespace OpenTK.Math
/// <summary>Add the Vector passed as parameter to this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
public void Add( Vector4d right )
public void Add(Vector4d right)
{
this.X += right.X;
this.Y += right.Y;
@ -174,7 +174,7 @@ namespace OpenTK.Math
/// <summary>Add the Vector passed as parameter to this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[CLSCompliant(false)]
public void Add( ref Vector4d right )
public void Add(ref Vector4d right)
{
this.X += right.X;
this.Y += right.Y;
@ -188,7 +188,7 @@ namespace OpenTK.Math
/// <summary>Subtract the Vector passed as parameter from this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
public void Sub( Vector4d right )
public void Sub(Vector4d right)
{
this.X -= right.X;
this.Y -= right.Y;
@ -199,7 +199,7 @@ namespace OpenTK.Math
/// <summary>Subtract the Vector passed as parameter from this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[CLSCompliant(false)]
public void Sub( ref Vector4d right )
public void Sub(ref Vector4d right)
{
this.X -= right.X;
this.Y -= right.Y;
@ -213,7 +213,7 @@ namespace OpenTK.Math
/// <summary>Multiply this instance by a scalar.</summary>
/// <param name="f">Scalar operand.</param>
public void Mult( double f )
public void Mult(double f)
{
this.X *= f;
this.Y *= f;
@ -227,7 +227,7 @@ namespace OpenTK.Math
/// <summary>Divide this instance by a scalar.</summary>
/// <param name="f">Scalar operand.</param>
public void Div( double f )
public void Div(double f)
{
double mult = 1.0 / f;
this.X *= mult;
@ -243,7 +243,7 @@ namespace OpenTK.Math
/// <summary>
/// Gets the length (magnitude) of the vector.
/// </summary>
/// <see cref="FastLength"/>
/// <see cref="LengthFast"/>
/// <seealso cref="LengthSquared"/>
public double Length
{
@ -266,7 +266,6 @@ namespace OpenTK.Math
/// </remarks>
/// <see cref="Length"/>
/// <seealso cref="LengthSquared"/>
/// <seealso cref="OpenTK.Math.FastSqrt"/>
public double LengthFast
{
get
@ -287,7 +286,6 @@ namespace OpenTK.Math
/// for comparisons.
/// </remarks>
/// <see cref="Length"/>
/// <seealso cref="FastLength"/>
public double LengthSquared
{
get
@ -349,7 +347,7 @@ namespace OpenTK.Math
/// <summary>Scales this instance by the given parameter.</summary>
/// <param name="scale">The scaling of the individual components.</param>
public void Scale( Vector4d scale )
public void Scale(Vector4d scale)
{
this.X *= scale.X;
this.Y *= scale.Y;
@ -360,7 +358,7 @@ namespace OpenTK.Math
/// <summary>Scales this instance by the given parameter.</summary>
/// <param name="scale">The scaling of the individual components.</param>
[CLSCompliant(false)]
public void Scale( ref Vector4d scale )
public void Scale(ref Vector4d scale)
{
this.X *= scale.X;
this.Y *= scale.Y;
@ -694,7 +692,7 @@ namespace OpenTK.Math
/// <param name="left">First operand</param>
/// <param name="right">Second operand</param>
/// <param name="result">The dot product of the two inputs</param>
public static void Dot( ref Vector4d left, ref Vector4d right, out double result )
public static void Dot(ref Vector4d left, ref Vector4d right, out double result)
{
result = left.X * right.X + left.Y * right.Y + left.Z * right.Z + left.W * right.W;
}
@ -726,12 +724,12 @@ namespace OpenTK.Math
/// <param name="b">Second input vector</param>
/// <param name="blend">The blend factor. a when blend=0, b when blend=1.</param>
/// <param name="result">a when blend=0, b when blend=1, and a linear combination otherwise</param>
public static void Lerp( ref Vector4d a, ref Vector4d b, double blend, out Vector4d result )
public static void Lerp(ref Vector4d a, ref Vector4d b, double blend, out Vector4d result)
{
result.X = blend * ( b.X - a.X ) + a.X;
result.Y = blend * ( b.Y - a.Y ) + a.Y;
result.Z = blend * ( b.Z - a.Z ) + a.Z;
result.W = blend * ( b.W - a.W ) + a.W;
result.X = blend * (b.X - a.X) + a.X;
result.Y = blend * (b.Y - a.Y) + a.Y;
result.Z = blend * (b.Z - a.Z) + a.Z;
result.W = blend * (b.W - a.W) + a.W;
}
#endregion
@ -759,19 +757,19 @@ namespace OpenTK.Math
/// <param name="u">First Barycentric Coordinate.</param>
/// <param name="v">Second Barycentric Coordinate.</param>
/// <param name="result">Output Vector. a when u=v=0, b when u=1,v=0, c when u=0,v=1, and a linear combination of a,b,c otherwise</param>
public static void BaryCentric( ref Vector4d a, ref Vector4d b, ref Vector4d c, float u, float v, out Vector4d result )
public static void BaryCentric(ref Vector4d a, ref Vector4d b, ref Vector4d c, float u, float v, out Vector4d result)
{
result = a; // copy
Vector4d temp = b; // copy
temp.Sub( ref a );
temp.Mult( u );
result.Add( ref temp );
temp.Sub(ref a);
temp.Mult(u);
result.Add(ref temp);
temp = c; // copy
temp.Sub( ref a );
temp.Mult( v );
result.Add( ref temp );
temp.Sub(ref a);
temp.Mult(v);
result.Add(ref temp);
}
#endregion
@ -779,7 +777,7 @@ namespace OpenTK.Math
#region Transform
/// <summary>Transform a Vector by the given Matrix</summary>
/// <param name="pos">The vector to transform</param>
/// <param name="vec">The vector to transform</param>
/// <param name="mat">The desired transformation</param>
/// <returns>The transformed vector</returns>
public static Vector4d Transform(Vector4d vec, Matrix4d mat)
@ -793,10 +791,10 @@ namespace OpenTK.Math
}
/// <summary>Transform a Vector by the given Matrix</summary>
/// <param name="pos">The vector to transform</param>
/// <param name="vec">The vector to transform</param>
/// <param name="mat">The desired transformation</param>
/// <param name="result">The transformed vector</param>
public static void Transform( ref Vector4d vec, ref Matrix4d mat, out Vector4d result )
public static void Transform(ref Vector4d vec, ref Matrix4d mat, out Vector4d result)
{
result.X = vec.X * mat.Row0.X +
vec.Y * mat.Row1.X +
@ -923,17 +921,17 @@ namespace OpenTK.Math
/// <summary>Converts OpenTK.Math.Vector4 to OpenTK.Math.Vector4d.</summary>
/// <param name="v4">The Vector4 to convert.</param>
/// <returns>The resulting Vector4d.</returns>
public static explicit operator Vector4d( Vector4 v4 )
public static explicit operator Vector4d(Vector4 v4)
{
return new Vector4d( v4.X, v4.Y, v4.Z, v4.W );
return new Vector4d(v4.X, v4.Y, v4.Z, v4.W);
}
/// <summary>Converts OpenTK.Math.Vector4d to OpenTK.Math.Vector4.</summary>
/// <param name="v4d">The Vector4d to convert.</param>
/// <returns>The resulting Vector4.</returns>
public static explicit operator Vector4( Vector4d v4d )
public static explicit operator Vector4(Vector4d v4d)
{
return new Vector4( (float)v4d.X, (float)v4d.Y, (float)v4d.Z, (float)v4d.W );
return new Vector4((float)v4d.X, (float)v4d.Y, (float)v4d.Z, (float)v4d.W);
}
#endregion
@ -990,7 +988,7 @@ namespace OpenTK.Math
#region IEquatable<Vector4d> Members
/// <summary>Indicates whether the current vector is equal to another vector.</summary>
/// <param name="vector">A vector to compare with this vector.</param>
/// <param name="other">A vector to compare with this vector.</param>
/// <returns>true if the current vector is equal to the vector parameter; otherwise, false.</returns>
public bool Equals(Vector4d other)
{

View file

@ -238,7 +238,6 @@ namespace OpenTK.Math
/// <summary>
/// Returns this Half4 instance's contents as Vector4d.
/// </summary>
/// <param name="v">OpenTK.Math.Vector4d</param>
public Vector4d ToVector4d()
{
return new Vector4d(X, Y, Z, W);

View file

@ -29,7 +29,8 @@ namespace OpenTK.Platform.MacOS
IntPtr contextRef;
bool mVSync = false;
IntPtr displayID;
// Todo: keep track of which display adapter was specified when the context was created.
// IntPtr displayID;
GraphicsMode graphics_mode;
CarbonWindowInfo carbonWindow;

View file

@ -585,7 +585,6 @@ namespace OpenTK.Platform.MacOS
this.context.MakeCurrent(window);
context = this.context;
}
public void DestroyWindow()
@ -641,8 +640,8 @@ namespace OpenTK.Platform.MacOS
}
}
public event CreateEvent Create;
public event DestroyEvent Destroy;
public event CreateEvent Create = delegate(object sender, EventArgs e) { };
public event DestroyEvent Destroy = delegate(object sender, EventArgs e) { };
#endregion
@ -654,7 +653,6 @@ namespace OpenTK.Platform.MacOS
#region INativeGLWindow Members
public WindowState WindowState
{
get

View file

@ -249,7 +249,8 @@ namespace OpenTK.Platform
/// currently running on. This will create a handle for the control, so it is not
/// recommended that this be called in the constructor of a custom control.
/// </summary>
/// <param name="cntrl"></param>
/// <param name="mode">The desired GraphicsMode for this window.</param>
/// <param name="cntrl">A <see cref="System.Windows.Forms.Control"/> to get the IWindowInfo from.</param>
/// <returns></returns>
public static IWindowInfo CreateWindowInfo(Graphics.GraphicsMode mode, Control cntrl)
{
@ -259,6 +260,7 @@ namespace OpenTK.Platform
/// Creates an object which implements the IWindowInfo interface for the platform
/// currently running on.
/// </summary>
/// <param name="mode">The desired GraphicsMode for this window.</param>
/// <param name="controlHandle">The handle to the control, obtained from Control.Handle.</param>
/// <returns></returns>
public static IWindowInfo CreateWindowInfo(Graphics.GraphicsMode mode, IntPtr controlHandle)

View file

@ -289,10 +289,9 @@ namespace OpenTK.Platform.Windows
/// Low-level WINAPI function that retriives the next message in the queue.
/// </summary>
/// <param name="msg">The pending message (if any) is stored here.</param>
/// <param name="hWnd">Not used</param>
/// <param name="windowHandle">Not used</param>
/// <param name="messageFilterMin">Not used</param>
/// <param name="messageFilterMax">Not used</param>
/// <param name="flags">Not used</param>
/// <returns>
/// Nonzero indicates that the function retrieves a message other than WM_QUIT.
/// Zero indicates that the function retrieves the WM_QUIT message, or that lpMsg is an invalid pointer.
@ -435,7 +434,7 @@ namespace OpenTK.Platform.Windows
///
/// </summary>
/// <param name="hwnd"></param>
/// <param name="hDC"></param>
/// <param name="DC"></param>
/// <returns></returns>
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
@ -506,7 +505,7 @@ namespace OpenTK.Platform.Windows
/// <summary>
///
/// </summary>
/// <param name="funcname"></param>
/// <param name="dllName"></param>
/// <returns></returns>
[DllImport("kernel32.dll", SetLastError = true)]
internal static extern IntPtr LoadLibrary(string dllName);
@ -629,7 +628,7 @@ namespace OpenTK.Platform.Windows
/// Converts the screen coordinates of a specified point on the screen to client-area coordinates.
/// </summary>
/// <param name="hWnd">Handle to the window whose client area will be used for the conversion.</param>
/// <param name="lpPoint">Pointer to a POINT structure that specifies the screen coordinates to be converted.</param>
/// <param name="point">Pointer to a POINT structure that specifies the screen coordinates to be converted.</param>
/// <returns>If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. Windows NT/2000/XP: To get extended error information, call GetLastError.</returns>
/// <remarks>
/// <para>The function uses the window identified by the hWnd parameter and the screen coordinates given in the POINT structure to compute client coordinates. It then replaces the screen coordinates with the client coordinates. The new coordinates are relative to the upper-left corner of the specified window's client area. </para>
@ -649,7 +648,7 @@ namespace OpenTK.Platform.Windows
/// Converts the client-area coordinates of a specified point to screen coordinates.
/// </summary>
/// <param name="hWnd">Handle to the window whose client area will be used for the conversion.</param>
/// <param name="lpPoint">Pointer to a POINT structure that contains the client coordinates to be converted. The new screen coordinates are copied into this structure if the function succeeds.</param>
/// <param name="point">Pointer to a POINT structure that contains the client coordinates to be converted. The new screen coordinates are copied into this structure if the function succeeds.</param>
/// <returns>If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. Windows NT/2000/XP: To get extended error information, call GetLastError.</returns>
/// <remarks>
/// <para>The ClientToScreen function replaces the client-area coordinates in the POINT structure with the screen coordinates. The screen coordinates are relative to the upper-left corner of the screen. Note, a screen-coordinate point that is above the window's client area has a negative y-coordinate. Similarly, a screen coordinate to the left of a client area has a negative x-coordinate.</para>
@ -1511,8 +1510,7 @@ namespace OpenTK.Platform.Windows
/// character cell.
/// </summary>
/// <remarks>The values of <b>GlyphMetricsFloat</b> are specified as notional units.</remarks>
/// <seealso cref="POINTFLOAT" />
/// <seealso cref="Wgl.wglUseFontOutlines" />
/// <seealso cref="PointFloat" />
[StructLayout(LayoutKind.Sequential)]
internal struct GlyphMetricsFloat
{
@ -1543,9 +1541,9 @@ namespace OpenTK.Platform.Windows
#region PointFloat
/// <summary>
/// The <b>POINTFLOAT</b> structure contains the x and y coordinates of a point.
/// The <b>PointFloat</b> structure contains the x and y coordinates of a point.
/// </summary>
/// <seealso cref="GLYPHMETRICSFLOAT" />
/// <seealso cref="GlyphMetricsFloat" />
[StructLayout(LayoutKind.Sequential)]
internal struct PointFloat
{
@ -3159,10 +3157,10 @@ namespace OpenTK.Platform.Windows
#region QueueStatusFlags
[Flags]
/// <summary>
/// Queue status flags for GetQueueStatus() and MsgWaitForMultipleObjects()
/// </summary>
[Flags]
internal enum QueueStatusFlags
{
/// <summary>
@ -3513,7 +3511,7 @@ namespace OpenTK.Platform.Windows
#region ShowWindowCommand
/// <summary>
// ShowWindow() Commands
/// ShowWindow() Commands
/// </summary>
internal enum ShowWindowCommand
{

View file

@ -134,7 +134,7 @@ namespace OpenTK.Platform.Windows
/// <summary>
/// Checks if a Wgl extension is supported by the given context.
/// </summary>
/// <param name="deviceContext">The device context.</param>
/// <param name="context">The device context.</param>
/// <param name="ext">The extension to check.</param>
/// <returns>True if the extension is supported by the given context, false otherwise</returns>
public static bool SupportsExtension(WinGLContext context, string ext)

View file

@ -43,9 +43,10 @@ namespace OpenTK.Platform.Windows
List<JoystickDevice> sticks = new List<JoystickDevice>();
IList<JoystickDevice> sticks_readonly;
static readonly string RegistryJoyConfig = @"Joystick%dConfiguration";
static readonly string RegistryJoyName = @"Joystick%dOEMName";
static readonly string RegstryJoyCurrent = @"CurrentJoystickSettings";
// Todo: Read the joystick name from the registry.
//static readonly string RegistryJoyConfig = @"Joystick%dConfiguration";
//static readonly string RegistryJoyName = @"Joystick%dOEMName";
//static readonly string RegstryJoyCurrent = @"CurrentJoystickSettings";
bool disposed;
@ -113,17 +114,17 @@ namespace OpenTK.Platform.Windows
stick.Details.PovType |= PovType.Continuous;
}
// Try to get the device name from the registry. Oh joy!
string key_path = String.Format("{0}\\{1}\\{2}", RegistryJoyConfig, caps.RegKey, RegstryJoyCurrent);
RegistryKey key = Registry.LocalMachine.OpenSubKey(key_path, false);
if (key == null)
key = Registry.CurrentUser.OpenSubKey(key_path, false);
if (key == null)
stick.Description = String.Format("USB Joystick {0} ({1} axes, {2} buttons)", number, stick.Axis.Count, stick.Button.Count);
else
{
key.Close();
}
// Todo: Try to get the device name from the registry. Oh joy!
//string key_path = String.Format("{0}\\{1}\\{2}", RegistryJoyConfig, caps.RegKey, RegstryJoyCurrent);
//RegistryKey key = Registry.LocalMachine.OpenSubKey(key_path, false);
//if (key == null)
// key = Registry.CurrentUser.OpenSubKey(key_path, false);
//if (key == null)
// stick.Description = String.Format("USB Joystick {0} ({1} axes, {2} buttons)", number, stick.Axis.Count, stick.Button.Count);
//else
//{
// key.Close();
//}
if (stick != null)
Debug.Print("Found joystick on device number {0}", number);

View file

@ -170,7 +170,7 @@ namespace OpenTK.Platform.X11
/// </summary>
/// <param name="buffer">A pointer to the structure that will be freed.</param>
[DllImport(_dll_name, EntryPoint = "XFree")]
extern public static void Free(IntPtr data);
extern public static void Free(IntPtr buffer);
#endregion

View file

@ -33,7 +33,7 @@ using System.Drawing;
using System.Diagnostics;
using System.Runtime.InteropServices;
/// X11 Version
// X11 Version
namespace OpenTK.Platform.X11
{
//