OmegaEngine API  1.0.3
Public Member Functions | Protected Member Functions | Properties | List of all members
OmegaEngine.Graphics.Cameras.StrategyCamera Class Reference

A RTS-style camera with a rotateable horizontal view and an automatic vertical angle. More...

Inheritance diagram for OmegaEngine.Graphics.Cameras.StrategyCamera:
OmegaEngine.Graphics.Cameras.MatrixCamera OmegaEngine.Graphics.Cameras.Camera OmegaEngine.IPositionable

Public Member Functions

 StrategyCamera (double minRadius, double maxRadius, float minAngle, float maxAngle, Func< DoubleVector3, double > heightController)
 Creates a new strategy camera. More...
 
override void PerspectiveChange (float panX, float panY, float rotation, float zoom)
 Called when the user changes the view perspective.
 
- Public Member Functions inherited from OmegaEngine.Graphics.Cameras.Camera
override string ToString ()
 

Protected Member Functions

override void UpdateView ()
 Update cached versions of View and related matrices. More...
 
- Protected Member Functions inherited from OmegaEngine.Graphics.Cameras.Camera
void CacheSpecialMatrices ()
 Calculate cached versions of special matrices (e.g. ViewInverse calculated from View) More...
 
virtual void UpdateProjection ()
 Update Projection if necessary More...
 

Properties

override DoubleVector3 Target [get, set]
 The position the camera is looking at. More...
 
double Radius [get, set]
 The distance between the camera and the center of the focues object. More...
 
float HorizontalRotation [get, set]
 The horizontal rotation in degrees. More...
 
double MinRadius [get, set]
 The minimum radius allowed. More...
 
double MaxRadius [get, set]
 The maximum radius allowed. More...
 
float MinAngle [get, set]
 The minimum vertical angle in degrees. Effective when Radius is equal to MinRadius. More...
 
float MaxAngle [get, set]
 The maximum vertical angle in degrees. Effective when Radius is equal to MaxRadius. More...
 
- Properties inherited from OmegaEngine.Graphics.Cameras.MatrixCamera
virtual DoubleVector3 Target [get, set]
 The position the camera is looking at. More...
 
Vector3 UpVector [get, protected set]
 A vector indicating the up-direction More...
 
- Properties inherited from OmegaEngine.Graphics.Cameras.Camera
string Name [get, set]
 Text value to make it easier to identify a particular camera More...
 
DoubleVector3 Position [get, set]
 The camera's position in 3D-space More...
 
DoubleVector3 PositionBase [get, set]
 A value that is subtracted from all positions (including the Camera's) before handing them to the graphics hardware More...
 
internal Matrix View [get]
 A left-handed view matrix for the current camera setting More...
 
internal Matrix SimpleView [get]
 A left-handed view matrix with absolutely no translation information More...
 
internal Matrix ViewInverse [get]
 An inverted view matrix for the current camera setting More...
 
internal Matrix ViewTranspose [get]
 A transposed view matrix for the current camera setting More...
 
internal Matrix ViewInverseTranspose [get]
 An inverted and transposed view matrix for the current camera setting More...
 
internal Matrix SphericalBillboard [get]
 A rotation matrix for a faked spherical billboard effect More...
 
internal Matrix CylindricalBillboard [get]
 A rotation matrix for a faked cylindrical billboard effect More...
 
float FieldOfView [get, set]
 The view angle in degrees More...
 
float NearClip [get, set]
 Minimum distance of objects to the camera More...
 
float FarClip [get, set]
 Maximum distance of objects to the camera More...
 
DoublePlane ClipPlane [get, set]
 A custom clip plane behind which all objects are culled More...
 
bool FrustumCulling = true [get, set]
 Shall the engine use view frustum culling to optimize the rendering performance? More...
 
- Properties inherited from OmegaEngine.IPositionable
DoubleVector3 Position [get, set]
 The object's position More...
 

Additional Inherited Members

- Protected Attributes inherited from OmegaEngine.Graphics.Cameras.Camera
bool ViewDirty = true
 Does ViewCached need to be recalculated? More...
 
bool ProjectionDirty = true
 Does _projection need to be recalculated? More...
 
bool ViewFrustumDirty = true
 Does the view frustum need to be recalculated? More...
 
DoubleVector3 PositionCached
 
DoubleVector3 PositionBaseCached
 
Matrix ViewCached
 
Matrix SimpleViewCached
 

Detailed Description

A RTS-style camera with a rotateable horizontal view and an automatic vertical angle.

Constructor & Destructor Documentation

◆ StrategyCamera()

OmegaEngine.Graphics.Cameras.StrategyCamera.StrategyCamera ( double  minRadius,
double  maxRadius,
float  minAngle,
float  maxAngle,
Func< DoubleVector3, double >  heightController 
)
inline

Creates a new strategy camera.

Parameters
minRadiusThe minimum radius allowed. Also used as the initial radius
maxRadiusThe maximum radius allowed.
minAngleThe minimum vertical angle in degrees. Effective when Radius is equal to MinRadius.
maxAngleThe maximum vertical angle in degrees. Effective when Radius is equal to MaxRadius.
heightControllerThis delegate is called to control the minimum height of the strategy camera based on its 2D coordinates.

Member Function Documentation

◆ UpdateView()

override void OmegaEngine.Graphics.Cameras.StrategyCamera.UpdateView ( )
inlineprotectedvirtual

Update cached versions of View and related matrices.

Reimplemented from OmegaEngine.Graphics.Cameras.MatrixCamera.

Property Documentation

◆ HorizontalRotation

float OmegaEngine.Graphics.Cameras.StrategyCamera.HorizontalRotation
getset

The horizontal rotation in degrees.

Must be a real number.

◆ MaxAngle

float OmegaEngine.Graphics.Cameras.StrategyCamera.MaxAngle
getset

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

Must be a real number.

◆ MaxRadius

double OmegaEngine.Graphics.Cameras.StrategyCamera.MaxRadius
getset

The maximum radius allowed.

Must be a positive real number.

◆ MinAngle

float OmegaEngine.Graphics.Cameras.StrategyCamera.MinAngle
getset

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

Must be a real number.

◆ MinRadius

double OmegaEngine.Graphics.Cameras.StrategyCamera.MinRadius
getset

The minimum radius allowed.

Must be a positive real number.

◆ Radius

double OmegaEngine.Graphics.Cameras.StrategyCamera.Radius
getset

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

Must be a positiv real number.

◆ Target

override DoubleVector3 OmegaEngine.Graphics.Cameras.StrategyCamera.Target
getset

The position the camera is looking at.

Exceptions
ArgumentOutOfRangeExceptionThe coordinates lie outside the range of the height-controlling terrain.

The documentation for this class was generated from the following file: