Class ModelMerge¶
Namespace: Apogee.Content
Assembly: Apogee.Content.dll
Combines models into one scene: the way a sample or a level puts several glTF files and generated shapes together.
public static class ModelMerge
Inheritance¶
Inherited Members¶
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Methods¶
Combine(string, IReadOnlyList<(ModelData Model, Matrix4x4 Transform)>)¶
Puts every model in one, each placed by its transform. Meshes, materials and textures keep their order, one model after the other.
public static ModelData Combine(string name, IReadOnlyList<(ModelData Model, Matrix4x4 Transform)> parts)
Parameters¶
name string
parts IReadOnlyList<(ModelData Model, Matrix4x4 Transform)>
Returns¶
PlaceOnGround(ModelData, float, float, float, float)¶
The transform that scales model uniformly to height meters tall and stands it on the ground at
(x, 0, z), centered over that point: for dropping a model into a scene without knowing its units.
public static Matrix4x4 PlaceOnGround(ModelData model, float x, float z, float height, float yawRadians = 0)
Parameters¶
model ModelData
x float
z float
height float
yawRadians float