Class GorgonKeyTexture2D
An animation key frame for a GorgonTexture2DView, texture coordinates and a texture array index.
Inherited Members
Namespace: Gorgon.Animation
Assembly: Gorgon.Animation.dll
Syntax
public class GorgonKeyTexture2D : IGorgonKeyFrame, IGorgonCloneable<IGorgonKeyFrame>
Remarks
A key frame represents a value for an object property at a given time.
The track that the key frame is on is used to interpolate the value between key frames. This method makes it so that only a few key frames are required for an animation rather then setting a value for every time index.
The track for this key frame does not use interpolation. This means that there is no smooth transition between values and each value is "snapped" to when animating.
Constructors
| Edit this page View SourceGorgonKeyTexture2D(GorgonKeyTexture2D)
Initializes a new instance of the GorgonKeyTexture2D class.
Declaration
public GorgonKeyTexture2D(GorgonKeyTexture2D key)
Parameters
Type | Name | Description |
---|---|---|
GorgonKeyTexture2D | key | The key to copy. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the |
See Also
| Edit this page View SourceGorgonKeyTexture2D(float, GorgonTexture2DView, RectangleF, int)
Initializes a new instance of the GorgonKeyTexture2D class.
Declaration
public GorgonKeyTexture2D(float time, GorgonTexture2DView value, RectangleF textureCoordinates, int textureArrayIndex)
Parameters
Type | Name | Description |
---|---|---|
float | time | The time for the key frame. |
GorgonTexture2DView | value | The value to apply to the key frame. |
RectangleF | textureCoordinates | Region on the texture to update. |
int | textureArrayIndex | The texture array index to use with a texture array. |
See Also
| Edit this page View SourceGorgonKeyTexture2D(float, string, RectangleF, int)
Initializes a new instance of the GorgonKeyTexture2D class.
Declaration
public GorgonKeyTexture2D(float time, string textureName, RectangleF textureCoordinates, int textureArrayIndex)
Parameters
Type | Name | Description |
---|---|---|
float | time | The time for the key frame. |
string | textureName | The name of the texture that should be applied to the key frame. |
RectangleF | textureCoordinates | Region on the texture to update. |
int | textureArrayIndex | The texture array index to use with a texture array. |
Remarks
This overload is used to build a key frame that references a texture, but without having that texture loaded into memory. This is useful for serialization scenarios.
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the |
ArgumentEmptyException | Thrown when the |
See Also
Properties
| Edit this page View SourceDataType
Property to return the type of data for this key frame.
Declaration
public Type DataType { get; }
Property Value
Type | Description |
---|---|
Type |
See Also
| Edit this page View SourceTextureArrayIndex
Property to set or return the texture array index to use on a texture array.
Declaration
public ref int TextureArrayIndex { get; }
Property Value
Type | Description |
---|---|
int |
See Also
| Edit this page View SourceTextureCoordinates
Property to set or return the texture coordinates.
Declaration
public ref RectangleF TextureCoordinates { get; }
Property Value
Type | Description |
---|---|
RectangleF |
See Also
| Edit this page View SourceTextureName
Property to return the name of the texture.
Declaration
[JsonIgnore]
public string TextureName { get; }
Property Value
Type | Description |
---|---|
string |
See Also
| Edit this page View SourceTime
Property to return the time at which the key frame is stored.
Declaration
public float Time { get; }
Property Value
Type | Description |
---|---|
float |
See Also
| Edit this page View SourceValue
Property to set or return the texture view to use.
Declaration
public GorgonTexture2DView Value { get; set; }
Property Value
Type | Description |
---|---|
GorgonTexture2DView |
See Also
Methods
| Edit this page View SourceClone()
Function to clone the key.
Declaration
public IGorgonKeyFrame Clone()
Returns
Type | Description |
---|---|
IGorgonKeyFrame | The cloned key. |