mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-15 23:20:10 -05:00
Co-authored-by: Akihiko Odaki <nekomanma@pixiv.co.jp> Co-authored-by: Emiliana <vtemiliana@gmail.com> Co-authored-by: junichi_hirose <junichi_hirose@dwango.co.jp> Co-authored-by: Masataka SUMI <santarh@gmail.com> Co-authored-by: ousttrue <oustrrue@gmail.com> Co-authored-by: ousttrue <ousttrue@gmail.com> Co-authored-by: TORISOUP <tori.birdstrike@gmail.com> Co-authored-by: Yuki Shimada <emadurandal@gmail.com> Co-authored-by: yutopp <yutopp@gmail.com>
61 lines
1.7 KiB
C#
61 lines
1.7 KiB
C#
using System;
|
|
using UniJSON;
|
|
|
|
namespace UniGLTF
|
|
{
|
|
public enum ProjectionType
|
|
{
|
|
Perspective,
|
|
Orthographic
|
|
}
|
|
|
|
[Serializable]
|
|
public class glTFOrthographic
|
|
{
|
|
[JsonSchema(Required = true)]
|
|
public float xmag;
|
|
[JsonSchema(Required = true)]
|
|
public float ymag;
|
|
[JsonSchema(Required = true, Minimum = 0.0f, ExclusiveMinimum = true)]
|
|
public float zfar;
|
|
[JsonSchema(Required = true, Minimum = 0.0f)]
|
|
public float znear;
|
|
|
|
[JsonSchema(MinProperties = 1)]
|
|
public glTFOrthographic_extensions extensions;
|
|
[JsonSchema(MinProperties = 1)]
|
|
public glTFOrthographic_extras extras;
|
|
}
|
|
|
|
[Serializable]
|
|
public class glTFPerspective
|
|
{
|
|
[JsonSchema(Minimum = 0.0f, ExclusiveMinimum = true)]
|
|
public float aspectRatio;
|
|
[JsonSchema(Required = true, Minimum = 0.0f, ExclusiveMinimum = true)]
|
|
public float yfov;
|
|
[JsonSchema(Minimum = 0.0f, ExclusiveMinimum = true)]
|
|
public float zfar;
|
|
[JsonSchema(Required = true, Minimum = 0.0f, ExclusiveMinimum = true)]
|
|
public float znear;
|
|
|
|
public glTFPerspective_extensions extensions;
|
|
public glTFPerspective_extras extras;
|
|
}
|
|
|
|
[Serializable]
|
|
public class glTFCamera
|
|
{
|
|
public glTFOrthographic orthographic;
|
|
public glTFPerspective perspective;
|
|
|
|
[JsonSchema(Required = true, EnumSerializationType = EnumSerializationType.AsLowerString)]
|
|
public ProjectionType type;
|
|
|
|
public string name;
|
|
|
|
public glTFCamera_extensions extensions;
|
|
public glTFCamera_extras extras;
|
|
}
|
|
}
|