generate glenum, link glenum, add source gen for text regex
This commit is contained in:
@@ -14,9 +14,9 @@ using System.Runtime.InteropServices;
|
||||
namespace StgSharp.Geometries
|
||||
{
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
public delegate Vec3 GeometryMotionDelegate(
|
||||
TimeSpanProvider timeSource,
|
||||
out float rotation
|
||||
public delegate Vec3<float> GeometryMotionDelegate(
|
||||
TimeSpanProvider timeSource,
|
||||
out float rotation
|
||||
);
|
||||
|
||||
public class GeometryMotion
|
||||
@@ -38,7 +38,7 @@ namespace StgSharp.Geometries
|
||||
time = timeSource;
|
||||
if (motionDelegate == null)
|
||||
{
|
||||
handle = (IntPtr)(delegate*<TimeSpanProvider, out float, Vec3>)&defaultMotion;
|
||||
handle = (IntPtr)(delegate*<TimeSpanProvider, out float, Vec3<float>>)&defaultMotion;
|
||||
movement = defaultMotion;
|
||||
} else if (motionDelegate.Method.IsStatic)
|
||||
{
|
||||
@@ -58,15 +58,15 @@ namespace StgSharp.Geometries
|
||||
public static GeometryMotion DefaultMotion => new GeometryMotion(true, null, null);
|
||||
|
||||
public unsafe void RunMotion(
|
||||
ref Vec3 coord,
|
||||
ref Vec3<float> coord,
|
||||
ref float rotation
|
||||
)
|
||||
{
|
||||
float rot;
|
||||
Vec3 vec;
|
||||
Vec3<float> vec;
|
||||
if (sourceIsStatic)
|
||||
{
|
||||
vec = ((delegate* unmanaged[Cdecl]<TimeSpanProvider, out float, Vec3>)handle)(
|
||||
vec = ((delegate* unmanaged[Cdecl]<TimeSpanProvider, out float, Vec3<float>>)handle)(
|
||||
time, out rot);
|
||||
} else
|
||||
{
|
||||
@@ -84,13 +84,13 @@ namespace StgSharp.Geometries
|
||||
}
|
||||
}
|
||||
|
||||
private static Vec3 defaultMotion(
|
||||
TimeSpanProvider provider,
|
||||
out float rotation
|
||||
private static Vec3<float> defaultMotion(
|
||||
TimeSpanProvider provider,
|
||||
out float rotation
|
||||
)
|
||||
{
|
||||
rotation = 0;
|
||||
return Vec3.Zero;
|
||||
return Vec3<float>.Zero;
|
||||
}
|
||||
|
||||
}//------------------------------- End of Class -------------------------------
|
||||
|
||||
Reference in New Issue
Block a user