C# 클래스 FlatRedBall.Camera

상속: FlatRedBall.PositionedObject
파일 보기 프로젝트 열기: vchelaru/FlatRedBall 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
BackgroundColor Color
DrawToScreen bool
RenderOrder List
UpVector Vector3

공개 메소드들

메소드 설명
AbsoluteBottomYEdgeAt ( float absoluteZ ) : float
AbsoluteLeftXEdgeAt ( float absoluteZ ) : float
AbsoluteRightXEdgeAt ( float absoluteZ ) : float
AbsoluteTopYEdgeAt ( float absoluteZ ) : float
FixAspectRatioXConstant ( ) : void
FixAspectRatioYConstant ( ) : void

Sets the aspectRatio to match the width/height of the area that the camera is drawing to.

This is usually used in applications with split screen or when on a widescreen display.

GetZDistanceForPixelPerfect ( ) : float
IsPointInView ( double x, double y, double absoluteZ ) : bool
IsSpriteInView ( Sprite sprite ) : bool
IsSpriteInView ( Sprite sprite, bool relativeToCamera ) : bool
IsTextInView ( Text text ) : bool
IsXInView ( double x, double absoluteZ ) : bool

Determines if the X value is in view, assuming the camera is viewing down the Z axis.

Currently, this method assumes viewing down the Z axis.

IsYInView ( double y, double absoluteZ ) : bool

Determines if the Y value is in view, assuming the camera is viewing down the Z axis.

Currently, this method assumes viewing down the Z axis.

PixelsPerUnitAt ( Vector3 &absolutePosition ) : float
PixelsPerUnitAt ( Vector3 &absolutePosition, float fieldOfView, bool orthogonal, float orthogonalHeight ) : float
PixelsPerUnitAt ( float absoluteZ ) : float

Returns the number of pixels per unit at the given absolute Z value. Assumes that the Camera is unrotated.

If using the PixelsPerUnitAt for a rotated camera, use the overload which takes a Vector3 argument.

RelativeXEdgeAt ( float absoluteZ ) : float
RelativeXEdgeAt ( float absoluteZ, float fieldOfView, float aspectRatio, bool orthogonal, float orthogonalWidth ) : float
RelativeYEdgeAt ( float absoluteZ ) : float
RelativeYEdgeAt ( float absoluteZ, float fieldOfView, float aspectRatio, bool orthogonal, float orthogonalHeight ) : float
UsePixelCoordinates ( bool moveCornerToOrigin, int desiredWidth, int desiredHeight ) : void

Sets the camera to Orthogonal, sets the OrthogonalWidth and OrthogonalHeight to match the argument values, and can move the so the bottom-left corner of the screen is at the origin.

UsePixelCoordinates3D ( float zToMakePixelPerfect ) : void
WorldXAt ( float zPosition, bool overridingOrthogonal, float overridingOrthogonalWidth, float screenX ) : float
WorldXAt ( float screenX, float zPosition ) : float
WorldXAt ( float screenX, float zPosition, Layer layer ) : float
WorldXAt ( float screenX, float zPosition, bool overridingOrthogonal, float overridingOrthogonalWidth ) : float
WorldYAt ( float zPosition, bool orthogonal, float orthogonalHeight, float screenY ) : float
WorldYAt ( float screenY, float zPosition ) : float
WorldYAt ( float screenY, float zPosition, Layer layer ) : float
WorldYAt ( float screenY, float zPosition, bool overridingOrthogonal, float overridingOrthogonalHeight ) : float

비공개 메소드들

메소드 설명
Color ( ) : System
GetWorldXGivenHorizontalPercentage ( float zPosition, bool overridingOrthogonal, float overridingOrthogonalWidth, float horizontalPercentage ) : float

메소드 상세

AbsoluteBottomYEdgeAt() 공개 메소드

public AbsoluteBottomYEdgeAt ( float absoluteZ ) : float
absoluteZ float
리턴 float

AbsoluteLeftXEdgeAt() 공개 메소드

public AbsoluteLeftXEdgeAt ( float absoluteZ ) : float
absoluteZ float
리턴 float

AbsoluteRightXEdgeAt() 공개 메소드

public AbsoluteRightXEdgeAt ( float absoluteZ ) : float
absoluteZ float
리턴 float

AbsoluteTopYEdgeAt() 공개 메소드

public AbsoluteTopYEdgeAt ( float absoluteZ ) : float
absoluteZ float
리턴 float

FixAspectRatioXConstant() 공개 메소드

public FixAspectRatioXConstant ( ) : void
리턴 void

FixAspectRatioYConstant() 공개 메소드

Sets the aspectRatio to match the width/height of the area that the camera is drawing to.
This is usually used in applications with split screen or when on a widescreen display.
public FixAspectRatioYConstant ( ) : void
리턴 void

GetZDistanceForPixelPerfect() 공개 메소드

public GetZDistanceForPixelPerfect ( ) : float
리턴 float

IsPointInView() 공개 메소드

public IsPointInView ( double x, double y, double absoluteZ ) : bool
x double
y double
absoluteZ double
리턴 bool

IsSpriteInView() 공개 메소드

public IsSpriteInView ( Sprite sprite ) : bool
sprite Sprite
리턴 bool

IsSpriteInView() 공개 메소드

public IsSpriteInView ( Sprite sprite, bool relativeToCamera ) : bool
sprite Sprite
relativeToCamera bool
리턴 bool

