• Articles
  • Api Documentation
Show / Hide Table of Contents
  • Inferno
    • CollisionMode
    • DrawMode
    • Game
    • Game.OnResizeEventArgs
    • GameState
    • GameState.StateOnDrawEventArgs
    • GameWindow
    • Instance
    • MathHelper
    • Matrix
    • Point
    • Rectangle
    • Settings
    • SpatialMode
    • UpdateMode
    • Vector2
    • Vector3
    • Vector4
  • Inferno.Audio
    • AudioDevice
    • Sound
  • Inferno.Content
    • ContentLoader
  • Inferno.Formats.Audio
    • WaveFormat
  • Inferno.Formats.Graphics.Text
    • FontFormat
  • Inferno.Graphics
    • Camera
    • Color
    • GraphicsDevice
    • PlatformType
    • Renderable
    • RenderableType
    • Renderer
    • RenderSortMode
    • RenderTarget
    • Shader
    • ShaderLanguage
    • ShaderType
    • Sprite
    • Texture2D
    • Tileset
  • Inferno.Graphics.Text
    • Font
    • FontBuilder
  • Inferno.Input
    • ButtonState
    • Key
    • Keyboard
    • Keyboard.KeyEventArgs
    • KeyboardState
    • KeyState
    • Mouse
    • MouseState
  • Inferno.Tiled
    • RenderOrder
    • TiledLayer
    • TiledLayerChunk
    • TiledLoader
    • TiledMap
    • TiledMapOrientation
    • TiledObject
    • TiledObjectLayer
    • TiledVersion
  • Inferno.UI
    • MessageBox
    • MessageBoxType
    • UserInterface
  • Inferno.UI.Controls
    • Button
    • Control
    • Control.ControlClickedEvent
    • Control.ControlHoveredEvent
    • Control.TextChangedEventArgs
    • ControlState
    • Cursor
    • Label

Class Camera

A view camera

Inheritance
System.Object
Camera
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Inferno.Graphics
Assembly: Inferno.Desktop.dll
Syntax
public class Camera

Properties

| Improve this Doc View Source

Position

The current center position

Declaration
public Vector2 Position { get; set; }
Property Value
Type Description
Vector2
| Improve this Doc View Source

Rotation

Rotation in degrees

Declaration
public float Rotation { get; set; }
Property Value
Type Description
System.Single
| Improve this Doc View Source

TranslationMatrix

The translation matrix used with the draw calls associated with the state

Declaration
public Matrix TranslationMatrix { get; }
Property Value
Type Description
Matrix
| Improve this Doc View Source

ViewportCenter

The center of the viewport

Declaration
public Vector2 ViewportCenter { get; }
Property Value
Type Description
Vector2
| Improve this Doc View Source

ViewportHeight

The height of the visible viewport

Declaration
public int ViewportHeight { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

ViewportWidth

The width of the visible viewport

Declaration
public int ViewportWidth { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

ViewportWorldBoundry

The viewport world boundary

Declaration
public Rectangle ViewportWorldBoundry { get; }
Property Value
Type Description
Rectangle
| Improve this Doc View Source

Zoom

The scale factor of the view

Declaration
public float Zoom { get; set; }
Property Value
Type Description
System.Single

Methods

| Improve this Doc View Source

CenterOn(Vector2)

Center the camera on a position.

Declaration
public void CenterOn(Vector2 position)
Parameters
Type Name Description
Vector2 position
| Improve this Doc View Source

Drawable(Rectangle)

Check if a rectangle will be visible on the screen

Declaration
public bool Drawable(Rectangle rect)
Parameters
Type Name Description
Rectangle rect
Returns
Type Description
System.Boolean
| Improve this Doc View Source

ScreenToWorld(Vector2)

Convert a screen coordinate to a world coordinate

Declaration
public Vector2 ScreenToWorld(Vector2 screenPosition)
Parameters
Type Name Description
Vector2 screenPosition
Returns
Type Description
Vector2
| Improve this Doc View Source

WorldToScreen(Vector2)

Convert a world coordinate to a screen coordinate

Declaration
public Vector2 WorldToScreen(Vector2 worldPosition)
Parameters
Type Name Description
Vector2 worldPosition
Returns
Type Description
Vector2
  • Improve this Doc
  • View Source
Back to top Generated by DocFX