C# 클래스 Axiom.Core.Camera

A viewpoint from which the scene will be rendered.
The engine renders scenes from a camera viewpoint into a buffer of some sort, normally a window or a texture (a subclass of RenderTarget). the engine cameras support both perspective projection (the default, meaning objects get smaller the further away they are) and orthographic projection (blueprint-style, no decrease in size with distance). Each camera carries with it a style of rendering, e.g. full textured, flat shaded, wireframe), field of view, rendering distances etc, allowing you to use the engine to create complex multi-window views if required. In addition, more than one camera can point at a single render target if required, each rendering to a subset of the target, allowing split screen and picture-in-picture views.

Cameras maintain their own aspect ratios, field of view, and frustrum, and project co-ordinates into a space measured from -1 to 1 in x and y, and 0 to 1 in z. At render time, the camera will be rendering to a Viewport which will translate these parametric co-ordinates into real screen co-ordinates. Obviously it is advisable that the viewport has the same aspect ratio as the camera to avoid distortion (unless you want it!).

Note that a Camera can be attached to a SceneNode, using the method SceneNode.AttachObject. If this is done the Camera will combine it's own position/orientation settings with it's parent SceneNode. This is useful for implementing more complex Camera / object relationships i.e. having a camera attached to a world object.

상속: Frustum
파일 보기 프로젝트 열기: WolfgangSt/axiom 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
isYawFixed bool
recalculateWindow bool
useRenderingDistance bool
windowBottom float
windowLeft float
windowRight float
windowTop float
yawFixedAxis Vector3

Private Properties

프로퍼티 타입 설명
AutoTrack void
Camera System
ForwardIntersect void
GetCameraToViewportRay Axiom.Math.Ray
GetCameraToViewportRay void
GetRayForwardIntersect IEnumerable
Move void
MoveRelative void
NotifyRenderedBatches void
NotifyRenderedFaces void
NotifyViewport void
Pitch void
ProjectSphere bool
RenderScene void
ResetWindow void
Roll void
Rotate void
Rotate void
SetAutoTracking void
SetAutoTracking void
SetAutoTracking void
SetWindow void
Yaw void

공개 메소드들

메소드 설명
GetCameraToViewportBoxVolume ( Real screenLeft, Real screenTop, Real screenRight, Real screenBottom, bool includeFarPlane ) : PlaneBoundedVolume

Gets a world-space list of planes enclosing a volume based on a viewport rectangle.

Can be useful for populating a PlaneBoundedVolumeListSceneQuery, e.g. for a rubber-band selection.

GetCameraToViewportBoxVolume ( Real screenLeft, Real screenTop, Real screenRight, Real screenBottom, PlaneBoundedVolume outVolume, bool includeFarPlane ) : void

Gets a world-space list of planes enclosing a volume based on a viewport rectangle.

Can be useful for populating a PlaneBoundedVolumeListSceneQuery, e.g. for a rubber-band selection.

GetWindowPlane ( int index ) : Plane

Gets the window plane at the specified index.

IsObjectVisible ( AxisAlignedBox box ) : bool
IsObjectVisible ( AxisAlignedBox box, FrustumPlane &culledBy ) : bool
IsObjectVisible ( Sphere sphere ) : bool
IsObjectVisible ( Sphere sphere, FrustumPlane &culledBy ) : bool
IsObjectVisible ( Vector3 vertex ) : bool
IsObjectVisible ( Vector3 vertex, FrustumPlane &culledBy ) : bool
LookAt ( Vector3 target ) : void

Specifies a target that the camera should look at.

NotifyCurrentCamera ( Axiom camera ) : void
ToString ( ) : string
UpdateRenderQueue ( RenderQueue queue ) : void

보호된 메소드들

메소드 설명
GetOrientationForViewUpdate ( ) : Quaternion

Get the derived orientation of this frustum.

GetPositionForViewUpdate ( ) : Vector3

Get the derived position of this frustum.

