VisimBox 1.0 VisimBox 3d simulation and visualisation ToolBox

- Main Page
- Packages
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Protected Attributes
VisimBox.Renderer.StandardCamera Class Reference
Inheritance diagram for VisimBox.Renderer.StandardCamera:

List of all members.

## Public Member Functions
| StandardCamera ()
| Constructs camera with specified 45 degrees of field of vision and view distance of 0.f - 300, for specified width and height of the rendering window.
| StandardCamera (float fov)
| Constructs camera with specified field of vision and view distance of 0.3f - 300, for specified width and height of the rendering window.
| StandardCamera (float fov, float znear, float zfar)
| Constructs camera with specified field of vision and zNear and zFar cliping parameters.
override void | UpdateMatrix ()
| Updates transformation from the rotational quaternion and translation vector.
override void | ReadXml (System.Xml.XmlReader reader)
| Deserializes object from XML.
override void | WriteXml (System.Xml.XmlWriter writer)
override string | ToString ()
Matrix4 | GetProjectionTransformation (int width, int height)
| Returns projection transformation matrix for specified width/height of the rendering viewport.
Matrix4 | GetViewTransformation ()
| Returns view transformation (basicaly inverted matrix of normal transformation)
VisiMath.Geometry.Ray | GetPickingRay (float mousex, float mousey)
| Creates (if possible) picking ray from the mouse click (ray from the eye through the clicked position)
bool | GetPickingRay (float mousex, float mousey, VisiMath.Geometry.Ray ray)
Vector3 | GetViewingNormal ()
| Returns view normal.
void | LookAt (Vector3 position)
| Turns camera to look at specified position (X unit vector will be rotated to position)
override ITransformation | GetCopy ()
| Returns copy of the transformation.
## Protected Member Functions
void | CalcProjection ()
| recalulculated projection matrix
## Protected Attributes
int | Width
| Last used width of the viewport.
int | Height
| Last used height of the viewport.
float | FoV
| Field of vision of the camera.
float | zNear
float | zFar
Matrix4 | ProjectionMatrix
Matrix4 | _InvertedProjection
bool | InvProjValid = false
Matrix4 | ViewMatrix

## Constructor & Destructor Documentation

VisimBox.Renderer.StandardCamera.StandardCamera | ( |  | ) |

Constructs camera with specified 45 degrees of field of vision and view distance of 0.f - 300, for specified width and height of the rendering window.

VisimBox.Renderer.StandardCamera.StandardCamera | ( | float | fov | ) |

Constructs camera with specified field of vision and view distance of 0.3f - 300, for specified width and height of the rendering window.

Parameters:

  fov | Field of vision (45 degrees is typical) in radians

VisimBox.Renderer.StandardCamera.StandardCamera | ( | float | fov,
|  | float | znear,
|  | float | zfar
| ) |  |

Constructs camera with specified field of vision and zNear and zFar cliping parameters.

Parameters:

  fov | Field of vision (45 degrees is typical) in radians
  znear | zNear clipping (minimal view distance)
  zfar | zFar clipping (max visible distance)

## Member Function Documentation

void VisimBox.Renderer.StandardCamera.CalcProjection | ( |  | ) | `[protected]`

recalulculated projection matrix

override ITransformation VisimBox.Renderer.StandardCamera.GetCopy | ( |  | ) | `[virtual]`

Returns copy of the transformation.

Returns:

Reimplemented from VisiMath.QTransformation.

Reimplemented in VisimBox.Renderer.FPSCamera.

VisiMath.Geometry.Ray VisimBox.Renderer.StandardCamera.GetPickingRay | ( | float | mousex,
|  | float | mousey
| ) |  |

Creates (if possible) picking ray from the mouse click (ray from the eye through the clicked position)

Parameters:

  mousex | MouseX position
  mousey | MouseY position

Returns:
  Picking ray

Implements VisimBox.Renderer.ICamera.

bool VisimBox.Renderer.StandardCamera.GetPickingRay | ( | float | mousex,
|  | float | mousey,
|  | VisiMath.Geometry.Ray | ray
| ) |  |

Matrix4 VisimBox.Renderer.StandardCamera.GetProjectionTransformation | ( | int | width,
|  | int | height
| ) |  |

Returns projection transformation matrix for specified width/height of the rendering viewport.

Parameters:

  width | width of the viewport
  height | Height of the viewport

Returns:
  Perspective or orthonormal projection matrix

Implements VisimBox.Renderer.ICamera.

Vector3 VisimBox.Renderer.StandardCamera.GetViewingNormal | ( |  | ) |

Returns view normal.

Returns:
  Normal pointing in the center of the camera

Implements VisimBox.Renderer.ICamera.

Matrix4 VisimBox.Renderer.StandardCamera.GetViewTransformation | ( |  | ) |

Returns view transformation (basicaly inverted matrix of normal transformation)

Returns:
  Camera transformation

Implements VisimBox.Renderer.ICamera.

void VisimBox.Renderer.StandardCamera.LookAt | ( | Vector3 | position | ) |

Turns camera to look at specified position (X unit vector will be rotated to position)

Parameters:

  position | Look position

Implements VisimBox.Renderer.ICamera.

override void VisimBox.Renderer.StandardCamera.ReadXml | ( | System.Xml.XmlReader | reader | ) | `[virtual]`

Deserializes object from XML.

Parameters:

  reader | XML reader

Reimplemented from VisiMath.QTransformation.

Reimplemented in VisimBox.Renderer.FPSCamera.

override string VisimBox.Renderer.StandardCamera.ToString | ( |  | ) |

Reimplemented from VisiMath.QTransformation.

Reimplemented in VisimBox.Renderer.FPSCamera.

override void VisimBox.Renderer.StandardCamera.UpdateMatrix | ( |  | ) | `[virtual]`

Updates transformation from the rotational quaternion and translation vector.

Reimplemented from VisiMath.QTransformation.

override void VisimBox.Renderer.StandardCamera.WriteXml | ( | System.Xml.XmlWriter | writer | ) | `[virtual]`

Reimplemented from VisiMath.QTransformation.

Reimplemented in VisimBox.Renderer.FPSCamera.

## Member Data Documentation

Matrix4 VisimBox.Renderer.StandardCamera._InvertedProjection`[protected]`

float VisimBox.Renderer.StandardCamera.FoV`[protected]`

Field of vision of the camera.

int VisimBox.Renderer.StandardCamera.Height`[protected]`

Last used height of the viewport.

bool VisimBox.Renderer.StandardCamera.InvProjValid = false`[protected]`

Matrix4 VisimBox.Renderer.StandardCamera.ProjectionMatrix`[protected]`

Matrix4 VisimBox.Renderer.StandardCamera.ViewMatrix`[protected]`

int VisimBox.Renderer.StandardCamera.Width`[protected]`

Last used width of the viewport.

float VisimBox.Renderer.StandardCamera.zFar`[protected]`

float VisimBox.Renderer.StandardCamera.zNear`[protected]`

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

- StandardCamera.cs

All Classes Namespaces Files Functions Variables Enumerations Properties Events