C# 클래스 Evbpc.Framework.Utilities.Camera

Represents an object that tracks and updates it's position based on another object, and can be used to determine where rendering should take place.
상속: ITrackableObject
파일 보기 프로젝트 열기: EBrown8534/Framework

공개 메소드들

메소드 설명
Camera ( ITrackableObject trackObject, RectangleF triggerBounds ) : Evbpc.Framework.Drawing

Creates a new instance of the Camera class from the specified TrackObject and TriggerBounds.

CenterCamera ( ) : void

This method will immediately move the Camera to center on the ITrackableObject. If you wish to pan smoothly, you should use CenterCamera(float).

This is effectively the same as the CenterCamera(float) method with an value of 0 specified.

CenterCamera ( float animationTime ) : void

This method will smoothly center the Camera to the ITrackableObject.

If a value of 0 is provided for the animationTime, then this has the same effect as the CenterCamera() method.

Contains ( ITrackableObject testObject, bool entirelyContained ) : bool

Determines if the current Camera instances contains the ITrackableObject.

MoveCamera ( Vector2F vector ) : void

Alters the Position of the current Camera instance by the specified Vector2F.

ResizeCamera ( Vector2F adjustment ) : void

Alters the Size of the current Camera instance by the specified Vector2F.

ScaleCamera ( float adjustment ) : void

Alters the Scale of the current Camera instance by the specified value.

SetPosition ( PointF position ) : void

Updates the Position of the current Camera instance to the value specified.

SetScale ( float scale ) : void

Updates the Scale of the current Camera instance to the specified value.

SetSize ( SizeF size ) : void

Updates the Size of the current Camera instance.

비공개 메소드들

메소드 설명
OnTrackableObjectChanged ( TrackableObjectChangedEventArgs e ) : void
trackObject_TrackableObjectChanged ( object sender, TrackableObjectChangedEventArgs e ) : void

메소드 상세

Camera() 공개 메소드

Creates a new instance of the Camera class from the specified TrackObject and TriggerBounds.
public Camera ( ITrackableObject trackObject, RectangleF triggerBounds ) : Evbpc.Framework.Drawing
trackObject ITrackableObject An to follow.
triggerBounds Evbpc.Framework.Drawing.RectangleF A that represents how close to the edge of the screen an must be to trigger panning.
리턴 Evbpc.Framework.Drawing

CenterCamera() 공개 메소드

This method will immediately move the Camera to center on the ITrackableObject. If you wish to pan smoothly, you should use CenterCamera(float).
This is effectively the same as the CenterCamera(float) method with an value of 0 specified.
public CenterCamera ( ) : void
리턴 void

CenterCamera() 공개 메소드

This method will smoothly center the Camera to the ITrackableObject.
If a value of 0 is provided for the animationTime, then this has the same effect as the CenterCamera() method.
public CenterCamera ( float animationTime ) : void
animationTime float A value that indicates how long (in seconds) it should take the to center on the . Smaller values will mean a quicker movement, but may also cause jumpy-ness.
리턴 void

Contains() 공개 메소드

Determines if the current Camera instances contains the ITrackableObject.
public Contains ( ITrackableObject testObject, bool entirelyContained ) : bool
testObject ITrackableObject The to test.
entirelyContained bool If true, will only return true if the testObject is entirely contained in the , otherwise will return true if any part of the testObject is contained.
리턴 bool

MoveCamera() 공개 메소드

Alters the Position of the current Camera instance by the specified Vector2F.
public MoveCamera ( Vector2F vector ) : void
vector Vector2F The distance to move the .
리턴 void

ResizeCamera() 공개 메소드

Alters the Size of the current Camera instance by the specified Vector2F.
public ResizeCamera ( Vector2F adjustment ) : void
adjustment Vector2F The representing how much to increase/decrease the .
리턴 void

ScaleCamera() 공개 메소드

Alters the Scale of the current Camera instance by the specified value.
public ScaleCamera ( float adjustment ) : void
adjustment float The value representing how much to zoom/unzoom the .
리턴 void

SetPosition() 공개 메소드

Updates the Position of the current Camera instance to the value specified.
public SetPosition ( PointF position ) : void
position Evbpc.Framework.Drawing.PointF A representing the new of the .
리턴 void

SetScale() 공개 메소드

Updates the Scale of the current Camera instance to the specified value.
public SetScale ( float scale ) : void
scale float The new value for the value of the .
리턴 void

SetSize() 공개 메소드

Updates the Size of the current Camera instance.
public SetSize ( SizeF size ) : void
size Evbpc.Framework.Drawing.SizeF A representing the new of the .
리턴 void