Simple3D
Search Results for

    Show / Hide Table of Contents

    Class Camera

    Mutable orbit camera; angles are radians. Mutate and render on the same thread.

    Inheritance
    object
    Camera
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Simple3D.Core
    Assembly: Simple3D.Core.dll
    Syntax
    public sealed class Camera

    Constructors

    | Edit this page View Source

    Camera(float, float, float)

    Creates an orbit camera with positive finite distance.

    Declaration
    public Camera(float distance = 5, float yaw = 0.55, float pitch = 0.35)
    Parameters
    Type Name Description
    float distance
    float yaw
    float pitch

    Properties

    | Edit this page View Source

    Distance

    Distance from target in world units.

    Declaration
    public float Distance { get; }
    Property Value
    Type Description
    float
    | Edit this page View Source

    FieldOfView

    Vertical field of view in radians, strictly between .01 and 3.13.

    Declaration
    public float FieldOfView { get; set; }
    Property Value
    Type Description
    float
    | Edit this page View Source

    NearPlane

    Positive finite distance of the clipping plane from the eye.

    Declaration
    public float NearPlane { get; set; }
    Property Value
    Type Description
    float
    | Edit this page View Source

    OrthographicHeight

    Positive finite visible world height in orthographic mode.

    Declaration
    public float OrthographicHeight { get; set; }
    Property Value
    Type Description
    float
    | Edit this page View Source

    Pitch

    Vertical orbit angle, limited to avoid the poles.

    Declaration
    public float Pitch { get; }
    Property Value
    Type Description
    float
    | Edit this page View Source

    Projection

    Perspective or orthographic projection.

    Declaration
    public CameraProjection Projection { get; set; }
    Property Value
    Type Description
    CameraProjection
    | Edit this page View Source

    Target

    Finite orbit center.

    Declaration
    public Vector3 Target { get; set; }
    Property Value
    Type Description
    Vector3
    | Edit this page View Source

    Yaw

    Horizontal orbit angle in radians.

    Declaration
    public float Yaw { get; }
    Property Value
    Type Description
    float

    Methods

    | Edit this page View Source

    FitToScene(Scene, float, float)

    Fits geometry bounds using a conservative enclosing sphere. Empty scenes do nothing; aspect is width/height. Overflowing fits throw without changing the camera.

    Declaration
    public void FitToScene(Scene scene, float aspectRatio = 1, float padding = 1.15)
    Parameters
    Type Name Description
    Scene scene
    float aspectRatio
    float padding
    | Edit this page View Source

    Orbit(float, float)

    Adjusts orbit angles; nonfinite deltas are ignored for gesture compatibility.

    Declaration
    public void Orbit(float yawDelta, float pitchDelta)
    Parameters
    Type Name Description
    float yawDelta
    float pitchDelta
    | Edit this page View Source

    Zoom(float)

    Divides distance and orthographic height by a positive factor, clamped to .001..1e12; invalid factors are ignored.

    Declaration
    public void Zoom(float factor)
    Parameters
    Type Name Description
    float factor

    Events

    | Edit this page View Source

    Changed

    Raised synchronously once after an effective property change or completed camera operation.

    Declaration
    public event EventHandler? Changed
    Event Type
    Type Description
    EventHandler
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX