C# 클래스 Nuaj.Cirrus.Utility.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)
파일 보기 프로젝트 열기: Patapom/GodComplex 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
m_AspectRatio float
m_CachedCameraData float4
m_Camera2Proj SharpMath.float4x4
m_Camera2World SharpMath.float4x4
m_Far float
m_Near float
m_OrthoHeight float
m_PerspFOV float
m_Proj2Camera SharpMath.float4x4
m_Proj2World SharpMath.float4x4
m_World2Camera SharpMath.float4x4
m_World2Proj SharpMath.float4x4
m_bActive bool
m_bIsPerspective bool

Private Properties

프로퍼티 타입 설명

공개 메소드들

메소드 설명
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

보호된 메소드들

메소드 설명
RebuildProjection ( ) : void

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

Rebuilds the camera projection data after a change

메소드 상세

BuildCameraRay() 공개 메소드

/// 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 SharpMath.float3
_Direction SharpMath.float3
리턴 void

Camera() 공개 메소드

Creates a default camera
public Camera ( ) : System
리턴 System

CreatePerspectiveCamera() 공개 메소드

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
리턴 void

LookAt() 공개 메소드

Makes the camera look at the specified target from the specified eye position
public LookAt ( float3 _Eye, float3 _Target, float3 _Up ) : void
_Eye SharpMath.float3
_Target SharpMath.float3
_Up SharpMath.float3
리턴 void

ProjectPoint() 공개 메소드

Projects a 3D point in 2D
public ProjectPoint ( float3 _Position ) : float2
_Position SharpMath.float3
리턴 float2

ProjectVector() 공개 메소드

Projects a 3D vector in 2D
public ProjectVector ( float3 _Vector ) : float2
_Vector SharpMath.float3
리턴 float2

RebuildProjection() 보호된 메소드

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

프로퍼티 상세

m_AspectRatio 보호되어 있는 프로퍼티

protected float m_AspectRatio
리턴 float

m_CachedCameraData 보호되어 있는 프로퍼티

protected float4 m_CachedCameraData
리턴 float4

m_Camera2Proj 보호되어 있는 프로퍼티

protected float4x4,SharpMath m_Camera2Proj
리턴 SharpMath.float4x4

m_Camera2World 보호되어 있는 프로퍼티

protected float4x4,SharpMath m_Camera2World
리턴 SharpMath.float4x4

m_Far 보호되어 있는 프로퍼티

protected float m_Far
리턴 float

m_Near 보호되어 있는 프로퍼티

protected float m_Near
리턴 float

m_OrthoHeight 보호되어 있는 프로퍼티

protected float m_OrthoHeight
리턴 float

m_PerspFOV 보호되어 있는 프로퍼티

protected float m_PerspFOV
리턴 float

m_Proj2Camera 보호되어 있는 프로퍼티

protected float4x4,SharpMath m_Proj2Camera
리턴 SharpMath.float4x4

m_Proj2World 보호되어 있는 프로퍼티

protected float4x4,SharpMath m_Proj2World
리턴 SharpMath.float4x4

m_World2Camera 보호되어 있는 프로퍼티

protected float4x4,SharpMath m_World2Camera
리턴 SharpMath.float4x4

m_World2Proj 보호되어 있는 프로퍼티

protected float4x4,SharpMath m_World2Proj
리턴 SharpMath.float4x4

m_bActive 보호되어 있는 프로퍼티

protected bool m_bActive
리턴 bool

m_bIsPerspective 보호되어 있는 프로퍼티

protected bool m_bIsPerspective
리턴 bool