Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera Class Reference

Simple model viewing camera class that rotates around the object. More...

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

Collaboration diagram for Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void SetWorldQuat (Quaternion q)
 Sets the world quat.
void SetViewQuat (Quaternion q)
 Sets the view quat.
void SetIsPitchLimited (bool limit)
 Sets whether the pitch is limited or not.
void SetModelCenter (Vector3 c)
 Sets the model's center.
void SetRadius (float r, float min, float max)
 Sets radius.
void SetRadius (float r)
 Sets radius.
void SetWindow (int w, int h, float r)
 Sets arcball window.
void SetWindow (int w, int h)
 Sets arcball window.
void SetButtonMasks (int rotateModel, int zoom, int rotateCamera)
 Sets button masks.
 ModelViewerCamera ()
 Creates new instance of the model viewer camera.
unsafe override void FrameMove (float elapsedTime)
 Update the view matrix based on user input & elapsed time.
override void Reset ()
 Reset the camera's position back to the default.
override void SetViewParameters (Vector3 eyePt, Vector3 lookAtPt)
 Override for setting the view parameters.
override bool HandleMessages (IntPtr hWnd, NativeMethods.WindowMessage msg, IntPtr wParam, IntPtr lParam)
 Call this from your message proc so this class can handle window messages.
void SetWorldQuat (Quaternion q)
 Sets the world quat.
void SetViewQuat (Quaternion q)
 Sets the view quat.
void SetIsPitchLimited (bool limit)
 Sets whether the pitch is limited or not.
void SetModelCenter (Vector3 c)
 Sets the model's center.
void SetRadius (float r, float min, float max)
 Sets radius.
void SetRadius (float r)
 Sets radius.
void SetWindow (int w, int h, float r)
 Sets arcball window.
void SetWindow (int w, int h)
 Sets arcball window.
void SetButtonMasks (int rotateModel, int zoom, int rotateCamera)
 Sets button masks.
 ModelViewerCamera ()
 Creates new instance of the model viewer camera.
unsafe override void FrameMove (float elapsedTime)
 Update the view matrix based on user input & elapsed time.
override void Reset ()
 Reset the camera's position back to the default.
override void SetViewParameters (Vector3 eyePt, Vector3 lookAtPt)
 Override for setting the view parameters.
override bool HandleMessages (IntPtr hWnd, NativeMethods.WindowMessage msg, IntPtr wParam, IntPtr lParam)
 Call this from your message proc so this class can handle window messages.
void SetWorldQuat (Quaternion q)
 Sets the world quat.
void SetViewQuat (Quaternion q)
 Sets the view quat.
void SetIsPitchLimited (bool limit)
 Sets whether the pitch is limited or not.
void SetModelCenter (Vector3 c)
 Sets the model's center.
void SetRadius (float r, float min, float max)
 Sets radius.
void SetRadius (float r)
 Sets radius.
void SetWindow (int w, int h, float r)
 Sets arcball window.
void SetWindow (int w, int h)
 Sets arcball window.
void SetButtonMasks (int rotateModel, int zoom, int rotateCamera)
 Sets button masks.
 ModelViewerCamera ()
 Creates new instance of the model viewer camera.
unsafe override void FrameMove (float elapsedTime)
 Update the view matrix based on user input & elapsed time.
override void Reset ()
 Reset the camera's position back to the default.
override void SetViewParameters (Vector3 eyePt, Vector3 lookAtPt)
 Override for setting the view parameters.
override bool HandleMessages (IntPtr hWnd, NativeMethods.WindowMessage msg, IntPtr wParam, IntPtr lParam)
 Call this from your message proc so this class can handle window messages.

Protected Attributes

ArcBall worldArcball = new ArcBall()
ArcBall viewArcball = new ArcBall()
Vector3 modelCenter
Matrix lastModelRotation
Matrix lastCameraRotation
Matrix modelRotation
Matrix world
int rotateModelButtonMask
int zoomButtonMask
int rotateCameraButtonMask
bool isPitchLimited
float radius
float defaultRadius
float minRadius
float maxRadius
bool attachCameraToModel

Properties

float MinimumRadius [get, set]
 The minimum radius.
float MaximumRadius [get, set]
 The maximum radius.
Matrix WorldMatrix [get]
 Gets the world matrix.
bool IsAttachedToModel [get, set]
 Is the camera attached to a model.


Detailed Description

Simple model viewing camera class that rotates around the object.

Definition at line 1615 of file dxmutmisc.cs.


Constructor & Destructor Documentation

Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.ModelViewerCamera (  ) 

