spine-runtimes/spine-ios/Sources/Spine/Generated/PathConstraintMixTimeline.swift

115 lines
4.7 KiB
Swift

// Spine Runtimes License Agreement
// Last updated April 5, 2025. Replaces all prior versions.
//
// Copyright (c) 2013-2025, Esoteric Software LLC
//
// Integration of the Spine Runtimes into software or otherwise creating
// derivative works of the Spine Runtimes is permitted under the terms and
// conditions of Section 2 of the Spine Editor License Agreement:
// http://esotericsoftware.com/spine-editor-license
//
// Otherwise, it is permitted to integrate the Spine Runtimes into software
// or otherwise create derivative works of the Spine Runtimes (collectively,
// "Products"), provided that each user of the Products must obtain their own
// Spine Editor license and redistribution of the Products in any form must
// include this license and copyright notice.
//
// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
import Foundation
@objc(SpinePathConstraintMixTimeline)
@objcMembers
public final class PathConstraintMixTimeline: CurveTimeline, ConstraintTimeline {
internal let wrappee: spine_path_constraint_mix_timeline
internal init(_ wrappee: spine_path_constraint_mix_timeline) {
self.wrappee = wrappee
super.init(wrappee)
}
public convenience init(frameCount: size_t, bezierCount: size_t, constraintIndex: Int32) {
let ptr = spine_path_constraint_mix_timeline_create(frameCount, bezierCount, constraintIndex)
self.init(ptr)
}
public func getRtti() -> Rtti {
let result = spine_path_constraint_mix_timeline_get_rtti(wrappee)
return Rtti(result)
}
public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) {
spine_path_constraint_mix_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0)
}
public func setFrame(frame: Int32, time: Float, mixRotate: Float, mixX: Float, mixY: Float) {
spine_path_constraint_mix_timeline_set_frame(wrappee, frame, time, mixRotate, mixX, mixY)
}
public func getConstraintIndex() -> Int32 {
return spine_path_constraint_mix_timeline_get_constraint_index(wrappee)
}
public func setConstraintIndex(inValue: Int32) {
spine_path_constraint_mix_timeline_set_constraint_index(wrappee, inValue)
}
public func setLinear(frame: size_t) {
spine_path_constraint_mix_timeline_set_linear(wrappee, frame)
}
public func setStepped(frame: size_t) {
spine_path_constraint_mix_timeline_set_stepped(wrappee, frame)
}
public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) {
spine_path_constraint_mix_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2)
}
public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float {
return spine_path_constraint_mix_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i)
}
public func getCurves() -> ArrayFloat {
return spine_path_constraint_mix_timeline_get_curves(wrappee)
}
public func getFrameEntries() -> size_t {
return spine_path_constraint_mix_timeline_get_frame_entries(wrappee)
}
public func getFrameCount() -> size_t {
return spine_path_constraint_mix_timeline_get_frame_count(wrappee)
}
public func getFrames() -> ArrayFloat {
return spine_path_constraint_mix_timeline_get_frames(wrappee)
}
public func getDuration() -> Float {
return spine_path_constraint_mix_timeline_get_duration(wrappee)
}
public func getPropertyIds() -> ArrayPropertyId {
return spine_path_constraint_mix_timeline_get_property_ids(wrappee)
}
public func rtti() -> Rtti {
let result = spine_path_constraint_mix_timeline_rtti(wrappee)
return Rtti(result)
}
deinit {
spine_path_constraint_mix_timeline_dispose(wrappee)
}
}