//------------------------------------------------------------------------------
//
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
namespace Brutal.GltfApi {
using System.Linq;
using System.Runtime.Serialization;
using System.Text.Json.Serialization;
///
/// Object part of the GLTF file schema
/// A camera's projection. A node **MAY** reference a camera to apply a transform to place the camera in the scene.
///
public partial class Camera {
///
/// Backing field for Orthographic.
///
private CameraOrthographic m_orthographic;
///
/// Backing field for Perspective.
///
private CameraPerspective m_perspective;
///
/// Backing field for Type.
///
private TypeEnum m_type;
///
/// Backing field for Name.
///
private string m_name;
///
/// Backing field for Extensions.
///
private System.Collections.Generic.Dictionary m_extensions;
///
/// Backing field for Extras.
///
private Extras m_extras;
///
/// An orthographic camera containing properties to create an orthographic projection matrix. This property **MUST NOT** be defined when `perspective` is defined.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("orthographic")]
public CameraOrthographic Orthographic {
get {
return this.m_orthographic;
}
set {
this.m_orthographic = value;
}
}
///
/// A perspective camera containing properties to create a perspective projection matrix. This property **MUST NOT** be defined when `orthographic` is defined.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("perspective")]
public CameraPerspective Perspective {
get {
return this.m_perspective;
}
set {
this.m_perspective = value;
}
}
///
/// Specifies if the camera uses a perspective or orthographic projection.
///
[System.Text.Json.Serialization.JsonConverterAttribute(typeof(System.Text.Json.Serialization.JsonStringEnumConverter))]
[System.Text.Json.Serialization.JsonRequiredAttribute()]
[System.Text.Json.Serialization.JsonPropertyNameAttribute("type")]
public TypeEnum Type {
get {
return this.m_type;
}
set {
this.m_type = value;
}
}
///
/// The user-defined name of this object.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("name")]
public string Name {
get {
return this.m_name;
}
set {
this.m_name = value;
}
}
///
/// JSON object with extension-specific objects.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")]
public System.Collections.Generic.Dictionary Extensions {
get {
return this.m_extensions;
}
set {
this.m_extensions = value;
}
}
///
/// Application-specific data.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")]
public Extras Extras {
get {
return this.m_extras;
}
set {
this.m_extras = value;
}
}
///
/// This method is used to determine if the Orthographic property should be serialized.
///
public bool ShouldSerializeOrthographic() {
return ((m_orthographic == null)
== false);
}
///
/// This method is used to determine if the Perspective property should be serialized.
///
public bool ShouldSerializePerspective() {
return ((m_perspective == null)
== false);
}
///
/// This method is used to determine if the Name property should be serialized.
///
public bool ShouldSerializeName() {
return ((m_name == null)
== false);
}
///
/// This method is used to determine if the Extensions property should be serialized.
///
public bool ShouldSerializeExtensions() {
return ((m_extensions == null)
== false);
}
///
/// This method is used to determine if the Extras property should be serialized.
///
public bool ShouldSerializeExtras() {
return ((m_extras == null)
== false);
}
///
/// Enum part of the GLTF file schema
/// Specifies if the camera uses a perspective or orthographic projection.
///
public enum TypeEnum {
Perspective,
Orthographic,
}
}
}