IsTextInView() 공개 메소드

public IsTextInView ( Text text ) : bool
text Text
리턴 bool

IsXInView() 공개 메소드

Determines if the X value is in view, assuming the camera is viewing down the Z axis.
Currently, this method assumes viewing down the Z axis.
public IsXInView ( double x, double absoluteZ ) : bool
x double The absolute X position of the point.
absoluteZ double The absolute Z position of the point.
리턴 bool

IsYInView() 공개 메소드

Determines if the Y value is in view, assuming the camera is viewing down the Z axis.
Currently, this method assumes viewing down the Z axis.
public IsYInView ( double y, double absoluteZ ) : bool
y double The absolute Y position of the point.
absoluteZ double The absolute Z position of the point.
리턴 bool

PixelsPerUnitAt() 공개 메소드

public PixelsPerUnitAt ( Vector3 &absolutePosition ) : float
absolutePosition Vector3
리턴 float

PixelsPerUnitAt() 공개 메소드

public PixelsPerUnitAt ( Vector3 &absolutePosition, float fieldOfView, bool orthogonal, float orthogonalHeight ) : float
absolutePosition Vector3
fieldOfView float
orthogonal bool
orthogonalHeight float
리턴 float

PixelsPerUnitAt() 공개 메소드

Returns the number of pixels per unit at the given absolute Z value. Assumes that the Camera is unrotated.
If using the PixelsPerUnitAt for a rotated camera, use the overload which takes a Vector3 argument.
public PixelsPerUnitAt ( float absoluteZ ) : float
absoluteZ float The absolute Z position.
리턴 float

RelativeXEdgeAt() 공개 메소드

public RelativeXEdgeAt ( float absoluteZ ) : float
absoluteZ float
리턴 float

RelativeXEdgeAt() 공개 메소드

public RelativeXEdgeAt ( float absoluteZ, float fieldOfView, float aspectRatio, bool orthogonal, float orthogonalWidth ) : float
absoluteZ float
fieldOfView float
aspectRatio float
orthogonal bool
orthogonalWidth float
리턴 float

RelativeYEdgeAt() 공개 메소드

public RelativeYEdgeAt ( float absoluteZ ) : float
absoluteZ float
리턴 float

RelativeYEdgeAt() 공개 메소드

public RelativeYEdgeAt ( float absoluteZ, float fieldOfView, float aspectRatio, bool orthogonal, float orthogonalHeight ) : float
absoluteZ float
fieldOfView float
aspectRatio float
orthogonal bool
orthogonalHeight float
리턴 float

UsePixelCoordinates() 공개 메소드

Sets the camera to Orthogonal, sets the OrthogonalWidth and OrthogonalHeight to match the argument values, and can move the so the bottom-left corner of the screen is at the origin.
public UsePixelCoordinates ( bool moveCornerToOrigin, int desiredWidth, int desiredHeight ) : void
moveCornerToOrigin bool Whether the camera should be repositioned /// so the bottom left is at the origin.
desiredWidth int The desired unit width of the view.
desiredHeight int The desired unit height of the view.
리턴 void

UsePixelCoordinates3D() 공개 메소드

public UsePixelCoordinates3D ( float zToMakePixelPerfect ) : void
zToMakePixelPerfect float
리턴 void

WorldXAt() 공개 메소드

public WorldXAt ( float zPosition, bool overridingOrthogonal, float overridingOrthogonalWidth, float screenX ) : float
zPosition float
overridingOrthogonal bool
overridingOrthogonalWidth float
screenX float
리턴 float

WorldXAt() 공개 메소드

public WorldXAt ( float screenX, float zPosition ) : float
screenX float
zPosition float
리턴 float

WorldXAt() 공개 메소드

public WorldXAt ( float screenX, float zPosition, Layer layer ) : float
screenX float
zPosition float
layer Layer
리턴 float

WorldXAt() 공개 메소드

public WorldXAt ( float screenX, float zPosition, bool overridingOrthogonal, float overridingOrthogonalWidth ) : float
screenX float
zPosition float
overridingOrthogonal bool
overridingOrthogonalWidth float
리턴 float

WorldYAt() 공개 메소드

public WorldYAt ( float zPosition, bool orthogonal, float orthogonalHeight, float screenY ) : float
zPosition float
orthogonal bool
orthogonalHeight float
screenY float
리턴 float

WorldYAt() 공개 메소드

public WorldYAt ( float screenY, float zPosition ) : float
screenY float
zPosition float
리턴 float

WorldYAt() 공개 메소드

public WorldYAt ( float screenY, float zPosition, Layer layer ) : float
screenY float
zPosition float
layer Layer
리턴 float

WorldYAt() 공개 메소드

public WorldYAt ( float screenY, float zPosition, bool overridingOrthogonal, float overridingOrthogonalHeight ) : float
screenY float
zPosition float
overridingOrthogonal bool
overridingOrthogonalHeight float
리턴 float

프로퍼티 상세

BackgroundColor 공개적으로 프로퍼티

public Color BackgroundColor
리턴 Color

DrawToScreen 공개적으로 프로퍼티

Whether or not this camera should be drawn to the screen
public bool DrawToScreen
리턴 bool

RenderOrder 공개적으로 프로퍼티

Defines the rendering order for this camera
public List RenderOrder
리턴 List

UpVector 공개적으로 프로퍼티

public Vector3 UpVector
리턴 Vector3