private Vector3 GetLocalScaleInternal(ref AnimationStream stream) { Vector3 result; TransformStreamHandle.GetLocalScaleInternal_Injected(ref this, ref stream, out result); return(result); }
public static TransformStreamHandle BindStreamTransform(this Animator animator, Transform transform) { TransformStreamHandle result = default(TransformStreamHandle); AnimatorJobExtensions.InternalBindStreamTransform(animator, transform, out result); return(result); }
private Quaternion GetLocalRotationInternal(ref AnimationStream stream) { Quaternion result; TransformStreamHandle.GetLocalRotationInternal_Injected(ref this, ref stream, out result); return(result); }
public static TransformStreamHandle BindStreamTransform(this Animator animator, Transform transform) { TransformStreamHandle transformStreamHandle = new TransformStreamHandle(); InternalBindStreamTransform(animator, transform, out transformStreamHandle); return(transformStreamHandle); }
static public int constructor(IntPtr l) { try { #if DEBUG var method = System.Reflection.MethodBase.GetCurrentMethod(); string methodName = GetMethodName(method); #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.BeginSample(methodName); #else Profiler.BeginSample(methodName); #endif #endif UnityEngine.Animations.TransformStreamHandle o; o = new UnityEngine.Animations.TransformStreamHandle(); pushValue(l, true); pushValue(l, o); return(2); } catch (Exception e) { return(error(l, e)); } #if DEBUG finally { #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.EndSample(); #else Profiler.EndSample(); #endif } #endif }
public void Setup(Animator animator, Transform[] bones, Transform target, Transform poleTarget, Transform aimTransform) { this.bones = new NativeArray <UnityEngine.Animations.TransformStreamHandle>(bones.Length, Allocator.Persistent); this.boneWeights = new NativeArray <UnityEngine.Animations.PropertySceneHandle>(bones.Length, Allocator.Persistent); for (int i = 0; i < this.bones.Length; i++) { this.bones[i] = animator.BindStreamTransform(bones[i]); } for (int i = 0; i < this.bones.Length; i++) { var boneParams = bones[i].gameObject.GetComponent <IKJBoneParams>(); if (boneParams == null) { boneParams = bones[i].gameObject.AddComponent <IKJBoneParams>(); } this.boneWeights[i] = animator.BindSceneProperty(bones[i].transform, typeof(IKJBoneParams), "weight"); } // Rotation Limits SetUpRotationLimits(animator, bones); _target = animator.BindSceneTransform(target); _poleTarget = animator.BindSceneTransform(poleTarget); _transform = animator.BindStreamTransform(aimTransform); _IKPositionWeight = animator.BindSceneProperty(animator.transform, typeof(AimIKJ), "weight"); _poleWeight = animator.BindSceneProperty(animator.transform, typeof(AimIKJ), "poleWeight"); _axisX = animator.BindSceneProperty(animator.transform, typeof(AimIKJ), "axisX"); _axisY = animator.BindSceneProperty(animator.transform, typeof(AimIKJ), "axisY"); _axisZ = animator.BindSceneProperty(animator.transform, typeof(AimIKJ), "axisZ"); _poleAxisX = animator.BindSceneProperty(animator.transform, typeof(AimIKJ), "poleAxisX"); _poleAxisY = animator.BindSceneProperty(animator.transform, typeof(AimIKJ), "poleAxisY"); _poleAxisZ = animator.BindSceneProperty(animator.transform, typeof(AimIKJ), "poleAxisZ"); _clampWeight = animator.BindSceneProperty(animator.transform, typeof(AimIKJ), "clampWeight"); _clampSmoothing = animator.BindSceneProperty(animator.transform, typeof(AimIKJ), "clampSmoothing"); _maxIterations = animator.BindSceneProperty(animator.transform, typeof(AimIKJ), "maxIterations"); _tolerance = animator.BindSceneProperty(animator.transform, typeof(AimIKJ), "tolerance"); _XY = animator.BindSceneProperty(animator.transform, typeof(AimIKJ), "XY"); _useRotationLimits = animator.BindSceneProperty(animator.transform, typeof(AimIKJ), "useRotationLimits"); step = 1f / (float)bones.Length; }
extern private static void InternalBindStreamTransform([NotNull] Animator animator, [NotNull] Transform transform, out TransformStreamHandle transformStreamHandle);
private static extern void GetGlobalTRInternal_Injected(ref TransformStreamHandle _unity_self, ref AnimationStream stream, out Vector3 position, out Quaternion rotation);
private static extern void SetGlobalTRInternal_Injected(ref TransformStreamHandle _unity_self, ref AnimationStream stream, ref Vector3 position, ref Quaternion rotation, bool useMask);
private static extern void SetLocalScaleInternal_Injected(ref TransformStreamHandle _unity_self, ref AnimationStream stream, ref Vector3 scale);
private static extern bool GetScaleReadMaskInternal_Injected(ref TransformStreamHandle _unity_self, ref AnimationStream stream);
private void SetLocalPositionInternal(ref AnimationStream stream, Vector3 position) { TransformStreamHandle.SetLocalPositionInternal_Injected(ref this, ref stream, ref position); }
private static extern void SetLocalRotationInternal_Injected(ref TransformStreamHandle _unity_self, ref AnimationStream stream, ref Quaternion rotation);
private static extern void SetPositionInternal_Injected(ref TransformStreamHandle _unity_self, ref AnimationStream stream, ref Vector3 position);
private static extern void GetRotationInternal_Injected(ref TransformStreamHandle _unity_self, ref AnimationStream stream, out Quaternion ret);
private void SetGlobalTRInternal(ref AnimationStream stream, Vector3 position, Quaternion rotation, bool useMask) { TransformStreamHandle.SetGlobalTRInternal_Injected(ref this, ref stream, ref position, ref rotation, useMask); }
private void ResolveInternal(ref AnimationStream stream) { TransformStreamHandle.ResolveInternal_Injected(ref this, ref stream); }
private void GetGlobalTRInternal(ref AnimationStream stream, out Vector3 position, out Quaternion rotation) { TransformStreamHandle.GetGlobalTRInternal_Injected(ref this, ref stream, out position, out rotation); }
private bool GetScaleReadMaskInternal(ref AnimationStream stream) { return(TransformStreamHandle.GetScaleReadMaskInternal_Injected(ref this, ref stream)); }
private void SetLocalScaleInternal(ref AnimationStream stream, Vector3 scale) { TransformStreamHandle.SetLocalScaleInternal_Injected(ref this, ref stream, ref scale); }
private static extern void InternalBindStreamTransform([NotNull("ArgumentNullException")] Animator animator, [NotNull("ArgumentNullException")] Transform transform, out TransformStreamHandle transformStreamHandle);
private static extern void GetLocalPositionInternal_Injected(ref TransformStreamHandle _unity_self, ref AnimationStream stream, out Vector3 ret);
private static extern void ResolveInternal_Injected(ref TransformStreamHandle _unity_self, ref AnimationStream stream);
private void SetLocalRotationInternal(ref AnimationStream stream, Quaternion rotation) { TransformStreamHandle.SetLocalRotationInternal_Injected(ref this, ref stream, ref rotation); }