Allows recording and playback of a G3D::UprightSpline based on a G3D::Camera.
More...
Inherits G3D::Manipulator.
RECORD_INTERVAL_MODE: Automatically add one frame per second to the spline, reading from the camera.
RECORD_KEY_MODE: Add one frame every time the recordKey() is pressed.
PLAY_MODE: Move the frame() through the spline over time. Does not mutate the camera.
INACTIVE_MODE: Do nothing.
The manipulator begins in INACTIVE_MODE.
- Enumerator:
| RECORD_INTERVAL_MODE |
|
| RECORD_KEY_MODE |
|
| PLAY_MODE |
|
| INACTIVE_MODE |
|
| G3D::UprightSplineManipulator::UprightSplineManipulator |
( |
| ) |
|
|
protected |
| virtual Rect2D G3D::Widget::bounds |
( |
| ) |
const |
|
inlinevirtualinherited |
| const shared_ptr<Camera>& G3D::UprightSplineManipulator::camera |
( |
| ) |
const |
|
inline |
| shared_ptr<Camera> G3D::UprightSplineManipulator::camera |
( |
| ) |
|
|
inline |
| void G3D::UprightSplineManipulator::clear |
( |
| ) |
|
Destroys the current path.
| static Ref G3D::UprightSplineManipulator::create |
( |
const shared_ptr< class Camera > & |
c = shared_ptr< Camera >() | ) |
|
|
static |
| bool G3D::UprightSplineManipulator::cyclic |
( |
| ) |
const |
|
inline |
Does the spline wrap around to the first control point.
| virtual float G3D::Widget::depth |
( |
| ) |
const |
|
inlinevirtualinherited |
Inherited from Surface2D.
Controls the depth of objects when rendering. Subclasses may override this but it can interfere with the normal handling of rendering and event delivery. depth = 0 is usually the "top" widget and depth = 1 is usually the "bottom" widget.
Implements G3D::Surface2D.
Reimplemented in G3D::GuiWindow.
| virtual void G3D::Widget::fireEvent |
( |
const GEvent & |
event | ) |
|
|
virtualinherited |
| Mode G3D::UprightSplineManipulator::mode |
( |
| ) |
const |
| virtual void G3D::UprightSplineManipulator::onAI |
( |
| ) |
|
|
inlinevirtual |
| virtual bool G3D::UprightSplineManipulator::onEvent |
( |
const GEvent & |
event | ) |
|
|
virtual |
Returning true consumes the event and prevents other GModules from seeing it.
Motion events (GEventType::MOUSEMOTION, GEventType::JOYHATMOTION, JGEventType::OYBALLMOTION, and GEventType::JOYAXISMOTION) cannot be cancelled.
Reimplemented from G3D::Widget.
| virtual void G3D::UprightSplineManipulator::onNetwork |
( |
| ) |
|
|
inlinevirtual |
| virtual void G3D::UprightSplineManipulator::onUserInput |
( |
UserInput * |
ui | ) |
|
|
virtual |
| const Color3& G3D::UprightSplineManipulator::pathColor |
( |
| ) |
const |
|
inline |
| GKey G3D::UprightSplineManipulator::recordKey |
( |
| ) |
const |
|
inline |
| void G3D::UprightSplineManipulator::setCamera |
( |
const shared_ptr< Camera > & |
c | ) |
|
|
inline |
Sets the camera from which the frame will be read when recording.
Argument may be NULL, but recording cannot proceed until this is non-null.
This camera will also be used for playback
| void G3D::UprightSplineManipulator::setCyclic |
( |
bool |
b | ) |
|
|
inline |
| virtual void G3D::Widget::setDepth |
( |
float |
d | ) |
|
|
inlinevirtualinherited |
Called by the WidgetManager.
This is the depth that the Widget is expected to use when posed as a Surface2D. Subclasses may override or ignore this but it can interfere with the normal handling of rendering.
| void G3D::UprightSplineManipulator::setMode |
( |
Mode |
m | ) |
|
Setting the mode to RECORD_KEY_MODE and RECORD_INTERVAL_MODE require that a non-NULL camera have previously been set.
When in INACTIVE_MODE, time does not elapse for the manipulator.
| void G3D::UprightSplineManipulator::setPathColor |
( |
const Color3 & |
c | ) |
|
|
inline |
| void G3D::UprightSplineManipulator::setRecordKey |
( |
GKey |
k | ) |
|
|
inline |
| void G3D::UprightSplineManipulator::setShowPath |
( |
bool |
b | ) |
|
|
inline |
If set to true, the camera's path is shown as a glowing curve.
| void G3D::UprightSplineManipulator::setTime |
( |
double |
t | ) |
|
Time since the beginning of recording or playback.
| bool G3D::UprightSplineManipulator::showPath |
( |
| ) |
const |
|
inline |
Sorts from farthest to nearest.
Calls sort, RenderDevice::push2D, and then render on all elements.
| const UprightSpline& G3D::UprightSplineManipulator::spline |
( |
| ) |
const |
|
inline |
Returns the underlying spline.
| int G3D::UprightSplineManipulator::splineSize |
( |
| ) |
const |
|
inline |
Number of control points.
| double G3D::UprightSplineManipulator::time |
( |
| ) |
const |
|
inline |
| virtual OSWindow* G3D::Widget::window |
( |
| ) |
const |
|
virtualinherited |
| shared_ptr<class Camera> G3D::UprightSplineManipulator::m_camera |
|
protected |
| float G3D::Widget::m_depth |
|
protectedinherited |
| Mode G3D::UprightSplineManipulator::m_mode |
|
protected |
| Color3 G3D::UprightSplineManipulator::m_pathColor |
|
protected |
| GKey G3D::UprightSplineManipulator::m_recordKey |
|
protected |
| const float G3D::UprightSplineManipulator::m_sampleRate |
|
protected |
| bool G3D::UprightSplineManipulator::m_showPath |
|
protected |
| RealTime G3D::UprightSplineManipulator::m_time |
|
protected |
Current time during playback.
Referenced by time().