A default camera control.
sealed class
|
CameraControl
|
extends
|
CameraControlBase
|
The camera can be controlled with the mouse (see CameraControlDrag) and with typical WASD controls (see CameraControlFree).
Returns current world-space anchor point.
public
override
property
|
Anchor
{
get
}
|
||
type
|
Vec3D
|
||
value
|
The current anchor point or Undefined is this camera control is not active. | ||
overrides
|
CameraControlBase.Anchor
|
Remarks:
This property is purely informational and has no functional relevance.
The aggregated CameraControlDrag object.
public
property
|
Drag
{
get
}
|
||
type
|
CameraControlDrag
|
||
value
|
|
The aggregated camera control. |
The aggregated CameraControlFree object.
public
property
|
Free
{
get
}
|
||
type
|
CameraControlFree
|
||
value
|
|
The aggregated camera control. |
Is the camera control currently in free mode?
public
property
|
IsFree
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
the
control
is
in
free
mode,
false
if
not. |
The mouse cursor that is most appropriate for the current state of this camera control.
public
override
property
|
MouseCursor
{
get
}
|
||
type
|
MouseCursor
|
||
value
|
The mouse cursor. | ||
overrides
|
CameraControlBase.MouseCursor
|
Remarks:
This property is purely informational and has no functional relevance.
Should the mouse be captured, because this input consumer only processes relative input?
public
override
property
|
ShouldCaptureMouse
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
the
mouse
should
be
captured,
false
if
not. |
||
overrides
|
CameraControlBase.ShouldCaptureMouse
|
See also:
IApplicationWindow.MouseCapturedThe ICameraViewport object that provides the view into the world.
public
override
property
|
View
{
get
set
}
|
||
type
|
ICameraViewport
|
||
value
|
The
viewport
object.
If
null ,
the
camera
control
will
be
disabled. |
||
overrides
|
CameraControlBase.View
|
The ICameraWorld object that provides the world.
public
override
property
|
World
{
get
set
}
|
||
type
|
ICameraWorld
|
||
value
|
The
world
object.
If
null ,
the
camera
control
will
be
disabled. |
||
overrides
|
CameraControlBase.World
|
Creates a new instance of CameraControl.
public
constructor
|
CameraControl
(ICameraViewport view = null,
ICameraWorld world = null)
|
||
params
|
view
|
The
initial
ICameraViewport
object
that
provides
the
view
into
the
world.
Defaults
to
null .
|
|
world
|
The
initial
ICameraWorld
object
that
provides
the
world.
Defaults
to
null .
|
Stops the current camera control gesture.
public
override
method
|
Cancel
()
|
||
overrides
|
CameraControlBase.Cancel
|
Consumes the given user input event.
public
override
method
|
ConsumeInput
(InputEvent inputEvent)
|
||
type
|
bool
|
||
params
|
inputEvent
|
The user input event. | |
returns
|
true
if
the
input
event
has
been
consumed,
false
if
not. |
||
overrides
|
CameraControlBase.ConsumeInput
|
Remarks:
Input events are provided to an IInputConsumer object only if it has the input focus (see FocusGained and FocusLost). Mouse events are provided when the mouse cursor is inside of the input bounds (MouseEnter and MouseLeave). The Closing event can be provided at any time.
Attaches this input consumer to the given input state object.
public
override
method
|
InputAttach
(IInputState input)
|
||
params
|
input
|
[not-null]
|
The input state object. |
overrides
|
CameraControlBase.InputAttach
|
Remarks:
The input state object provides a snapshot of the input keys and buttons. It should not be used to detect up/down/click events.
Detached this input consumer from its input state object.
public
override
method
|
InputDetach
()
|
||
overrides
|
CameraControlBase.InputDetach
|
This method is called once per application frame.
public
override
method
|
UpdateFrameTime
(float32 time)
|
||
type
|
bool
|
||
params
|
time
|
[>0]
|
The amount of time that has elapsed since the last frame, in seconds. |
returns
|
true
if
the
object
needs
to
be
presented
again,
false
if
the
current
presentation
is
still
valid.
|
||
overrides
|
CameraControlBase.UpdateFrameTime
|