Creates new instance of the model viewer camera.

Definition at line 1670 of file dxmutmisc.cs.

Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.ModelViewerCamera (  ) 

Creates new instance of the model viewer camera.

Definition at line 1670 of file dxmutmisc.cs.

Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.ModelViewerCamera (  ) 

Creates new instance of the model viewer camera.

Definition at line 1663 of file wdxmutmisc.cs.


Member Function Documentation

unsafe override void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.FrameMove ( float  elapsedTime  )  [virtual]

Update the view matrix based on user input & elapsed time.

Implements Microsoft.Samples.DirectX.UtilityToolkit.Camera.

Definition at line 1687 of file wdxmutmisc.cs.

unsafe override void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.FrameMove ( float  elapsedTime  )  [virtual]

Update the view matrix based on user input & elapsed time.

Implements Microsoft.Samples.DirectX.UtilityToolkit.Camera.

Definition at line 1694 of file dxmutmisc.cs.

unsafe override void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.FrameMove ( float  elapsedTime  )  [virtual]

Update the view matrix based on user input & elapsed time.

Implements Microsoft.Samples.DirectX.UtilityToolkit.Camera.

Definition at line 1694 of file dxmutmisc.cs.

override bool Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.HandleMessages ( IntPtr  hWnd,
NativeMethods.WindowMessage  msg,
IntPtr  wParam,
IntPtr  lParam 
) [virtual]

Call this from your message proc so this class can handle window messages.

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

Definition at line 1811 of file wdxmutmisc.cs.

override bool Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.HandleMessages ( IntPtr  hWnd,
NativeMethods.WindowMessage  msg,
IntPtr  wParam,
IntPtr  lParam 
) [virtual]

Call this from your message proc so this class can handle window messages.

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

Definition at line 1818 of file dxmutmisc.cs.

override bool Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.HandleMessages ( IntPtr  hWnd,
NativeMethods.WindowMessage  msg,
IntPtr  wParam,
IntPtr  lParam 
) [virtual]

Call this from your message proc so this class can handle window messages.

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

Definition at line 1818 of file dxmutmisc.cs.

override void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.Reset (  )  [virtual]

Reset the camera's position back to the default.

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

Definition at line 1779 of file wdxmutmisc.cs.

override void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.Reset (  )  [virtual]

Reset the camera's position back to the default.

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

Definition at line 1786 of file dxmutmisc.cs.

override void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.Reset (  )  [virtual]

Reset the camera's position back to the default.

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

Definition at line 1786 of file dxmutmisc.cs.

void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.SetButtonMasks ( int  rotateModel,
int  zoom,
int  rotateCamera 
)

Sets button masks.

Definition at line 1655 of file wdxmutmisc.cs.

void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.SetButtonMasks ( int  rotateModel,
int  zoom,
int  rotateCamera 
)

Sets button masks.

Definition at line 1662 of file dxmutmisc.cs.

void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.SetButtonMasks ( int  rotateModel,
int  zoom,
int  rotateCamera 
)

Sets button masks.

Definition at line 1662 of file dxmutmisc.cs.

void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.SetIsPitchLimited ( bool  limit  ) 

Sets whether the pitch is limited or not.

Definition at line 1643 of file wdxmutmisc.cs.

void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.SetIsPitchLimited ( bool  limit  ) 

Sets whether the pitch is limited or not.

Definition at line 1650 of file dxmutmisc.cs.

void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.SetIsPitchLimited ( bool  limit  ) 

Sets whether the pitch is limited or not.

Definition at line 1650 of file dxmutmisc.cs.

void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.SetModelCenter ( Vector3  c  ) 

Sets the model's center.

Definition at line 1645 of file wdxmutmisc.cs.

void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.SetModelCenter ( Vector3  c  ) 

Sets the model's center.

Definition at line 1652 of file dxmutmisc.cs.

void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.SetModelCenter ( Vector3  c  ) 

Sets the model's center.

Definition at line 1652 of file dxmutmisc.cs.

void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.SetRadius ( float  r  ) 

Sets radius.

Definition at line 1649 of file wdxmutmisc.cs.

void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.SetRadius ( float  r,
float  min,
float  max 
)

Sets radius.

Definition at line 1647 of file wdxmutmisc.cs.

void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.SetRadius ( float  r  ) 

Sets radius.

Definition at line 1656 of file dxmutmisc.cs.

void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.SetRadius ( float  r,
float  min,
float  max 
)

Sets radius.

Definition at line 1654 of file dxmutmisc.cs.

void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.SetRadius ( float  r  ) 

