# DXGfxLib.ThirdPersonCamera 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.ThirdPersonCamera:

[legend]

List of all members.

## Public Member Functions
| ThirdPersonCamera ()
| 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.
| ThirdPersonCamera ()
| 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 | 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 = 0.25f*(float)Math.PI
float | minAngle = -0.25f * (float)Math.PI
float | maxAngleVert = 0.5f * 0.25f * (float)Math.PI
float | minAngleVert = 0.0f
float | angleMult = 0.0025f * (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 ThirdPersonCamera.cs.

## Constructor & Destructor Documentation

DXGfxLib.ThirdPersonCamera.ThirdPersonCamera | ( |  | ) |

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 ThirdPersonCamera.cs.

DXGfxLib.ThirdPersonCamera.ThirdPersonCamera | ( |  | ) |

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 ThirdPersonCamera.cs.

## Member Function Documentation

override void DXGfxLib.ThirdPersonCamera.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 ThirdPersonCamera.cs.

override void DXGfxLib.ThirdPersonCamera.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 ThirdPersonCamera.cs.

override bool DXGfxLib.ThirdPersonCamera.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 ThirdPersonCamera.cs.

override bool DXGfxLib.ThirdPersonCamera.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 ThirdPersonCamera.cs.

## Member Data Documentation

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

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

Definition at line 80 of file ThirdPersonCamera.cs.

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

Definition at line 93 of file ThirdPersonCamera.cs.

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

Definition at line 83 of file ThirdPersonCamera.cs.

SceneNode DXGfxLib.ThirdPersonCamera::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 ThirdPersonCamera.cs.

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

Definition at line 86 of file ThirdPersonCamera.cs.

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

Definition at line 87 of file ThirdPersonCamera.cs.

float DXGfxLib.ThirdPersonCamera::maxAngle = 0.25f*(float)Math.PI`[protected]`

Definition at line 89 of file ThirdPersonCamera.cs.

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

Definition at line 91 of file ThirdPersonCamera.cs.

float DXGfxLib.ThirdPersonCamera::maxRadius = 150.0f

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

Definition at line 55 of file ThirdPersonCamera.cs.

float DXGfxLib.ThirdPersonCamera::minAngle = -0.25f * (float)Math.PI`[protected]`

Definition at line 90 of file ThirdPersonCamera.cs.

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

Definition at line 92 of file ThirdPersonCamera.cs.

float DXGfxLib.ThirdPersonCamera::minRadius = 4.0f

The minimum distance to the observed object.

Definition at line 60 of file ThirdPersonCamera.cs.

Vector3 DXGfxLib.ThirdPersonCamera::position

Definition at line 43 of file ThirdPersonCamera.cs.

float DXGfxLib.ThirdPersonCamera::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 ThirdPersonCamera.cs.

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

Definition at line 85 of file ThirdPersonCamera.cs.

int DXGfxLib.ThirdPersonCamera::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 ThirdPersonCamera.cs.

Vector3 DXGfxLib.ThirdPersonCamera::up

Definition at line 45 of file ThirdPersonCamera.cs.

Matrix DXGfxLib.ThirdPersonCamera::WorldMatrix = Matrix.Identity

The world matrix for positionning and orientation of our camera!

Definition at line 75 of file ThirdPersonCamera.cs.

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

Button used for the zoom. By default mid button.

Definition at line 70 of file ThirdPersonCamera.cs.

## Property Documentation

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

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

Definition at line 99 of file ThirdPersonCamera.cs.

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

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