InvalidateFrustum ( ) : void

Signal to update frustum information.

InvalidateView ( ) : void

Signal to update view information.

SetWindowImpl ( ) : void

Do actual window setting, using parameters set in SetWindow call.

The method is called after projection matrix each change.

dispose ( bool disposeManagedResources ) : void

비공개 메소드들

메소드 설명
AutoTrack ( ) : void
Camera ( string name, SceneManager sceneManager ) : System
ForwardIntersect ( Plane worldPlane, IList intersect3D ) : void
GetCameraToViewportRay ( float screenX, float screenY ) : Ray
GetCameraToViewportRay ( float screenX, float screenY, Ray &ray ) : void
GetRayForwardIntersect ( Vector3 anchor, IEnumerable dir, Real planeOffset ) : IEnumerable
Move ( Vector3 offset ) : void
MoveRelative ( Vector3 offset ) : void
NotifyRenderedBatches ( int renderedBatchCount ) : void
NotifyRenderedFaces ( int renderedFaceCount ) : void
NotifyViewport ( Axiom.Core.Viewport viewport ) : void
Pitch ( float degrees ) : void
ProjectSphere ( Sphere sphere, float &left, float &top, float &right, float &bottom ) : bool
RenderScene ( Axiom.Core.Viewport viewport, bool showOverlays ) : void

Called to ask a camera to render the scene into the given viewport.

ResetWindow ( ) : void
Roll ( float degrees ) : void
Rotate ( Quaternion qnorm ) : void
Rotate ( Vector3 axis, float degrees ) : void
SetAutoTracking ( bool enabled, Axiom.Core.MovableObject target ) : void
SetAutoTracking ( bool enabled, SceneNode target ) : void
SetAutoTracking ( bool enabled, SceneNode target, Vector3 offset ) : void
SetWindow ( float left, float top, float right, float bottom ) : void
Yaw ( float degrees ) : void

메소드 상세

GetCameraToViewportBoxVolume() 공개 메소드

Gets a world-space list of planes enclosing a volume based on a viewport rectangle.
Can be useful for populating a PlaneBoundedVolumeListSceneQuery, e.g. for a rubber-band selection.
public GetCameraToViewportBoxVolume ( Real screenLeft, Real screenTop, Real screenRight, Real screenBottom, bool includeFarPlane ) : PlaneBoundedVolume
screenLeft Real the left bound of the on-screen rectangle, expressed in normalized screen coordinates [0,1]
screenTop Real the upper bound of the on-screen rectangle, expressed in normalized screen coordinates [0,1]
screenRight Real the right bound of the on-screen rectangle, expressed in normalized screen coordinates [0,1]
screenBottom Real the lower bound of the on-screen rectangle, expressed in normalized screen coordinates [0,1]
includeFarPlane bool whether to include the far frustum plane
리턴 Axiom.Math.PlaneBoundedVolume

GetCameraToViewportBoxVolume() 공개 메소드

Gets a world-space list of planes enclosing a volume based on a viewport rectangle.
Can be useful for populating a PlaneBoundedVolumeListSceneQuery, e.g. for a rubber-band selection.
public GetCameraToViewportBoxVolume ( Real screenLeft, Real screenTop, Real screenRight, Real screenBottom, PlaneBoundedVolume outVolume, bool includeFarPlane ) : void
screenLeft Real the left bound of the on-screen rectangle, expressed in normalized screen coordinates [0,1]
screenTop Real the upper bound of the on-screen rectangle, expressed in normalized screen coordinates [0,1]
screenRight Real the right bound of the on-screen rectangle, expressed in normalized screen coordinates [0,1]
screenBottom Real the lower bound of the on-screen rectangle, expressed in normalized screen coordinates [0,1]
outVolume Axiom.Math.PlaneBoundedVolume The plane list to populate with the result
includeFarPlane bool whether to include the far frustum plane
리턴 void

GetOrientationForViewUpdate() 보호된 메소드

