GLTFCamera

    Represents a GLTF camera.

    GLTFCamera.swift:11
    class GLTFCamera

    Represents a camera as defined by the base GLTF spec.

    Superclasses

    Citizens in SwiftGodot

    Conformances

    • protocol CustomStringConvertible

      A type with a customized textual representation.

    • protocol Equatable

      A type that can be compared for value equality.

    • protocol Hashable

      A type that can be hashed into a Hasher to produce an integer hash value.

    • protocol Identifiable<ID>

      A class of types whose instances hold the value of an entity with stable identity.

    • protocol VariantRepresentable

      Types that conform to VariantRepresentable can be stored directly in Variant with no conversion. These include all of the Variant types from Godot (for example GString, Rect, Plane), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.

    • protocol VariantStorable

      Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.

    Type members

    Instance members

    • var depthFar: Double

      The distance to the far culling boundary for this camera relative to its local Z axis, in meters. This maps to GLTF’s zfar property.

    • var depthNear: Double

      The distance to the near culling boundary for this camera relative to its local Z axis, in meters. This maps to GLTF’s znear property.

    • var fov: Double

      The FOV of the camera. This class and GLTF define the camera FOV in radians, while Godot uses degrees. This maps to GLTF’s yfov property. This value is only used for perspective cameras, when perspective is true.

    • var perspective: Bool

      Whether or not the camera is in perspective mode. If false, the camera is in orthographic/orthogonal mode. This maps to GLTF’s camera type property. See projection and the GLTF spec for more information.

    • var sizeMag: Double

      The size of the camera. This class and GLTF define the camera size magnitude as a radius in meters, while Godot defines it as a diameter in meters. This maps to GLTF’s ymag property. This value is only used for orthographic/orthogonal cameras, when perspective is false.

    • func toDictionary() -> GDictionary

      Serializes this GLTFCamera instance into a GDictionary.

    • func toNode() -> Camera3D?

      Converts this GLTFCamera instance into a Godot Camera3D node.