daily update on 20240514 by nitload youmu
This commit is contained in:
@@ -93,7 +93,7 @@ namespace StgSharp.Geometries
|
||||
{
|
||||
(vec3d coord , float rotation) =(Coord, Rotation);
|
||||
Motion.RunMotion(ref coord, ref rotation);
|
||||
(Rotation, Coord) = (rotation, coord);
|
||||
(Coord,Rotation) = (coord, rotation);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
using StgSharp.Math;
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics.Contracts;
|
||||
@@ -43,7 +44,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace StgSharp.Geometries
|
||||
{
|
||||
public class PlainInstancingBuffer<T> : IDisposable where T : IInstancing<T>
|
||||
public class PlainInstancingBuffer<T> : IDisposable,IEnumerable<T> where T : IInstancing<T>
|
||||
{
|
||||
|
||||
private CoordinatePlain globalCorrdinnate;
|
||||
@@ -158,7 +159,7 @@ namespace StgSharp.Geometries
|
||||
{
|
||||
foreach (var particle in instanceList)
|
||||
{
|
||||
|
||||
particle.Move();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,5 +189,21 @@ namespace StgSharp.Geometries
|
||||
Dispose(disposing: true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
public IEnumerator<T> GetEnumerator()
|
||||
{
|
||||
foreach (var item in instanceList)
|
||||
{
|
||||
yield return (T)item;
|
||||
}
|
||||
}
|
||||
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
foreach (var item in instanceList)
|
||||
{
|
||||
yield return (T)item;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user