Class GorgonV3AnimationBinaryCodec
A codec used to read/write animations as binary formatted data.
Inherited Members
Namespace: Gorgon.IO
Assembly: Gorgon.IO.Gorgon2D.dll
Syntax
public class GorgonV3AnimationBinaryCodec : GorgonAnimationCodecCommon, IGorgonAnimationCodec, IGorgonNamedObject
Constructors
| Edit this page View SourceGorgonV3AnimationBinaryCodec(Gorgon2D)
Initializes a new instance of the GorgonV3AnimationBinaryCodec class.
Declaration
public GorgonV3AnimationBinaryCodec(Gorgon2D renderer)
Parameters
Type | Name | Description |
---|---|---|
Gorgon2D | renderer | The renderer used for resource handling. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the |
Fields
| Edit this page View SourceAnimationData
The animation track data chunk ID.
Declaration
public static readonly ulong AnimationData
Field Value
Type | Description |
---|---|
ulong |
BoundsData
The bounds track data chunk ID.
Declaration
public static readonly ulong BoundsData
Field Value
Type | Description |
---|---|
ulong |
ColorData
The color track data chunk ID.
Declaration
public static readonly ulong ColorData
Field Value
Type | Description |
---|---|
ulong |
PositionData
The position track data chunk ID.
Declaration
public static readonly ulong PositionData
Field Value
Type | Description |
---|---|
ulong |
RotationData
The rotation track data chunk ID.
Declaration
public static readonly ulong RotationData
Field Value
Type | Description |
---|---|
ulong |
ScaleData
The scale track data chunk ID.
Declaration
public static readonly ulong ScaleData
Field Value
Type | Description |
---|---|
ulong |
SizeData
The bounds track data chunk ID.
Declaration
public static readonly ulong SizeData
Field Value
Type | Description |
---|---|
ulong |
TextureData
The texture track data chunk ID.
Declaration
public static readonly ulong TextureData
Field Value
Type | Description |
---|---|
ulong |
VersionData
The version data chunk ID.
Declaration
public static readonly ulong VersionData
Field Value
Type | Description |
---|---|
ulong |
Properties
| Edit this page View SourceCanDecode
Property to return whether or not the codec can decode animation data.
Declaration
public override bool CanDecode { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceCanEncode
Property to return whether or not the codec can encode animation data.
Declaration
public override bool CanEncode { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceVersion
Property to return the version of animation data that the codec supports.
Declaration
public override Version Version { get; }
Property Value
Type | Description |
---|---|
Version |
Overrides
Methods
| Edit this page View SourceOnGetAssociatedTextureNames(Stream)
Function to retrieve the names of the associated textures.
Declaration
protected override IReadOnlyList<string> OnGetAssociatedTextureNames(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The stream containing the texture data. |
Returns
Type | Description |
---|---|
IReadOnlyList<string> | The names of the texture associated with the animations, or an empty list if no textures were found. |
Overrides
| Edit this page View SourceOnIsReadable(Stream)
Function to determine if the data in a stream is readable by this codec.
Declaration
protected override bool OnIsReadable(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The stream containing the data. |
Returns
Type | Description |
---|---|
bool | true if the data can be read, or false if not. |
Overrides
| Edit this page View SourceOnReadFromStream(string, Stream, int, IEnumerable<GorgonTexture2DView>)
Function to read the animation data from a stream.
Declaration
protected override IGorgonAnimation OnReadFromStream(string name, Stream stream, int byteCount, IEnumerable<GorgonTexture2DView> textureOverrides = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Not used. |
Stream | stream | The stream containing the animation. |
int | byteCount | The number of bytes to read from the stream. |
IEnumerable<GorgonTexture2DView> | textureOverrides | [Optional] Textures to use in a texture animation track. |
Returns
Type | Description |
---|---|
IGorgonAnimation | A new IGorgonAnimation. |
Overrides
| Edit this page View SourceOnSaveToStream(IGorgonAnimation, Stream)
Function to save the animation data to a stream.
Declaration
protected override void OnSaveToStream(IGorgonAnimation animation, Stream stream)
Parameters
Type | Name | Description |
---|---|---|
IGorgonAnimation | animation | The animation to serialize into the stream. |
Stream | stream | The stream that will contain the animation. |
Overrides
Exceptions
Type | Condition |
---|---|
NotSupportedException | This operation is not supported. |