C# Class GIProbesDebugger.Camera

The Camera class doesn't wrap any DirectX component per-se but helps a lot to handle basic displacement and projections NOTES : _ The projection float4x4 is Left Handed _ The Local2World float4x4 is left handed (all other matrices in Nuaj are right handed !) A typical camera float4x4 looks like this : Y (Up) ^ | Z (At) | / | / | / |/ o---------> X (Right)
Afficher le fichier Open project: Patapom/GodComplex Class Usage Examples

Protected Properties

Свойство Type Description
m_AspectRatio float
m_CachedCameraData float4
m_Camera2Proj float4x4
m_Camera2World float4x4
m_Far float
m_Near float
m_OrthoHeight float
m_PerspFOV float
m_World2Camera float4x4
m_World2Proj float4x4
m_bActive bool
m_bIsPerspective bool

Private Properties

Свойство Type Description

Méthodes publiques

Méthode Description
BuildCameraRay ( float _X, float _Y, float3 &_Position, float3 &_Direction ) : void

/// Builds a camera ray in WORLD space ///

Builds a camera ray in CAMERA space

Camera ( ) : System

Creates a default camera

CreatePerspectiveCamera ( float _FOV, float _AspectRatio, float _Near, float _Far ) : void

Creates a perspective projection float4x4 for the camera

LookAt ( float3 _Eye, float3 _Target, float3 _Up ) : void

Makes the camera look at the specified target from the specified eye position

ProjectPoint ( float3 _Position ) : float2

Projects a 3D point in 2D

ProjectVector ( float3 _Vector ) : float2

Projects a 3D vector in 2D

Méthodes protégées

Méthode Description
RebuildProjection ( ) : void

/// Creates an orthogonal projection float4x4 for the camera ///

Rebuilds the camera projection data after a change

Method Details

BuildCameraRay() public méthode

/// Builds a camera ray in WORLD space /// Builds a camera ray in CAMERA space
public BuildCameraRay ( float _X, float _Y, float3 &_Position, float3 &_Direction ) : void
_X float The normalized X coordinate in [0,1] (0 is left screen border and 1 is right screen border)
_Y float The normalized Y coordinate in [0,1] (0 is top screen border and 1 is bottom screen border)
_Position float3
_Direction float3
Résultat void

Camera() public méthode

Creates a default camera
public Camera ( ) : System
Résultat System

CreatePerspectiveCamera() public méthode

Creates a perspective projection float4x4 for the camera
public CreatePerspectiveCamera ( float _FOV, float _AspectRatio, float _Near, float _Far ) : void
_FOV float
_AspectRatio float
_Near float
_Far float
Résultat void

LookAt() public méthode

Makes the camera look at the specified target from the specified eye position
public LookAt ( float3 _Eye, float3 _Target, float3 _Up ) : void
_Eye float3
_Target float3
_Up float3
Résultat void

ProjectPoint() public méthode

Projects a 3D point in 2D
public ProjectPoint ( float3 _Position ) : float2
_Position float3
Résultat float2

ProjectVector() public méthode

Projects a 3D vector in 2D
public ProjectVector ( float3 _Vector ) : float2
_Vector float3
Résultat float2

RebuildProjection() protected méthode

/// Creates an orthogonal projection float4x4 for the camera /// Rebuilds the camera projection data after a change
protected RebuildProjection ( ) : void
Résultat void

Property Details

m_AspectRatio protected_oe property

protected float m_AspectRatio
Résultat float

m_CachedCameraData protected_oe property

protected float4 m_CachedCameraData
Résultat float4

m_Camera2Proj protected_oe property

protected float4x4 m_Camera2Proj
Résultat float4x4

m_Camera2World protected_oe property

protected float4x4 m_Camera2World
Résultat float4x4

m_Far protected_oe property

protected float m_Far
Résultat float

m_Near protected_oe property

protected float m_Near
Résultat float

m_OrthoHeight protected_oe property

protected float m_OrthoHeight
Résultat float

m_PerspFOV protected_oe property

protected float m_PerspFOV
Résultat float

m_World2Camera protected_oe property

protected float4x4 m_World2Camera
Résultat float4x4

m_World2Proj protected_oe property

protected float4x4 m_World2Proj
Résultat float4x4

m_bActive protected_oe property

protected bool m_bActive
Résultat bool

m_bIsPerspective protected_oe property

protected bool m_bIsPerspective
Résultat bool