C# 클래스 Reactor.RCamera

상속: RSceneNode, ICamera, IDisposable
파일 보기 프로젝트 열기: reisergames/reactor-v1 1 사용 예제들

공개 메소드들

메소드 설명
Dispose ( ) : void
InView ( RActor node ) : bool
InView ( RMesh node ) : bool
InView ( RSceneNode node ) : bool
LevelRoll ( ) : void
LookAt ( R3DVECTOR target ) : void

Builds a look at style viewing matrix.

LookAt ( R3DVECTOR eye, R3DVECTOR target, R3DVECTOR up ) : void

Builds a look at style viewing matrix.

Move ( R3DVECTOR direction, R3DVECTOR distance ) : void

Moves the camera the specified distance in the specified direction.

Move ( float dx, float dy, float dz ) : void

Moves the camera by dx world units to the left or right; dy world units upwards or downwards; and dz world units forwards or backwards.

Perspective ( float fovx, float aspect, float znear, float zfar ) : void

Builds a perspective projection matrix based on a horizontal field of view.

RCamera ( ) : System

Constructs a new instance of the camera class. The camera will have a flight behavior, and will be initially positioned at the world origin looking down the world negative z axis.

Rotate ( float headingDegrees, float pitchDegrees, float rollDegrees ) : void

Rotates the camera. Positive angles specify counter clockwise rotations when looking down the axis of rotation towards the origin.

RotateFirstPerson ( float headingDegrees, float pitchDegrees ) : void

Rotates the camera for first person and spectator behaviors. Pitching is limited to 90 degrees straight up and down.

RotateFlight ( float headingDegrees, float pitchDegrees, float rollDegrees ) : void

Rotates the camera for flight behavior.

RotateOrbit ( float headingDegrees, float pitchDegrees, float rollDegrees ) : void

Rotates the camera for orbit behavior. Rotations are either about the camera's local y axis or the orbit target's y axis. The property PreferTargetYAxisOrbiting controls which rotation method to use.

RotateX ( float value ) : void
RotateY ( float value ) : void
RotateZ ( float value ) : void
SetClipPlanes ( float znear, float zfar ) : void
SetFieldOfView ( float value ) : void
UndoRoll ( ) : void

Undo any camera rolling by leveling the camera. When the camera is orbiting this method will cause the camera to become level with the orbit target.

Zoom ( float zoom, float minZoom, float maxZoom ) : void

Zooms the camera. This method functions differently depending on the camera's current behavior. When the camera is orbiting this method will move the camera closer to or further away from the orbit target. For the other camera behaviors this method will change the camera's horizontal field of view.

비공개 메소드들

메소드 설명
ChangeBehavior ( Behavior newBehavior ) : void

Change to a new camera behavior.

ChangeOrientation ( Microsoft.Xna.Framework.Quaternion newOrientation ) : void

Sets a new camera orientation.

UpdateViewMatrix ( ) : void

Rebuild the view matrix.

메소드 상세

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

InView() 공개 메소드

public InView ( RActor node ) : bool
node RActor
리턴 bool

InView() 공개 메소드

public InView ( RMesh node ) : bool
node RMesh
리턴 bool

InView() 공개 메소드

public InView ( RSceneNode node ) : bool
node RSceneNode
리턴 bool

LevelRoll() 공개 메소드

public LevelRoll ( ) : void
리턴 void

LookAt() 공개 메소드

Builds a look at style viewing matrix.
public LookAt ( R3DVECTOR target ) : void
target R3DVECTOR The target position to look at.
리턴 void

LookAt() 공개 메소드

Builds a look at style viewing matrix.
public LookAt ( R3DVECTOR eye, R3DVECTOR target, R3DVECTOR up ) : void
eye R3DVECTOR The camera position.
target R3DVECTOR The target position to look at.
up R3DVECTOR The up direction.
리턴 void

Move() 공개 메소드

Moves the camera the specified distance in the specified direction.
public Move ( R3DVECTOR direction, R3DVECTOR distance ) : void
direction R3DVECTOR Direction to move.
distance R3DVECTOR How far to move.
리턴 void

