DX9ToolsR4 - Created by: X

Camera Constructor (DX9Graphics)

Initilizes the camera using a 'DX9Graphics' reference.

[Visual Basic]
Overloads Public Sub New( _
   ByVal Graphics As DX9Graphics _
)
[C#]
public Camera(
   DX9Graphics Graphics
);

Parameters

Graphics
Reference to a DX9Graphics object.

Remarks

The camera class will use the 'Device' property of the DX9Graphics object that you pass and store it's reference internally.

The reference to the Direct3D.Device is nessary because if, for example, you set the FieldOfView property and the AutoUpdateProjection property is True a call to the UpdateProjection method is made automatically.

The UpdateProjection method uses the reference to the device to update the devices Projection transform.

Exceptions

Exception TypeCondition
ArgumentNullException Will throw a ArgumentNullException Exception if the Graphics parameter is nothing.
ArgumentNullException Will throw a ArgumentNullException Exception if the Graphics.Device property is nothing.

See Also

Camera Class | CBX.Libs.DX9ToolsR4 Namespace | Camera Constructor Overload List