Class ModelFile¶
Namespace: Apogee.Content.Import
Assembly: Apogee.Content.dll
The engine's own model file (.amodel): a
public static class ModelFile
Inheritance¶
Inherited Members¶
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Fields¶
Magic¶
public const uint Magic = 1279544641
Field Value¶
Version¶
public const uint Version = 1
Field Value¶
Methods¶
IsModelFile(ReadOnlySpan<byte>)¶
public static bool IsModelFile(ReadOnlySpan<byte> file)
Parameters¶
file ReadOnlySpan<byte>
Returns¶
Read(ReadOnlySpan<byte>, string, TextureCaps)¶
public static ModelData Read(ReadOnlySpan<byte> file, string name = "model", TextureCaps caps = default)
Parameters¶
file ReadOnlySpan<byte>
name string
caps TextureCaps
Returns¶
Exceptions¶
The file is not a model file of this version, or it is damaged.
Write(ModelData, TextureCompression)¶
public static byte[] Write(ModelData model, TextureCompression compression = TextureCompression.None)
Parameters¶
model ModelData
The model; its textures are RGBA8.
compression TextureCompression
How the embedded textures are stored. With
Returns¶
byte[]