Add missing xmldoc

This commit is contained in:
Oliver Booth 2022-11-30 18:46:02 +00:00
parent 8bbbf170e3
commit 80679fa8c4
No known key found for this signature in database
GPG Key ID: 32A00B35503AF634
7 changed files with 92 additions and 15 deletions

View File

@ -62,7 +62,7 @@ public sealed class CommandsExtension : VirtualParadiseClientExtension
}
/// <summary>
/// Registers the command
/// Registers the commands defined in the specified type.
/// </summary>
/// <exception cref="ArgumentException">
/// <typeparamref name="T" /> refers to a type that does not inherit <see cref="CommandModule" />.
@ -84,9 +84,9 @@ public sealed class CommandsExtension : VirtualParadiseClientExtension
}
/// <summary>
/// Registers the command
/// Registers the commands defined in the specified type.
/// </summary>
/// <param name="moduleType"></param>
/// <param name="moduleType">The type whose command methods to register.</param>
/// <exception cref="ArgumentNullException"><paramref name="moduleType" /> is <see langword="null" />.</exception>
/// <exception cref="ArgumentException">
/// <para><paramref name="moduleType" /> refers to an <c>abstract</c> type.</para>

View File

@ -1,4 +1,4 @@
using VpSharp.Internal;
using VpSharp.Internal;
using VpSharp.Internal.NativeAttributes;
using static VpSharp.Internal.Native;
@ -10,7 +10,12 @@ namespace VpSharp.Entities;
/// </summary>
public class VirtualParadiseModelObject : VirtualParadiseObject
{
/// <inheritdoc />
/// <summary>
/// Initializes a new instance of the <see cref="VirtualParadiseModelObject" /> class.
/// </summary>
/// <param name="client">The owning client.</param>
/// <param name="id">The object ID.</param>
/// <exception cref="ArgumentNullException"><paramref name="client" /> is <see langword="null" />.</exception>
internal VirtualParadiseModelObject(VirtualParadiseClient client, int id)
: base(client, id)
{

View File

@ -10,9 +10,17 @@ using VpSharp.Internal.ValueConverters;
namespace VpSharp.Entities;
/// <summary>
/// Represents a particle emitter object.
/// </summary>
public sealed class VirtualParadiseParticleEmitterObject : VirtualParadiseObject
{
/// <inheritdoc />
/// <summary>
/// Initializes a new instance of the <see cref="VirtualParadiseParticleEmitterObject" /> class.
/// </summary>
/// <param name="client">The owning client.</param>
/// <param name="id">The object ID.</param>
/// <exception cref="ArgumentNullException"><paramref name="client" /> is <see langword="null" />.</exception>
internal VirtualParadiseParticleEmitterObject(VirtualParadiseClient client, int id)
: base(client, id)
{
@ -228,6 +236,7 @@ public sealed class VirtualParadiseParticleEmitterObject : VirtualParadiseObject
}
}
/// <inheritdoc />
protected override void ExtractFromData(ReadOnlySpan<byte> data)
{
#pragma warning disable 612

View File

@ -11,7 +11,12 @@ namespace VpSharp.Entities;
/// </summary>
public sealed class VirtualParadisePathObject : VirtualParadiseObject
{
/// <inheritdoc />
/// <summary>
/// Initializes a new instance of the <see cref="VirtualParadisePathObject" /> class.
/// </summary>
/// <param name="client">The owning client.</param>
/// <param name="id">The object ID.</param>
/// <exception cref="ArgumentNullException"><paramref name="client" /> is <see langword="null" />.</exception>
internal VirtualParadisePathObject(VirtualParadiseClient client, int id)
: base(client, id)
{
@ -34,6 +39,7 @@ public sealed class VirtualParadisePathObject : VirtualParadiseObject
Path = (VirtualParadisePath)path.Path.Clone();
}
/// <inheritdoc />
protected override void ExtractFromData(ReadOnlySpan<byte> data)
{
Span<char> chars = stackalloc char[data.Length];

View File

@ -1,10 +1,22 @@
using System.Numerics;
using System.Numerics;
namespace VpSharp.Extensions;
/// <summary>
/// Extension methods for <see cref="Quaternion" />.
/// </summary>
public static class QuaternionExtensions
{
// https://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToEuler/
/// <summary>
/// Converts this quaternion to a <see cref="Vector3d" /> containing an Euler representation of the rotation.
/// </summary>
/// <param name="value">The quaternion to convert.</param>
/// <param name="radians">
/// <see langword="true" /> if the resulting vector should be in radians; or <see langword="false" /> if the resulting
/// vector should be in degrees.
/// </param>
/// <returns>The Euler representation of <paramref name="value" />.</returns>
/// <see href="https://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToEuler/" />
public static Vector3d ToEulerAngles(this Quaternion value, bool radians = true)
{
double a = 2.0 * value.Y * value.W - 2.0 * value.X * value.Z;
@ -29,6 +41,15 @@ public static class QuaternionExtensions
return new Vector3d(x, y, z);
}
/// <summary>
/// Converts this quaternion to a <see cref="Vector3d" /> containing an Euler representation of the rotation.
/// </summary>
/// <param name="value">The quaternion to convert.</param>
/// <param name="radians">
/// <see langword="true" /> if the resulting vector should be in radians; or <see langword="false" /> if the resulting
/// vector should be in degrees.
/// </param>
/// <returns>The Euler representation of <paramref name="value" />.</returns>
public static Vector3d ToEulerAnglesF(this Quaternion value, bool radians = true)
{
float a = 2.0f * value.Y * value.W - 2.0f * value.X * value.Z;
@ -53,7 +74,14 @@ public static class QuaternionExtensions
return new Vector3d(x, y, z);
}
// https://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToAngle/index.htm
//
/// <summary>
/// Converts this quaternion to an axis/angle pair.
/// </summary>
/// <param name="value">The quaternion to convert.</param>
/// <param name="axis">The axis value.</param>
/// <param name="angle">The angle value.</param>
/// <see href="https://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToAngle/index.htm"/>
public static void ToAxisAngle(this Quaternion value, out Vector3 axis, out float angle)
{
angle = 2.0f * MathF.Acos(value.W);
@ -65,6 +93,12 @@ public static class QuaternionExtensions
axis = new Vector3(x, y, z);
}
/// <summary>
/// Converts this quaternion to an axis/angle pair.
/// </summary>
/// <param name="value">The quaternion to convert.</param>
/// <param name="axis">The axis value.</param>
/// <param name="angle">The angle value.</param>
public static void ToAxisAngle(this Quaternion value, out Vector3d axis, out double angle)
{
angle = 2.0 * Math.Acos(value.W);

View File

@ -5,10 +5,33 @@
/// </summary>
public enum FogMode
{
/// <summary>
/// None.
/// </summary>
None,
/// <summary>
/// Linear fog mode.
/// </summary>
Linear,
Exp,
Exponential = Exp,
Exp2,
Exponential2 = Exp2
/// <summary>
/// Exponential fog mode.
/// </summary>
Exponential,
/// <summary>
/// Exponential squared fog mode.
/// </summary>
Exponential2,
/// <summary>
/// Exponential fog mode. This value is used for serialization purposes.
/// </summary>
Exp = Exponential,
/// <summary>
/// Exponential squared fog mode. This value is used for serialization purposes.
/// </summary>
Exp2 = Exponential2
}

View File

@ -40,7 +40,7 @@ public sealed partial class VirtualParadiseClient
}
/// <summary>
/// Gets a read-only view of the worlds returned by the universe server.
/// Gets a read-only view of the worlds returned by the universe server.
/// </summary>
/// <returns>An <see cref="IReadOnlyCollection{T}" /> containing <see cref="VirtualParadiseWorld" /> values.</returns>
/// <remarks>