Table of Contents

Class StrategyCamera

Namespace
OmegaEngine.Graphics.Cameras
Assembly
OmegaEngine.dll

An RTS-style camera with a rotatable horizontal view and an automatic vertical angle.

public class StrategyCamera : MatrixCamera, IInputReceiver, IPositionable
Inheritance
StrategyCamera
Implements
Inherited Members
Extension Methods

Constructors

StrategyCamera(double, double, float, float, Func<DoubleVector3, double>)

An RTS-style camera with a rotatable horizontal view and an automatic vertical angle.

public StrategyCamera(double minRadius, double maxRadius, float minAngle, float maxAngle, Func<DoubleVector3, double> heightController)

Parameters

minRadius double

The minimum radius allowed. Also used as the initial radius.

maxRadius double

The maximum radius allowed.

minAngle float

The minimum vertical angle in degrees. Effective when Radius is equal to MinRadius.

maxAngle float

The maximum vertical angle in degrees. Effective when Radius is equal to MaxRadius.

heightController Func<DoubleVector3, double>

This delegate is called to control the minimum height of the strategy camera based on its 2D coordinates.

Properties

HorizontalRotation

The clockwise horizontal rotation around the target in degrees.

public float HorizontalRotation { get; set; }

Property Value

float

MaxAngle

The maximum vertical angle in degrees. Effective when Radius is equal to MaxRadius.

public float MaxAngle { get; set; }

Property Value

float

MaxRadius

The maximum radius allowed.

public double MaxRadius { get; set; }

Property Value

double

Remarks

Must be a positive real number.

MinAngle

The minimum vertical angle in degrees. Effective when Radius is equal to MinRadius.

public float MinAngle { get; set; }

Property Value

float

MinRadius

The minimum radius allowed.

public double MinRadius { get; set; }

Property Value

double

Remarks

Must be a positive real number.

Radius

The distance between the camera and the center of the focuses object.

public double Radius { get; set; }

Property Value

double

Remarks

Must be a positive real number.

Target

The position the camera is looking at.

public override DoubleVector3 Target { get; set; }

Property Value

DoubleVector3

Exceptions

ArgumentOutOfRangeException

The coordinates lie outside the range of the height-controlling terrain.

Methods

Navigate(DoubleVector3, DoubleVector3)

Called when the user changes the view perspective.

public override void Navigate(DoubleVector3 translation, DoubleVector3 rotation)

Parameters

translation DoubleVector3

Movement in screen units. X = pan right, Y = pan upwards, Z = zoom into screen

rotation DoubleVector3

Rotation in degrees. X = yaw clockwise, Y = pitch clockwise, Z = roll clockwise

UpdateView()

Update cached versions of View and related matrices.

protected override void UpdateView()