Move() 공개 메소드

Moves the camera by dx world units to the left or right; dy world units upwards or downwards; and dz world units forwards or backwards.
public Move ( float dx, float dy, float dz ) : void
dx float Distance to move left or right.
dy float Distance to move up or down.
dz float Distance to move forwards or backwards.
리턴 void

Perspective() 공개 메소드

Builds a perspective projection matrix based on a horizontal field of view.
public Perspective ( float fovx, float aspect, float znear, float zfar ) : void
fovx float Horizontal field of view in degrees.
aspect float The viewport's aspect ratio.
znear float The distance to the near clip plane.
zfar float The distance to the far clip plane.
리턴 void

RCamera() 공개 메소드

Constructs a new instance of the camera class. The camera will have a flight behavior, and will be initially positioned at the world origin looking down the world negative z axis.
public RCamera ( ) : System
리턴 System

Rotate() 공개 메소드

Rotates the camera. Positive angles specify counter clockwise rotations when looking down the axis of rotation towards the origin.
public Rotate ( float headingDegrees, float pitchDegrees, float rollDegrees ) : void
headingDegrees float Y axis rotation in degrees.
pitchDegrees float X axis rotation in degrees.
rollDegrees float Z axis rotation in degrees.
리턴 void

RotateFirstPerson() 공개 메소드

Rotates the camera for first person and spectator behaviors. Pitching is limited to 90 degrees straight up and down.
public RotateFirstPerson ( float headingDegrees, float pitchDegrees ) : void
headingDegrees float Y axis rotation angle.
pitchDegrees float X axis rotation angle.
리턴 void

RotateFlight() 공개 메소드

Rotates the camera for flight behavior.
public RotateFlight ( float headingDegrees, float pitchDegrees, float rollDegrees ) : void
headingDegrees float Y axis rotation angle.
pitchDegrees float X axis rotation angle.
rollDegrees float Z axis rotation angle.
리턴 void

RotateOrbit() 공개 메소드

Rotates the camera for orbit behavior. Rotations are either about the camera's local y axis or the orbit target's y axis. The property PreferTargetYAxisOrbiting controls which rotation method to use.
public RotateOrbit ( float headingDegrees, float pitchDegrees, float rollDegrees ) : void
headingDegrees float Y axis rotation angle.
pitchDegrees float X axis rotation angle.
rollDegrees float Z axis rotation angle.
리턴 void

RotateX() 공개 메소드

public RotateX ( float value ) : void
value float
리턴 void

RotateY() 공개 메소드

public RotateY ( float value ) : void
value float
리턴 void

RotateZ() 공개 메소드

public RotateZ ( float value ) : void
value float
리턴 void

SetClipPlanes() 공개 메소드

public SetClipPlanes ( float znear, float zfar ) : void
znear float
zfar float
리턴 void

SetFieldOfView() 공개 메소드

public SetFieldOfView ( float value ) : void
value float
리턴 void

UndoRoll() 공개 메소드

Undo any camera rolling by leveling the camera. When the camera is orbiting this method will cause the camera to become level with the orbit target.
public UndoRoll ( ) : void
리턴 void

Zoom() 공개 메소드

Zooms the camera. This method functions differently depending on the camera's current behavior. When the camera is orbiting this method will move the camera closer to or further away from the orbit target. For the other camera behaviors this method will change the camera's horizontal field of view.
public Zoom ( float zoom, float minZoom, float maxZoom ) : void
zoom float /// When orbiting this parameter is how far to move the camera. /// For the other behaviors this parameter is the new horizontal /// field of view. ///
minZoom float /// When orbiting this parameter is the min allowed zoom distance to /// the orbit target. For the other behaviors this parameter is the /// min allowed horizontal field of view. ///
maxZoom float /// When orbiting this parameter is the max allowed zoom distance to /// the orbit target. For the other behaviors this parameter is the max /// allowed horizontal field of view. ///
리턴 void