More small cleanups.

This commit is contained in:
Will
2015-11-01 13:58:38 -07:00
parent 1da72cc4cb
commit 3a2a493154
5 changed files with 9 additions and 7 deletions

View File

@@ -134,10 +134,13 @@ namespace LibBSP {
/// <param name="point0">A point on the <c>Plane</c></param>
/// <param name="point1">A point on the <c>Plane</c></param>
/// <param name="point2">A point on the <c>Plane</c></param>
public Plane(Vector3d point0, Vector3d point1, Vector3d point2) {
_normal = ((point0 - point2) ^ (point0 - point1));
public Plane(params Vector3d[] points) {
if (points.Length < 3) {
throw new ArgumentException("Plane constructor was not given enough points to define a plane");
}
_normal = ((points[0] - points[2]) ^ (points[0] - points[1]));
_normal.Normalize();
distance = point0 * _normal;
distance = points[0] * _normal;
}
/// <summary>

View File

@@ -5,7 +5,7 @@ using System.Collections.Generic;
namespace LibBSP {
/// <summary>
/// Holds an array of two <c>double</c>s representing a 2-dimensional vector.
/// Holds two <c>double</c>s representing a 2-dimensional vector.
/// </summary>
[Serializable] public struct Vector2d : IEquatable<Vector2d>, IEnumerable, IEnumerable<double> {

View File

@@ -7,7 +7,7 @@ using System.Drawing;
namespace LibBSP {
using Color32 = Color;
/// <summary>
/// Holds an array of three <c>double</c>s representing a 3-dimensional vector.
/// Holds three <c>double</c>s representing a 3-dimensional vector.
/// </summary>
[Serializable] public struct Vector3d : IEquatable<Vector3d>, IEnumerable, IEnumerable<double> {

View File

@@ -7,7 +7,7 @@ using System.Drawing;
namespace LibBSP {
using Color32 = Color;
/// <summary>
/// Holds an array of four <c>double</c>s representing a 4-dimensional vector.
/// Holds four <c>double</c>s representing a 4-dimensional vector.
/// </summary>
[Serializable] public struct Vector4d : IEquatable<Vector4d>, IEnumerable, IEnumerable<double> {

View File

@@ -31,7 +31,6 @@ namespace LibBSP {
public string material;
public double lgtScale;
public double lgtRot;
public int id;
public MAPDisplacement displacement;
/// <summary>