C# Class MyGame.Camera

Inheritance: IOObserver
Show file Open project: mahmoudbahaa/XNA-Game-project Class Usage Examples

Public Properties

Property Type Description
Position Vector3
Target Vector3

Protected Properties

Property Type Description
myGame MyGame

Public Methods

Method Description
BoundingVolumeIsInView ( Microsoft.Xna.Framework.BoundingBox box ) : bool

Checks if the bounding box is in the camera frustrum or not

BoundingVolumeIsInView ( BoundingSphere sphere ) : bool

Checks if the bounding sphere is in the camera frustrum or not

Camera ( MyGame game ) : System

Constructor that initiliaze the projection matrix

Private Methods

Method Description
generateFrustum ( ) : void

Generate the camera frustrum from the view projection matrix

Method Details

BoundingVolumeIsInView() public method

Checks if the bounding box is in the camera frustrum or not
public BoundingVolumeIsInView ( Microsoft.Xna.Framework.BoundingBox box ) : bool
box Microsoft.Xna.Framework.BoundingBox the Bounding box to check
return bool

BoundingVolumeIsInView() public method

Checks if the bounding sphere is in the camera frustrum or not
public BoundingVolumeIsInView ( BoundingSphere sphere ) : bool
sphere BoundingSphere the Bounding sphere to check
return bool

Camera() public method

Constructor that initiliaze the projection matrix
public Camera ( MyGame game ) : System
game MyGame The instance of MyGame the game component is attached to
return System

Property Details

Position public property

public Vector3 Position
return Vector3

Target public property

public Vector3 Target
return Vector3

myGame protected property

protected MyGame myGame
return MyGame