Barotrauma Client Doc
Barotrauma.Camera Class Reference

Public Member Functions

 Camera ()
 
Vector2 GetPosition ()
 
void Translate (Vector2 amount)
 
void ClientWrite (in SegmentTableWriter< ClientNetSegment > segmentTableWriter, IWriteMessage msg)
 
void SetResolution (Point res)
 
void UpdateTransform (bool interpolate=true, bool updateListener=true)
 
void MoveCamera (float deltaTime, bool allowMove=true, bool allowZoom=true, bool allowInput=true, bool? followSub=null)
 
void StopMovement ()
 
Vector2 ScreenToWorld (Vector2 coords)
 
Vector2 WorldToScreen (Vector2 coords)
 
float GetZoomAmountFromPrevious ()
 

Public Attributes

float FreeCamMoveSpeed = 1.0f
 
float Shake
 

Static Public Attributes

static bool FollowSub = true
 

Properties

float??? DefaultZoom [get, set]
 
float ZoomSmoothness [get, set]
 
float MoveSmoothness [get, set]
 
float MinZoom [get, set]
 
float MaxZoom [get, set]
 
Vector2 ShakePosition [get]
 
float? Zoom [get, set]
 
float Rotation [get, set]
 
float AngularVelocity [get, set]
 
float OffsetAmount [get, set]
 
Point Resolution [get]
 
Rectangle WorldView [get]
 
Vector2 WorldViewCenter [get]
 
Matrix Transform [get]
 
Matrix ShaderTransform [get]
 
Vector2 TargetPos [get, set]
 
bool Freeze [get, set]
 Resets to false each time the MoveCamera method is called. More...
 
Vector2 Position [get, set]
 

Detailed Description

Definition at line 9 of file Camera.cs.

Constructor & Destructor Documentation

◆ Camera()

Barotrauma.Camera.Camera ( )

Definition at line 143 of file Camera.cs.

Member Function Documentation

◆ ClientWrite()

void Barotrauma.Camera.ClientWrite ( in SegmentTableWriter< ClientNetSegment segmentTableWriter,
IWriteMessage  msg 
)

Definition at line 167 of file Camera.cs.

◆ GetPosition()

Vector2 Barotrauma.Camera.GetPosition ( )

Definition at line 156 of file Camera.cs.

◆ GetZoomAmountFromPrevious()

float Barotrauma.Camera.GetZoomAmountFromPrevious ( )

Definition at line 424 of file Camera.cs.

◆ MoveCamera()

void Barotrauma.Camera.MoveCamera ( float  deltaTime,
bool  allowMove = true,
bool  allowZoom = true,
bool  allowInput = true,
bool?  followSub = null 
)

Definition at line 253 of file Camera.cs.

◆ ScreenToWorld()

Vector2 Barotrauma.Camera.ScreenToWorld ( Vector2  coords)

Definition at line 406 of file Camera.cs.

◆ SetResolution()

void Barotrauma.Camera.SetResolution ( Point  res)

Definition at line 181 of file Camera.cs.

◆ StopMovement()

void Barotrauma.Camera.StopMovement ( )

Definition at line 385 of file Camera.cs.

◆ Translate()

void Barotrauma.Camera.Translate ( Vector2  amount)

Definition at line 162 of file Camera.cs.

◆ UpdateTransform()

void Barotrauma.Camera.UpdateTransform ( bool  interpolate = true,
bool  updateListener = true 
)

Definition at line 197 of file Camera.cs.

◆ WorldToScreen()

Vector2 Barotrauma.Camera.WorldToScreen ( Vector2  coords)

Definition at line 412 of file Camera.cs.

Member Data Documentation

◆ FollowSub

bool Barotrauma.Camera.FollowSub = true
static

Definition at line 11 of file Camera.cs.

◆ FreeCamMoveSpeed

float Barotrauma.Camera.FreeCamMoveSpeed = 1.0f

Definition at line 50 of file Camera.cs.

◆ Shake

float Barotrauma.Camera.Shake

Definition at line 65 of file Camera.cs.

Property Documentation

◆ AngularVelocity

float Barotrauma.Camera.AngularVelocity
getset

Definition at line 106 of file Camera.cs.

◆ DefaultZoom

float??? Barotrauma.Camera.DefaultZoom
getset

Definition at line 14 of file Camera.cs.

◆ Freeze

bool Barotrauma.Camera.Freeze
getset

Resets to false each time the MoveCamera method is called.

Definition at line 251 of file Camera.cs.

◆ MaxZoom

float Barotrauma.Camera.MaxZoom
getset

Definition at line 44 of file Camera.cs.

◆ MinZoom

float Barotrauma.Camera.MinZoom
getset

Definition at line 37 of file Camera.cs.

◆ MoveSmoothness

float Barotrauma.Camera.MoveSmoothness
getset

Definition at line 30 of file Camera.cs.

◆ OffsetAmount

float Barotrauma.Camera.OffsetAmount
getset

Definition at line 116 of file Camera.cs.

◆ Position

Vector2 Barotrauma.Camera.Position
getset

Definition at line 393 of file Camera.cs.

◆ Resolution

Point Barotrauma.Camera.Resolution
get

Definition at line 118 of file Camera.cs.

◆ Rotation

float Barotrauma.Camera.Rotation
getset

Definition at line 96 of file Camera.cs.

◆ ShaderTransform

Matrix Barotrauma.Camera.ShaderTransform
get

Definition at line 138 of file Camera.cs.

◆ ShakePosition

Vector2 Barotrauma.Camera.ShakePosition
get

Definition at line 66 of file Camera.cs.

◆ TargetPos

Vector2 Barotrauma.Camera.TargetPos
getset

Definition at line 154 of file Camera.cs.

◆ Transform

Matrix Barotrauma.Camera.Transform
get

Definition at line 133 of file Camera.cs.

◆ WorldView

Rectangle Barotrauma.Camera.WorldView
get

Definition at line 121 of file Camera.cs.

◆ WorldViewCenter

Vector2 Barotrauma.Camera.WorldViewCenter
get

Definition at line 123 of file Camera.cs.

◆ Zoom

float? Barotrauma.Camera.Zoom
getset

Definition at line 75 of file Camera.cs.

◆ ZoomSmoothness

float Barotrauma.Camera.ZoomSmoothness
getset

Definition at line 24 of file Camera.cs.