C# Class Axiom.Samples.MousePicking.MouseSelector

Object to assist in selecting and manipulating in game objects
Exibir arquivo Open project: WolfgangSt/axiom Class Usage Examples

Public Properties

Property Type Description
KeepPreviousSelection bool
Selection List
SelectionMode SelectionModeType
VerboseLogging bool

Public Methods

Method Description
Clear ( ) : void

public method to clear and reset the MouseSelector object

DeselectObjects ( ) : void

Public Method for deselecting all objects previously selected. once they are selected they stay selected till the object is cleared or another selection begins.

MouseMoved ( SharpInputSystem evt ) : void

public method to call when the mouse is moved

MousePressed ( SharpInputSystem evt, SharpInputSystem id ) : void

public method to call when the mouse is pressed

MouseReleased ( SharpInputSystem evt, SharpInputSystem id ) : void

public method to call when the mouse button is released

MouseSelector ( Camera camera, Axiom.Graphics.RenderWindow window ) : System

This is the Constructor for the MouseSelection object, scene must be fully initialized and valid camera and window must be passed in, generic name will be created

MouseSelector ( string name, Camera camera, Axiom.Graphics.RenderWindow window ) : System

This is the Constructor for the MouseSelection object, scene must be fully initialized and valid camera and window must be passed in, name must be passed

Private Methods

Method Description
Log ( string message ) : void

Logging via the LogManager

PerformSelectionWithMouseClick ( ) : void

private method for selection object that creates a box from a single mouse click

PerformSelectionWithSelectionBox ( Math first, Math second ) : void

private method for selection object that creates a box from the SelectionRectangle, stop variable is passed in

SelectObject ( Axiom.Core.MovableObject obj ) : void

Private method that adds any object not currently selected into the selection list

Method Details

Clear() public method

public method to clear and reset the MouseSelector object
public Clear ( ) : void
return void

DeselectObjects() public method

Public Method for deselecting all objects previously selected. once they are selected they stay selected till the object is cleared or another selection begins.
public DeselectObjects ( ) : void
return void

MouseMoved() public method

public method to call when the mouse is moved
public MouseMoved ( SharpInputSystem evt ) : void
evt SharpInputSystem
return void

MousePressed() public method

public method to call when the mouse is pressed
public MousePressed ( SharpInputSystem evt, SharpInputSystem id ) : void
evt SharpInputSystem MouseEventArgs
id SharpInputSystem MouseButtonID
return void

MouseReleased() public method

public method to call when the mouse button is released
public MouseReleased ( SharpInputSystem evt, SharpInputSystem id ) : void
evt SharpInputSystem
id SharpInputSystem
return void

MouseSelector() public method

This is the Constructor for the MouseSelection object, scene must be fully initialized and valid camera and window must be passed in, generic name will be created
public MouseSelector ( Camera camera, Axiom.Graphics.RenderWindow window ) : System
camera Axiom.Core.Camera Camera
window Axiom.Graphics.RenderWindow RenderWindow
return System

MouseSelector() public method

This is the Constructor for the MouseSelection object, scene must be fully initialized and valid camera and window must be passed in, name must be passed
public MouseSelector ( string name, Camera camera, Axiom.Graphics.RenderWindow window ) : System
name string string
camera Axiom.Core.Camera Camera
window Axiom.Graphics.RenderWindow RenderWindow
return System

Property Details

KeepPreviousSelection public_oe property

Keep previous selection
public bool KeepPreviousSelection
return bool

Selection public_oe property

Selected Objects
public List Selection
return List

SelectionMode public_oe property

Selection mode type property
public SelectionModeType SelectionMode
return SelectionModeType

VerboseLogging public_oe property

Toggles logging to standard axiom log file
public bool VerboseLogging
return bool