mirror of
https://github.com/celisej567/LibBSP.git
synced 2026-09-11 20:09:36 +03:00
More small cleanups.
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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> {
|
||||
|
||||
|
||||
@@ -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> {
|
||||
|
||||
|
||||
@@ -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> {
|
||||
|
||||
|
||||
@@ -31,7 +31,6 @@ namespace LibBSP {
|
||||
public string material;
|
||||
public double lgtScale;
|
||||
public double lgtRot;
|
||||
public int id;
|
||||
public MAPDisplacement displacement;
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user