Get the derived orientation of this frustum.
protected GetOrientationForViewUpdate ( ) : Quaternion
리턴 Axiom.Math.Quaternion

GetPositionForViewUpdate() 보호된 메소드

Get the derived position of this frustum.
protected GetPositionForViewUpdate ( ) : Vector3
리턴 Vector3

GetWindowPlane() 공개 메소드

Gets the window plane at the specified index.
public GetWindowPlane ( int index ) : Plane
index int Index of the plane to get.
리턴 Axiom.Math.Plane

InvalidateFrustum() 보호된 메소드

Signal to update frustum information.
protected InvalidateFrustum ( ) : void
리턴 void

InvalidateView() 보호된 메소드

Signal to update view information.
protected InvalidateView ( ) : void
리턴 void

IsObjectVisible() 공개 메소드

public IsObjectVisible ( AxisAlignedBox box ) : bool
box Axiom.Math.AxisAlignedBox
리턴 bool

IsObjectVisible() 공개 메소드

public IsObjectVisible ( AxisAlignedBox box, FrustumPlane &culledBy ) : bool
box Axiom.Math.AxisAlignedBox
culledBy FrustumPlane
리턴 bool

IsObjectVisible() 공개 메소드

public IsObjectVisible ( Sphere sphere ) : bool
sphere Axiom.Math.Sphere
리턴 bool

IsObjectVisible() 공개 메소드

public IsObjectVisible ( Sphere sphere, FrustumPlane &culledBy ) : bool
sphere Axiom.Math.Sphere
culledBy FrustumPlane
리턴 bool

IsObjectVisible() 공개 메소드

public IsObjectVisible ( Vector3 vertex ) : bool
vertex Vector3
리턴 bool

IsObjectVisible() 공개 메소드

public IsObjectVisible ( Vector3 vertex, FrustumPlane &culledBy ) : bool
vertex Vector3
culledBy FrustumPlane
리턴 bool

LookAt() 공개 메소드

Specifies a target that the camera should look at.
public LookAt ( Vector3 target ) : void
target Vector3
리턴 void

NotifyCurrentCamera() 공개 메소드

public NotifyCurrentCamera ( Axiom camera ) : void
camera Axiom
리턴 void

SetWindowImpl() 보호된 메소드

Do actual window setting, using parameters set in SetWindow call.
The method is called after projection matrix each change.
protected SetWindowImpl ( ) : void
리턴 void

ToString() 공개 메소드

public ToString ( ) : string
리턴 string

UpdateRenderQueue() 공개 메소드

public UpdateRenderQueue ( RenderQueue queue ) : void
queue Axiom.Graphics.RenderQueue
리턴 void

dispose() 보호된 메소드

protected dispose ( bool disposeManagedResources ) : void
disposeManagedResources bool
리턴 void

프로퍼티 상세

isYawFixed 보호되어 있는 프로퍼티

Whether to yaw around a fixed axis.
protected bool isYawFixed
리턴 bool

recalculateWindow 보호되어 있는 프로퍼티

Was viewing window changed?
protected bool recalculateWindow
리턴 bool

useRenderingDistance 보호되어 있는 프로퍼티

Whether or not the rendering distance of objects should take effect for this camera
protected bool useRenderingDistance
리턴 bool

windowBottom 보호되어 있는 프로퍼티

Bottom window edge (window clip planes).
protected float windowBottom
리턴 float

windowLeft 보호되어 있는 프로퍼티

Left window edge (window clip planes).
protected float windowLeft
리턴 float

windowRight 보호되어 있는 프로퍼티

Right window edge (window clip planes).
protected float windowRight
리턴 float

windowTop 보호되어 있는 프로퍼티

Top window edge (window clip planes).
protected float windowTop
리턴 float

yawFixedAxis 보호되어 있는 프로퍼티

Fixed axis to yaw around.
protected Vector3 yawFixedAxis
리턴 Vector3