Download Now

    Reference TCamera

    Declared in Codebot.Render.World.pas on line 21

    TCamera allows you to position a perspective and move within 3D space. A camera is provided by TWorld.
      TCamera = class(TContextManagedObject, IPropertyResolver)
      public
        { Camera is create a TWorld }
        constructor Create;
        destructor Destroy; override;
        { Apply the camera orientation to the current view matrix }
        procedure ApplyDirection;
        { Apply the camera vantage point to the current view matrix }
        procedure ApplyPosition;
        { Move forward a distance along the direction }
        procedure MoveForward(Distance: Float);
        { Move backward a distance along the direction }
        procedure MoveBackward(Distance: Float);
        { Move left a distance perpedicular to the direction }
        procedure MoveLeft(Distance: Float);
        { Move right a distance perpedicular to the direction }
        procedure MoveRight(Distance: Float);
        { The heading, pitch, and roll orientation of the camera }
        property Direction: TVec3Prop read FDirection write SetDirection;
        { The vantage point of the camera }
        property Position: TVec3Prop read FPosition write SetPosition;
      end;

    See also

    Float in Codebot.System.pas
    IPropertyResolver in Codebot.Animation.pas
    TContextManagedObject in Codebot.Render.Contexts.pas
    TVec3Prop in Codebot.Animation.pas