switch root namespace name to NITLOAD
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="CoordinationBase"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using Nitload.Mathematics.Numeric.Graphics;
|
||||
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Nitload.Geometries
|
||||
{
|
||||
public abstract class CoordinationBase
|
||||
{
|
||||
|
||||
private bool globalCoordAvailable;
|
||||
private CoordinationBase localCoordination;
|
||||
private GraphicsMatrix coordMat;
|
||||
|
||||
public CoordinationBase(
|
||||
CoordinationBase localCoordination
|
||||
)
|
||||
{
|
||||
this.localCoordination = localCoordination;
|
||||
coordMat = new GraphicsMatrix();
|
||||
}
|
||||
|
||||
public virtual Point LocalOrigin
|
||||
{
|
||||
get => new Point(coordMat.column[3].XYZ);
|
||||
internal set => coordMat.column[3].XYZ = value.Coord;
|
||||
}
|
||||
|
||||
public virtual Vec3 LocalX
|
||||
{
|
||||
get => coordMat.column[3].XYZ;
|
||||
internal set => coordMat.column[3].XYZ = value;
|
||||
}
|
||||
|
||||
public virtual Vec3 LocalY
|
||||
{
|
||||
get => coordMat.column[3].XYZ;
|
||||
internal set => coordMat.column[3].XYZ = value;
|
||||
}
|
||||
|
||||
public virtual Vec3 LocalZ
|
||||
{
|
||||
get => coordMat.column[3].XYZ;
|
||||
set => coordMat.column[3].XYZ = value;
|
||||
}
|
||||
|
||||
protected ref GraphicsMatrix CoordMat => ref coordMat;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="PlainCoordinate"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using Nitload.Mathematics;
|
||||
using Nitload.Mathematics.Numeric.Graphics;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Text;
|
||||
|
||||
namespace Nitload.Geometries
|
||||
{
|
||||
public class PlainCoordinate : CoordinationBase
|
||||
{
|
||||
|
||||
public PlainCoordinate(
|
||||
CoordinationBase local,
|
||||
Point origin,
|
||||
Vec3 xAxis,
|
||||
Vec3 yAxis
|
||||
)
|
||||
: base(local)
|
||||
{
|
||||
CoordMat = GraphicsMatrix.Unit;
|
||||
|
||||
CoordMat.column[0] = new Vec4(xAxis, 0);
|
||||
CoordMat.column[1] = new Vec4(yAxis, 0);
|
||||
CoordMat.column[2] = new Vec4(Linear.Normalize(Vec3.Cross(xAxis, yAxis)), 0);
|
||||
|
||||
LocalOrigin = origin;
|
||||
}
|
||||
|
||||
public static PlainCoordinate StandardPlainCoordination { get; } = new(null,
|
||||
new Point(0, 0, 0),
|
||||
new Vec3(1, 0, 0),
|
||||
new Vec3(0, 1, 0));
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="SpaceCoordinate"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using Nitload.Mathematics;
|
||||
using Nitload.Mathematics.Numeric.Graphics;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Nitload.Geometries
|
||||
{
|
||||
public class SpaceCoordinate : CoordinationBase
|
||||
{
|
||||
|
||||
public SpaceCoordinate(
|
||||
CoordinationBase localCoordination,
|
||||
Point origin,
|
||||
Vec3 xAxis,
|
||||
Vec3 yAxis,
|
||||
Vec3 zAxis
|
||||
)
|
||||
: base(localCoordination) { }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="StreamLocalCoordinate"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using Nitload.Mathematics;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Nitload.Geometries
|
||||
{
|
||||
/*
|
||||
public class StreamLocalCoordinate : CoordinationBase
|
||||
{
|
||||
}
|
||||
/**/
|
||||
}
|
||||
Reference in New Issue
Block a user