【Spine】Spine Runtime for Delphi移植笔记(四…
2018-06-17 18:56:47来源:未知 阅读 ()
//////////////////////////////////////////////////////////////////////////////// //Generic delphi runtime v3.6 for Spine animation tool // //Runtime port by cjk (hzi1980@163.com) // //////////////////////////////////////////////////////////////////////////////// unit spine.classes; interface uses System.Classes, System.SysUtils, System.Generics.Collections, spine.types; type THashSet<T> = class private public procedure Clear; function Add(const Item: T): Boolean; end; TExposedList<T> = class(TList<T>) private FVersion: Integer; procedure ClearEx(const AIndex, ALen: Integer); overload; procedure Shift(const AStart, ADelta: Integer); public procedure EnsureCapacity(const AMin: Integer); procedure ClearEx(const AClearArray: Boolean = True); overload; function Resize(const ANewSize: Integer): TExposedList<T>; procedure RemoveAt(const AIndex: Integer); procedure CopyFrom(const ASource: TExposedList<T>); overload; procedure CopyFrom(const ASource: TExposedList<T>; const ASourceStart, ATargetStart, ACount: Integer); overload; end; TSpineTexture = class(TObject) end; TAtlasPage = class(TObject) public Name: AnsiString; Format: TPageFormat; MinFilter: TPageTextureFilter; MagFilter: TPageTextureFilter; WrapU: TPageTextureWrap; WrapV: TPageTextureWrap; Texture: TSpineTexture; Width: Integer; Height: Integer; end; TAtlasRegion = class(TObject) Page: TAtlasPage; Name: AnsiString; X: Integer; Y: Integer; Width: Integer; Height: Integer; U: Single; V: Single; U2: Single; V2: Single; OffsetX: Single; OffsetY: Single; OriginalWidth: Integer; OriginalHeight: Integer; Index: Integer; Rotate: Boolean; Splits: array of Integer; Pads: array of Integer; end; ITextureLoader = class abstract function LoadTexture(const Page: TAtlasPage; const TextureName: string): TSpineTexture; virtual; abstract; end; IUpdateable = class abstract procedure Update; virtual; abstract; end; IAtlas = class abstract end; ISkeleton = class abstract end; IBone = class(IUpdateable) end; ISlot = class abstract end; IEvent = class abstract end; IAnimation = class abstract end; IAnimationState = class abstract end; ISkin = class abstract end; IAttachment = class abstract protected function GetID: Integer; virtual; abstract; function GetName: string; virtual; abstract; public property ID: Integer read GetID; property Name: string read GetName; end; IConstraint = class(IUpdateable) protected function GetOrder: Integer; virtual; abstract; public property Order: Integer read GetOrder; end; ITimeline = class abstract protected function GetPropertyId: Integer; virtual; abstract; public procedure Apply(const ASkeleton: ISkeleton; const ALastTime, ATime: Single; const AEvents: TList<IEvent>; const AAlpha: Single; const APose: TMixPose; const ADirection: TMixDirection); virtual; abstract; property PropertyId: Integer read GetPropertyId; end; implementation end.
类定义,I 开头的抽象类大多数只是为了定义一下,因为需要单元间交叉引用,但是又不想都是定义为TObject,写接口又没必要,只能这么写了。
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
- Delphi Format、FormatFloat与FormatDateTime的用法 2020-05-22
- Delphi-基础(for循环) 2019-12-02
- BussinessSkinForm 入门教程 2019-08-16
- Delphi BusinessSkinForm使用说明 2019-08-16
- webform 简单的服务器控件。 2018-06-27
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash