# DXGfxLib.FreeCamera Class Reference

Thie class is a third person camera. The camera will stay behind the specified scene node. YOu can rotate around it to a certain extend with the mouse while pressing the third button. More...

Inherits Microsoft::Samples::DirectX::UtilityToolkit::Camera, and Microsoft::Samples::DirectX::UtilityToolkit::Camera.

Collaboration diagram for DXGfxLib.FreeCamera:

[legend]

List of all members.

## Public Member Functions
| FreeCamera ()
| Default constructor for our camera. After calling the constructor the camera is not attached to any preexisting scene node it is attached to a dummy one created for the occasion.
override bool | HandleMessages (IntPtr hWnd, NativeMethods.WindowMessage msg, IntPtr wParam, IntPtr lParam)
| This will handle windows messages for correct positionning of the camera based on mouse inputs!!
override void | FrameMove (float elapsedTime)
| Each frame we update quite a lot of things, it is done there. This needs to be called each frame.
| FreeCamera ()
| Default constructor for our camera. After calling the constructor the camera is not attached to any preexisting scene node it is attached to a dummy one created for the occasion.
override bool | HandleMessages (IntPtr hWnd, NativeMethods.WindowMessage msg, IntPtr wParam, IntPtr lParam)
| This will handle windows messages for correct positionning of the camera based on mouse inputs!!
override void | FrameMove (float elapsedTime)
| Each frame we update quite a lot of things, it is done there. This needs to be called each frame.
## Public Attributes
SceneNode | person
| The scene node that this camera object is going to follow. The camera always look at 0,0,0 of the specified scene node.
SceneNode | camera
| A scene node associated with the camera. Give all the functionnalities of a scene node to our camera object.
Vector3 | position
Vector3 | up
float | radius = 49.0f
| This value is used to determine distance of the camera to the node it is attached to!
float | maxRadius = 150.0f
| The maximum distance between the observed node and the camera scene node.
float | minRadius = 4.0f
| The minimum distance to the observed object.
Matrix | WorldMatrix = Matrix.Identity
| The world matrix for positionning and orientation of our camera!
## Protected Attributes
int | rotateButtonMask = (int)MouseButtonMask.Right
| This help define which button should be used for rotation. By default it is the third mouse button.
int | zoomButtonMask = (int)MouseButtonMask.Wheel
| Button used for the zoom. By default mid button.
float | angle = (float)Math.PI / 8
| This define a constraint on the rotation around our observed node.
float | behindAngle = 0.0f
bool | rightDown = false
float | lastX = 0.0f
float | lastY = 0.0f
float | maxAngle = (float)(0.9*Math.PI)
float | minAngle = -(float)(0.9*Math.PI)
float | maxAngleVert = 0.5f * (float)Math.PI
float | minAngleVert = 0.0f
float | angleMult = 0.0005f * (float)Math.PI
## Properties
SceneNode | Person`[get, set]`
| Public accessor for the Person SceneNode. The 'observed' scene node!!

## Detailed Description

Thie class is a third person camera. The camera will stay behind the specified scene node. YOu can rotate around it to a certain extend with the mouse while pressing the third button.

Definition at line 31 of file FreeCamera.cs.

## Constructor & Destructor Documentation

DXGfxLib.FreeCamera.FreeCamera | ( |  | ) |

Default constructor for our camera. After calling the constructor the camera is not attached to any preexisting scene node it is attached to a dummy one created for the occasion.

Definition at line 119 of file FreeCamera.cs.

DXGfxLib.FreeCamera.FreeCamera | ( |  | ) |

Default constructor for our camera. After calling the constructor the camera is not attached to any preexisting scene node it is attached to a dummy one created for the occasion.

Definition at line 119 of file FreeCamera.cs.

## Member Function Documentation

override void DXGfxLib.FreeCamera.FrameMove | ( | float | elapsedTime | ) | `[virtual]`

Each frame we update quite a lot of things, it is done there. This needs to be called each frame.

Parameters:

  | elapsedTime |

Implements Microsoft.Samples.DirectX.UtilityToolkit.Camera.

Definition at line 174 of file FreeCamera.cs.

Here is the call graph for this function:

override void DXGfxLib.FreeCamera.FrameMove | ( | float | elapsedTime | ) | `[virtual]`

Each frame we update quite a lot of things, it is done there. This needs to be called each frame.

Parameters:

  | elapsedTime |

Implements Microsoft.Samples.DirectX.UtilityToolkit.Camera.

Definition at line 174 of file FreeCamera.cs.

Here is the call graph for this function:

Here is the caller graph for this function:

override bool DXGfxLib.FreeCamera.HandleMessages | ( | IntPtr | hWnd,
|  | NativeMethods.WindowMessage | msg,
|  | IntPtr | wParam,
|  | IntPtr | lParam |
| ) |  |  | `[virtual]`