Sets radius.

Definition at line 1656 of file dxmutmisc.cs.

void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.SetRadius ( float  r,
float  min,
float  max 
)

Sets radius.

Definition at line 1654 of file dxmutmisc.cs.

override void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.SetViewParameters ( Vector3  eyePt,
Vector3  lookAtPt 
) [virtual]

Override for setting the view parameters.

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

Definition at line 1794 of file wdxmutmisc.cs.

override void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.SetViewParameters ( Vector3  eyePt,
Vector3  lookAtPt 
) [virtual]

Override for setting the view parameters.

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

Definition at line 1801 of file dxmutmisc.cs.

override void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.SetViewParameters ( Vector3  eyePt,
Vector3  lookAtPt 
) [virtual]

Override for setting the view parameters.

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

Definition at line 1801 of file dxmutmisc.cs.

void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.SetViewQuat ( Quaternion  q  ) 

Sets the view quat.

Definition at line 1641 of file wdxmutmisc.cs.

void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.SetViewQuat ( Quaternion  q  ) 

Sets the view quat.

Definition at line 1648 of file dxmutmisc.cs.

void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.SetViewQuat ( Quaternion  q  ) 

Sets the view quat.

Definition at line 1648 of file dxmutmisc.cs.

void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.SetWindow ( int  w,
int  h 
)

Sets arcball window.

Definition at line 1653 of file wdxmutmisc.cs.

void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.SetWindow ( int  w,
int  h,
float  r 
)

Sets arcball window.

Definition at line 1651 of file wdxmutmisc.cs.

void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.SetWindow ( int  w,
int  h 
)

Sets arcball window.

Definition at line 1660 of file dxmutmisc.cs.

void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.SetWindow ( int  w,
int  h,
float  r 
)

Sets arcball window.

Definition at line 1658 of file dxmutmisc.cs.

void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.SetWindow ( int  w,
int  h 
)

Sets arcball window.

Definition at line 1660 of file dxmutmisc.cs.

void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.SetWindow ( int  w,
int  h,
float  r 
)

Sets arcball window.

Definition at line 1658 of file dxmutmisc.cs.

void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.SetWorldQuat ( Quaternion  q  ) 

Sets the world quat.

Definition at line 1639 of file wdxmutmisc.cs.

void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.SetWorldQuat ( Quaternion  q  ) 

Sets the world quat.

Definition at line 1646 of file dxmutmisc.cs.

void Microsoft.Samples.DirectX.UtilityToolkit.ModelViewerCamera.SetWorldQuat ( Quaternion  q  ) 

Sets the world quat.

Definition at line 1646 of file dxmutmisc.cs.


Member Data Documentation

Definition at line 1635 of file dxmutmisc.cs.

Definition at line 1632 of file dxmutmisc.cs.

Definition at line 1630 of file dxmutmisc.cs.

Definition at line 1622 of file dxmutmisc.cs.

Definition at line 1621 of file dxmutmisc.cs.

Definition at line 1634 of file dxmutmisc.cs.

Definition at line 1633 of file dxmutmisc.cs.

Definition at line 1620 of file dxmutmisc.cs.

Definition at line 1623 of file dxmutmisc.cs.

Definition at line 1631 of file dxmutmisc.cs.

Definition at line 1628 of file dxmutmisc.cs.

Definition at line 1626 of file dxmutmisc.cs.

Definition at line 1619 of file dxmutmisc.cs.

Definition at line 1624 of file dxmutmisc.cs.

Definition at line 1618 of file dxmutmisc.cs.

Definition at line 1627 of file dxmutmisc.cs.


Property Documentation

bool Microsoft::Samples::DirectX::UtilityToolkit.ModelViewerCamera::IsAttachedToModel [get, set]

Is the camera attached to a model.

Definition at line 1664 of file dxmutmisc.cs.

float Microsoft::Samples::DirectX::UtilityToolkit.ModelViewerCamera::MaximumRadius [get, set]

The maximum radius.

Definition at line 1642 of file dxmutmisc.cs.

float Microsoft::Samples::DirectX::UtilityToolkit.ModelViewerCamera::MinimumRadius [get, set]

The minimum radius.

Definition at line 1640 of file dxmutmisc.cs.

Matrix Microsoft::Samples::DirectX::UtilityToolkit.ModelViewerCamera::WorldMatrix [get]

Gets the world matrix.

Definition at line 1644 of file dxmutmisc.cs.


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

Generated on Thu Jan 8 20:50:53 2009 for DXGfx by  doxygen 1.5.8