daily update on 20240610 by nitload youmu
This commit is contained in:
@@ -16,14 +16,16 @@ namespace StgSharp.Geometries
|
||||
public bool CollideWith(IPlainEntity entity);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public class PlainEntity:IPlainEntity
|
||||
{
|
||||
private PlainGeometry _shape;
|
||||
|
||||
vec2d IPlainEntity.CenterPosition
|
||||
{
|
||||
get => throw new NotImplementedException();
|
||||
set => throw new NotImplementedException();
|
||||
get => _shape.Coordination.LocalOrigin.Coord.XY;
|
||||
set => throw new InvalidOperationException();
|
||||
}
|
||||
|
||||
public PlainEntity(PlainGeometry shape)
|
||||
|
||||
@@ -76,7 +76,13 @@ namespace StgSharp.Geometries
|
||||
get;
|
||||
set;
|
||||
}
|
||||
vec2d IPlainEntity.CenterPosition { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
|
||||
vec2d IPlainEntity.CenterPosition
|
||||
{
|
||||
get => GlobalBuffer.CoordAndRotationList[BufferId].XY;
|
||||
set => throw new NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
bool IPlainEntity.CollideWith(IPlainEntity entity)
|
||||
{
|
||||
|
||||
@@ -42,19 +42,19 @@ namespace StgSharp.Geometries
|
||||
public abstract class PlainGeometry : IGeometry
|
||||
{
|
||||
protected vec4d[] vertexMat;
|
||||
internal ICoord coordinate;
|
||||
internal CoordinationBase coordinate;
|
||||
|
||||
public PlainGeometry()
|
||||
internal PlainGeometry(CoordinationBase coordination)
|
||||
{
|
||||
coordinate = coordination;
|
||||
}
|
||||
|
||||
public vec4d this[int index]
|
||||
public Point this[int index]
|
||||
{
|
||||
get => vertexMat[index];
|
||||
set => vertexMat[index] = value;
|
||||
get => new Point(vertexMat[index]);
|
||||
set => vertexMat[index].vec = value.coordVec;
|
||||
}
|
||||
|
||||
public ICoord ReferenceCoordinate => this.coordinate;
|
||||
|
||||
public int VertexCount => this.vertexMat.Length;
|
||||
|
||||
@@ -62,9 +62,11 @@ namespace StgSharp.Geometries
|
||||
|
||||
#pragma warning disable CA1819
|
||||
public vec4d[] VertexStream => vertexMat;
|
||||
#pragma warning restore CA1819
|
||||
|
||||
public CoordinationBase Coordination => this.coordinate;
|
||||
#pragma warning restore CA1819
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user