This will handle windows messages for correct positionning of the camera based on mouse inputs!!

Parameters:

  | hWnd |
  | msg |
  | wParam |
  | lParam |

Returns:

Reimplemented from Microsoft.Samples.DirectX.UtilityToolkit.Camera.

Definition at line 133 of file FreeCamera.cs.

override bool DXGfxLib.FreeCamera.HandleMessages | ( | IntPtr | hWnd,
|  | NativeMethods.WindowMessage | msg,
|  | IntPtr | wParam,
|  | IntPtr | lParam |
| ) |  |  | `[virtual]`

This will handle windows messages for correct positionning of the camera based on mouse inputs!!

Parameters:

  | hWnd |
  | msg |
  | wParam |
  | lParam |

Returns:

Reimplemented from Microsoft.Samples.DirectX.UtilityToolkit.Camera.

Definition at line 133 of file FreeCamera.cs.

Here is the caller graph for this function:

## Member Data Documentation

float DXGfxLib.FreeCamera::angle = (float)Math.PI / 8`[protected]`

This define a constraint on the rotation around our observed node.

Definition at line 80 of file FreeCamera.cs.

float DXGfxLib.FreeCamera::angleMult = 0.0005f * (float)Math.PI`[protected]`

Definition at line 93 of file FreeCamera.cs.

float DXGfxLib.FreeCamera::behindAngle = 0.0f`[protected]`

Definition at line 83 of file FreeCamera.cs.

SceneNode DXGfxLib.FreeCamera::camera

A scene node associated with the camera. Give all the functionnalities of a scene node to our camera object.

Definition at line 41 of file FreeCamera.cs.

float DXGfxLib.FreeCamera::lastX = 0.0f`[protected]`

Definition at line 86 of file FreeCamera.cs.

float DXGfxLib.FreeCamera::lastY = 0.0f`[protected]`

Definition at line 87 of file FreeCamera.cs.

float DXGfxLib.FreeCamera::maxAngle = (float)(0.9*Math.PI)`[protected]`

Definition at line 89 of file FreeCamera.cs.

float DXGfxLib.FreeCamera::maxAngleVert = 0.5f * (float)Math.PI`[protected]`

Definition at line 91 of file FreeCamera.cs.

float DXGfxLib.FreeCamera::maxRadius = 150.0f

The maximum distance between the observed node and the camera scene node.

Definition at line 55 of file FreeCamera.cs.

float DXGfxLib.FreeCamera::minAngle = -(float)(0.9*Math.PI)`[protected]`

Definition at line 90 of file FreeCamera.cs.

float DXGfxLib.FreeCamera::minAngleVert = 0.0f`[protected]`

Definition at line 92 of file FreeCamera.cs.

float DXGfxLib.FreeCamera::minRadius = 4.0f

The minimum distance to the observed object.

Definition at line 60 of file FreeCamera.cs.

SceneNode DXGfxLib.FreeCamera::person

The scene node that this camera object is going to follow. The camera always look at 0,0,0 of the specified scene node.

Definition at line 36 of file FreeCamera.cs.

Vector3 DXGfxLib.FreeCamera::position

Definition at line 43 of file FreeCamera.cs.

float DXGfxLib.FreeCamera::radius = 49.0f

This value is used to determine distance of the camera to the node it is attached to!

Definition at line 50 of file FreeCamera.cs.

bool DXGfxLib.FreeCamera::rightDown = false`[protected]`

Definition at line 85 of file FreeCamera.cs.

int DXGfxLib.FreeCamera::rotateButtonMask = (int)MouseButtonMask.Right`[protected]`

This help define which button should be used for rotation. By default it is the third mouse button.

Definition at line 65 of file FreeCamera.cs.

Vector3 DXGfxLib.FreeCamera::up

Definition at line 45 of file FreeCamera.cs.

Matrix DXGfxLib.FreeCamera::WorldMatrix = Matrix.Identity

The world matrix for positionning and orientation of our camera!

Definition at line 75 of file FreeCamera.cs.

int DXGfxLib.FreeCamera::zoomButtonMask = (int)MouseButtonMask.Wheel`[protected]`

Button used for the zoom. By default mid button.

Definition at line 70 of file FreeCamera.cs.

## Property Documentation

SceneNode DXGfxLib.FreeCamera::Person`[get, set]`

Public accessor for the Person SceneNode. The 'observed' scene node!!

Definition at line 99 of file FreeCamera.cs.

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

- D:/guillaume/guillara/3D/DXGfx/Backup/DXGfxLib/FreeCamera.cs
- D:/guillaume/guillara/3D/DXGfx/DXGfxLib/FreeCamera.cs