C# Class OpenRA.Graphics.Viewport

Datei anzeigen Open project: pchote/OpenRA Class Usage Examples

Public Properties

Property Type Description
LastMousePos int2
TicksSinceLastMove long

Public Methods

Method Description
Center ( IEnumerable actors ) : void
Center ( WPos pos ) : void
GetBlockedDirections ( ) : ScrollDirection
GetScissorBounds ( bool insideBounds ) : Rectangle
Scroll ( float2 delta, bool ignoreBorders ) : void
ViewToWorld ( int2 view ) : CPos
ViewToWorldPx ( int2 view ) : int2
Viewport ( WorldRenderer wr, Map map ) : System
WorldToViewPx ( int2 world ) : int2

Private Methods

Method Description
CalculateVisibleCells ( bool insideBounds ) : ProjectedCellRegion
CandidateMouseoverCells ( int2 world ) : IEnumerable

Returns an unfiltered list of all cells that could potentially contain the mouse cursor

ClosestTo ( float collection, float target ) : float

Method Details

Center() public method

public Center ( IEnumerable actors ) : void
actors IEnumerable
return void

Center() public method

public Center ( WPos pos ) : void
pos WPos
return void

GetBlockedDirections() public method

public GetBlockedDirections ( ) : ScrollDirection
return ScrollDirection

GetScissorBounds() public method

public GetScissorBounds ( bool insideBounds ) : Rectangle
insideBounds bool
return System.Drawing.Rectangle

Scroll() public method

public Scroll ( float2 delta, bool ignoreBorders ) : void
delta float2
ignoreBorders bool
return void

ViewToWorld() public method

public ViewToWorld ( int2 view ) : CPos
view int2
return CPos

ViewToWorldPx() public method

public ViewToWorldPx ( int2 view ) : int2
view int2
return int2

Viewport() public method

public Viewport ( WorldRenderer wr, Map map ) : System
wr WorldRenderer
map Map
return System

WorldToViewPx() public method

public WorldToViewPx ( int2 world ) : int2
world int2
return int2

Property Details

LastMousePos public_oe static_oe property

public static int2 LastMousePos
return int2

TicksSinceLastMove public_oe static_oe property

public static long TicksSinceLastMove
return long