protected override JobHandle Create3DNoiseJob(MeshData data, JobHandle dependency = default) { return(new _3DNoiseJob { magnitude = GetActualMagnitude(), frequency = GetActualFrequency(), offset = GetActualOffset(), meshToAxis = DeformerUtils.GetMeshToAxisSpace(Axis, data.Target.GetTransform()), vertices = data.DynamicNative.VertexBuffer }.Schedule(data.Length, DEFAULT_BATCH_COUNT, dependency)); }
public override JobHandle Process(MeshData data, JobHandle dependency = default) { var meshToAxis = DeformerUtils.GetMeshToAxisSpace(Axis, data.Target.GetTransform()); return(new ScaleJob { scale = Axis.localScale, meshToAxis = meshToAxis, axisToMesh = meshToAxis.inverse, vertices = data.DynamicNative.VertexBuffer }.Schedule(data.Length, DEFAULT_BATCH_COUNT, dependency)); }
public override JobHandle Process(MeshData data, JobHandle dependency = default) { var meshToAxis = DeformerUtils.GetMeshToAxisSpace(transform, data.Target.GetTransform()); return(new LatticeJob { controlPoints = new NativeArray <float3>(controlPoints, Allocator.TempJob), resolution = new int3(resolution.x, resolution.y, resolution.z), meshToTarget = meshToAxis, targetToMesh = meshToAxis.inverse, vertices = data.DynamicNative.VertexBuffer }.Schedule(data.Length, DEFAULT_BATCH_COUNT, dependency)); }
protected override JobHandle CreateSphericalNoiseJob(MeshData data, JobHandle dependency = default) { var meshToAxis = DeformerUtils.GetMeshToAxisSpace(Axis, data.Target.GetTransform()); return(new SphericalNoiseJob { magnitude = MagnitudeScalar, frequency = GetActualFrequency(), offset = GetActualOffset(), meshToAxis = meshToAxis, axisToMesh = meshToAxis.inverse, vertices = data.DynamicNative.VertexBuffer, }.Schedule(data.Length, DEFAULT_BATCH_COUNT, dependency)); }