Add area judge functions.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Cryville.Common.Pdt;
|
||||
using System;
|
||||
using RBeatTime = Cryville.Crtr.BeatTime;
|
||||
using RVector4 = UnityEngine.Vector4;
|
||||
|
||||
namespace Cryville.Crtr {
|
||||
public abstract class PropSrc {
|
||||
@@ -95,5 +96,21 @@ namespace Cryville.Crtr {
|
||||
}
|
||||
}
|
||||
}
|
||||
public class Vector4 : FixedBuffer {
|
||||
readonly Func<RVector4> _cb;
|
||||
public Vector4(Func<RVector4> cb) : base(PdtInternalType.Vector, 4 * sizeof(float) + sizeof(int)) { _cb = cb; }
|
||||
protected unsafe override void InternalGet() {
|
||||
base.InternalGet();
|
||||
var vec = _cb();
|
||||
fixed (byte* _ptr = buf) {
|
||||
float* ptr = (float*)_ptr;
|
||||
*ptr++ = vec.x;
|
||||
*ptr++ = vec.y;
|
||||
*ptr++ = vec.z;
|
||||
*ptr++ = vec.w;
|
||||
*(int*)ptr = PdtInternalType.Number;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user