HyperspaceExplorer 0.7.1
Classes | Public Member Functions | Private Slots | Private Member Functions | Private Attributes | Static Private Attributes | Friends
C4DView Class Reference

Displays and manipulates four-dimensional Functions in a QGLWidget. More...

#include <4DView.h>

Inheritance diagram for C4DView:
Inheritance graph
[legend]
Collaboration diagram for C4DView:
Collaboration graph
[legend]

List of all members.

Classes

class  CustomFunctionSlot
 Class template to outsource redundant code for customized functions. More...
class  Menu4D
 The menu for the C4DView and handlers for menu events. More...
class  MouseHandler4D
 Inner class to C4DView which handles the mouse events. More...

Public Member Functions

 C4DView (QWidget *=0)
 C4DView constructor.
virtual ~C4DView ()
 C4DView destructor.
virtual void applyTransform (const VecMath::Rotation< 4 > &R, const VecMath::Vector< 4 > &T)
 Implementation of UI::View::applyTransform.
virtual void animate ()
 Implementation of UI::View::animate.
virtual void setSize (unsigned w, unsigned h)
 Implementation of UI::View::setSize.
virtual void setBackground (const Color &)
 Re-Implementation of UI::ViewImpl::setBackground.
virtual void setColors (bool)
 Re-Implementation of UI::ViewImpl::setColors.
virtual void setCoordinates (bool)
 Re-Implementation of UI::ViewImpl::setCoordinates.
virtual void setFog (bool)
 Re-Implementation of UI::ViewImpl::setFog.
virtual void setHyperfog (bool)
 Re-Implementation of UI::ViewImpl::setHyperfog.
virtual void setLighting (bool)
 Re-Implementation of UI::ViewImpl::setLighting.
virtual void setShading (bool)
 Re-Implementation of UI::ViewImpl::setShading.
virtual void setTransparence (bool)
 Re-Implementation of UI::ViewImpl::setTransparence.
virtual void drawVertex (const VecMath::Vector< 4 > &x, const VecMath::Vector< 3 > &xscr)
 Draws a single point.
virtual void drawLine (const VecMath::Vector< 4 > &x0, const VecMath::Vector< 4 > &x1, const VecMath::Vector< 3 > &xscr0, const VecMath::Vector< 3 > &xscr1)
 Draws a line between two points.
virtual void drawQuadrangle (const VecMath::Vector< 4 > &x0, const VecMath::Vector< 4 > &x1, const VecMath::Vector< 4 > &x2, const VecMath::Vector< 4 > &x3, const VecMath::Vector< 3 > &xscr0, const VecMath::Vector< 3 > &xscr1, const VecMath::Vector< 3 > &xscr2, const VecMath::Vector< 3 > &xscr3)
 Draws a quadrangle using four vertices projected to 3D and their four-space originals.
virtual void drawPolygon (const std::vector< VecMath::Vector< 4 > > &x, const std::vector< VecMath::Vector< 3 > > &xscr)
 drawPolygon() is a convenience function that may not be implemented in all Views - this implementation throws an exception
double Benchmark3D (int, double, double, double, bool=true)
 rotate in 3D 360 degrees
double Benchmark4D (int, double, double, double, bool=true)
 rotate in 4D 360 degrees

Private Slots

virtual void ApplyChanges (const ParameterMap &)
 Implementation of UI::View::ApplyChanges.
void OnAnimationTimer ()
 Animation timer event handler.

Private Member Functions

void Transform (const VecMath::Rotation< 4 > &R, const VecMath::Vector< 4 > &T)
 Set the transform for the displayed object (but don't draw it yet)
void Transform ()
 Overloaded function executing the transform to the default state.
void Project ()
 Execute the projection into three-space (but don't draw it yet either)
void PreRedraw ()
 Draw the projection into an OpenGL display list, but not yet on screen.
void Redraw ()
 Draw the transformed and projected function onto the screen.
void RenderScene ()
 Wrapper for displaying OpenGL display lists.
void InitCross ()
 Initialize structures to display a four-dimensional coordinate cross.
void SetupDepthCue (bool)
 Switch 3D depth cue on and off.
void DrawCoordinates (void)
 draw the coordinate cross (on screen or int GL list) */
void StartAnimation ()
 Err well.. just that!
void StopAnimation ()
 you guessed it
void RandomAnimation (bool)
 Starts a random animation.
QPixmap makePixmap ()
 Make a pixmap to to be rendered by the GL widget, and render it.
void writeFrame ()
void checkAnglesForOverflow ()
 Keep all rotation angles in the interval [-360 degrees, 360 degrees].
void UpdateStatus (QString="")
 display some info about current object and its transformations
void AssignValues (const std::shared_ptr< Displayable > &)
 Called whenever an object or the parameters have changed.
double Size ()
 Get size of displayed area.
virtual void mouseMoveEvent (QMouseEvent *)
 Mouse move event handler, reimplemented from QWidget.
virtual void mousePressEvent (QMouseEvent *)
 Mouse press event handler, reimplemented from QWidget.
virtual void mouseReleaseEvent (QMouseEvent *)
 Mouse release event handler, reimplemented from QWidget.
virtual void mouseDoubleClickEvent (QMouseEvent *)
 Double click event handler, reimplemented from QWidget.
virtual void paintEvent (QPaintEvent *=0)
 Paint event handler, reimplemented from QGLWidget.
virtual void resizeEvent (QResizeEvent *)
 Resizing routine, reimplemented from QGLWidget.
virtual void initializeGL (void)
 Called once before the first call to paintGL() or resizeGL(), reimplemented from QGLWidget.
virtual void resizeGL (int, int)
 GL stuff needed in addition to resizeEvent(). Reimplemented from QGLWidget.
void setm_rot (const VecMath::Rotation< 3, GLdouble > &_r)
 Set the current 3D rotation state.
const VecMath::Rotation
< 3, GLdouble > & 
m_rot ()
void addm_rot (const VecMath::Rotation< 3, GLdouble > &_dmr)
 Add a translation to the current 3D rotation state.
void setm_trans (const VecMath::Vector< 3, GLdouble > &_t)
 Set the current 3D translation state.
const VecMath::Vector
< 3, GLdouble > & 
m_trans ()
void addm_trans (const VecMath::Vector< 3, GLdouble > &_dmt)
 Add a translation to the current 3D translation state.
void setanimationFrame (unsigned b)
 Set current frame in animation.
unsigned animationFrame () const
void setanimationMaxFrames (unsigned b)
 Set limit for saved animation frames.
unsigned animationMaxFrames () const
unsigned animation_fps () const
void setObjectList (GLint b)
 Set a GLList for the display of the object.
GLint ObjectList () const
void setCoordinateCross (GLint b)
 Set a GLList for the display of the coordinates.
GLint CoordinateCross () const
void setAnimated (bool b)
 Set if image is currently animated.
bool Animated () const
void setCurrentlyRendering (bool b)
 Set if currently rendering an image.
bool CurrentlyRendering () const
void setAnimationTimer (QTimer *b)
 Set timer that times out every X ms to draw new animation frame.
QTimer * AnimationTimer () const
void setAnimateRandomTimer (QTimer *b)
 Set timer that times out to change rotation direction.
QTimer * AnimateRandomTimer () const
void setValues (UI::Dialogs::ValuesDialogImpl *b)
 Set dialog to enter function parameters.
UI::Dialogs::ValuesDialogImplValues () const
void setMenu (Menu4D *b)
 Set the popup menu and menu bar.
Menu4DMenu () const
void setMouseHandler (MouseHandler4D *m)
 Set handler to delegate mouse events to.
MouseHandler4DMouseHandler () const
void SetupDepthCue (float, float)
 Adjust parameters for depth cue.
void InitLight (void)
 OpenGL initialization for light(s)
void InitShade (void)
 OpenGL initialization for shading (gouraud or flat shading)
void InitFog (void)
 OpenGL initialization for fog.
void InitTransparence (void)
 OpenGL initialization for transparence.

Private Attributes

VecMath::Rotation< 3, GLdouble > _rot
 rotation in X, Y and Z
VecMath::Vector< 3, GLdouble > _trans
 translation in X and Y, Z coordinate of camera (distance from object)
unsigned _animationFrame
 current frame in animation
unsigned _animationMaxFrames
 limit for saved animation frames
const unsigned _animation_fps
 frames per second for animations
bool _animated
 if true, image is currently animated
bool _currentlyRendering
 if true, currently rendering an image
GLint _objectList
 a GLList for the display of the object
GLint _coordinateCross
 a GLList for the display of the coordinates
QTimer * _animationTimer
 times out every X ms to draw new animation frame
QTimer * _animateRandomTimer
 times out to change rotation direction
UI::Dialogs::ValuesDialogImpl_values
 dialog to enter function parameters
Menu4D_menu
 the popup menu and menu bar
MouseHandler4D_mouseHandler
 handler to delegate mouse events to
std::vector< std::vector
< VecMath::Vector< 4 > > > 
_cross
 endpoints of the lines constituting the 4D coordinate cross
std::vector< std::vector
< VecMath::Vector< 4 > > > 
_crossTrans
 endpoints of the lines constituting the transformed 4D coordinates
std::vector< std::vector
< VecMath::Vector< 3 > > > 
_crossScr
 endpoints of the lines constituting the projected 4D coordinates

Static Private Attributes

static std::string _helpFile = "Hyperspace_Explorer_Help.html"
 Path to the user docs HTML file.

Friends

class CustomFunctionSlot< CustomFunction >
 Factory object, Menu callback, need access to ValuesDialog, F and Redraw.
class CustomFunctionSlot< CustomPolarFunction >
 Factory object, Menu callback, need access to ValuesDialog, F and Redraw.
class CustomFunctionSlot< CustomComplexFunction >
 Factory object, Menu callback, need access to ValuesDialog, F and Redraw.
class CustomFunctionSlot< CustomSurface >
 Factory object, Menu callback, need access to ValuesDialog, F and Redraw.
class FunctionSlotHelper
class SurfaceSlotHelper
class SlotHelper

Detailed Description

Displays and manipulates four-dimensional Functions in a QGLWidget.

This class is much too fat and will be split into parts wherever possible

Author:
Helge Preuss <lene.preuss@gmail.com>

Constructor & Destructor Documentation

C4DView::C4DView ( QWidget *  parent = 0)

C4DView constructor.

does a lot of initialization to (usually sensible) hardcoded default values, initializes the coordinate cross object (which could well be a class on its own), creates the necessary timers and menus, and finally creates a Hypercube as the default object to display

Parameters:
parentparent QWidget, defaults to NULL

References C4DView::Menu4D::addToMenuBar(), AnimationTimer(), ApplyChanges(), AssignValues(), UI::ViewImpl::F(), InitCross(), Loki::SingletonHolder< T, CreationPolicy >::Instance(), Menu(), OnAnimationTimer(), Redraw(), setAnimateRandomTimer(), setAnimationTimer(), C4DView::Menu4D::setColorManager(), UI::ViewImpl::setF(), setLighting(), setMenu(), setMouseHandler(), this, and Values().

Here is the call graph for this function:


Member Function Documentation

bool C4DView::Animated ( ) const [inline, private]
Returns:
whether image is currently animated

References _animated.

QTimer* C4DView::AnimateRandomTimer ( ) const [inline, private]
Returns:
Timer that times out to change rotation direction

References _animateRandomTimer.

Referenced by RandomAnimation(), and StopAnimation().

Here is the caller graph for this function:

unsigned C4DView::animation_fps ( ) const [inline, private]
Returns:
frames per second for animations

References _animation_fps.

Referenced by StartAnimation().

Here is the caller graph for this function:

unsigned C4DView::animationFrame ( ) const [inline, private]
Returns:
current frame in animation

References _animationFrame.

Referenced by OnAnimationTimer(), and writeFrame().

Here is the caller graph for this function:

unsigned C4DView::animationMaxFrames ( ) const [inline, private]
Returns:
limit for saved animation frames

References _animationMaxFrames.

Referenced by OnAnimationTimer(), and writeFrame().

Here is the caller graph for this function:

QTimer* C4DView::AnimationTimer ( ) const [inline, private]
Returns:
Timer that times out every X ms to draw new animation frame

References _animationTimer.

Referenced by C4DView(), RandomAnimation(), StartAnimation(), and StopAnimation().

Here is the caller graph for this function:

void C4DView::ApplyChanges ( const ParameterMap parms) [private, virtual, slot]

Implementation of UI::View::ApplyChanges.

Called whenever an object or the parameters have changed.

Sets the parameters, applies the changed parameters to the function object and redraws it

Implements UI::View.

References UI::ViewImpl::F(), std::shared_ptr< _Tp >::get(), Loki::SingletonHolder< T, CreationPolicy >::Instance(), UI::Dialogs::ValuesDialogImpl::print(), Redraw(), Displayable::SetParameters(), ParameterMap::toString(), Transform(), and Values().

Referenced by C4DView().

Here is the call graph for this function:

Here is the caller graph for this function:

void C4DView::AssignValues ( const std::shared_ptr< Displayable > &  F) [private]

Called whenever an object or the parameters have changed.

Changes the display on the status bar and the number and names of the parameters and grid parameters on the ValuesDialog

Parameters:
Fthe Function object for which the ValuesDialog is changed

References std::shared_ptr< _Tp >::get(), Loki::SingletonHolder< T, CreationPolicy >::Instance(), UI::Dialogs::ValuesDialogImpl::setFunction(), Transform(), UpdateStatus(), and Values().

Referenced by C4DView(), C4DView::CustomFunctionSlot< function >::createCustomFunction(), and C4DView::CustomFunctionSlot< function >::createCustomSurface().

Here is the call graph for this function:

Here is the caller graph for this function:

GLint C4DView::CoordinateCross ( ) const [inline, private]
Returns:
GLList for the display of the coordinates

References _coordinateCross.

Referenced by PreRedraw(), and RenderScene().

Here is the caller graph for this function:

bool C4DView::CurrentlyRendering ( ) const [inline, private]
Returns:
whether currently rendering an image

References _currentlyRendering.

void C4DView::DrawCoordinates ( void  ) [private]

draw the coordinate cross (on screen or int GL list) */

References _crossScr, Util::glVertex(), and Loki::SingletonHolder< T, CreationPolicy >::Instance().

Referenced by PreRedraw().

Here is the call graph for this function:

Here is the caller graph for this function:

void C4DView::drawLine ( const VecMath::Vector< 4 > &  x0,
const VecMath::Vector< 4 > &  x1,
const VecMath::Vector< 3 > &  xscr0,
const VecMath::Vector< 3 > &  xscr1 
) [virtual]

Draws a line between two points.

Parameters:
x0Location of first point in 4-space. Possibly needed for coloring information.
x1Location of second point in 4-space. Possibly needed for coloring information.
xscr0Location of first point projected int 3D.
xscr1Location of second point projected int 3D.
Todo:
Limit the number of arguments...

Implements UI::View.

void C4DView::drawVertex ( const VecMath::Vector< 4 > &  x,
const VecMath::Vector< 3 > &  xscr 
) [virtual]

Draws a single point.

Parameters:
xLocation of the point in 4-space. Possibly needed for coloring information.
xscrLocation of the point projected int 3D.
Todo:

Should it draw a point or just define one, e.g. for polygons?

Abstract from the original vertex and only use the projected one?

Implements UI::View.

References Util::glVertex(), and Loki::SingletonHolder< T, CreationPolicy >::Instance().

Referenced by drawPolygon(), and drawQuadrangle().

Here is the call graph for this function:

Here is the caller graph for this function:

void C4DView::initializeGL ( void  ) [private, virtual]

Called once before the first call to paintGL() or resizeGL(), reimplemented from QGLWidget.

Now this is not as boring as it seems, because further work has to be done here: Set up lights, shading, depth cue and transparence, wireframe mode, background, and position the object wrt the camera.

Todo:

trying to check for rendering to file, but this doesn't work yet.

clean up, check what is really needed - in particular it calls PreRedraw() twice, once via RenderScene()

References UI::ViewImpl::getSolid(), UI::ViewImpl::getWriteImages(), InitFog(), InitLight(), InitShade(), InitTransparence(), Loki::SingletonHolder< T, CreationPolicy >::Instance(), m_rot(), m_trans(), PreRedraw(), RenderScene(), and UI::ViewImpl::setDefaultBackground().

Referenced by setColors().

Here is the call graph for this function:

Here is the caller graph for this function:

const VecMath::Rotation<3, GLdouble>& C4DView::m_rot ( ) [inline, private]
Returns:
The current 3D rotation state

References _rot.

Referenced by Benchmark3D(), checkAnglesForOverflow(), initializeGL(), and paintEvent().

Here is the caller graph for this function:

const VecMath::Vector<3, GLdouble>& C4DView::m_trans ( ) [inline, private]
Returns:
The current 3D translation state

References _trans.

Referenced by InitFog(), initializeGL(), paintEvent(), resizeGL(), and SetupDepthCue().

Here is the caller graph for this function:

QPixmap C4DView::makePixmap ( ) [private]

Make a pixmap to to be rendered by the GL widget, and render it.

This is an embarrassing workaround to make rendering to files work. QGLWidget's renderPixmap() method only produces black frames. Works with QPixmap::grabWindow() instead.

References Loki::SingletonHolder< T, CreationPolicy >::Instance().

Referenced by writeFrame().

Here is the call graph for this function:

Here is the caller graph for this function:

Menu4D* C4DView::Menu ( ) const [inline, private]
Returns:
The popup menu and menu bar

References _menu.

Referenced by C4DView().

Here is the caller graph for this function:

void C4DView::mouseDoubleClickEvent ( QMouseEvent *  e) [private, virtual]

Double click event handler, reimplemented from QWidget.

Delegates to MouseHandler4D::mouseDoubleClickEvent()

References C4DView::MouseHandler4D::mouseDoubleClickEvent(), and MouseHandler().

Here is the call graph for this function:

MouseHandler4D* C4DView::MouseHandler ( ) const [inline, private]
Returns:
Handler to delegate mouse events to

References _mouseHandler.

Referenced by mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().

Here is the caller graph for this function:

void C4DView::mouseMoveEvent ( QMouseEvent *  e) [private, virtual]

Mouse move event handler, reimplemented from QWidget.

Delegates to MouseHandler4D::mouseMoveEvent()

References MouseHandler(), and C4DView::MouseHandler4D::mouseMoveEvent().

Here is the call graph for this function:

void C4DView::mousePressEvent ( QMouseEvent *  e) [private, virtual]

Mouse press event handler, reimplemented from QWidget.

Delegates to MouseHandler4D::mousePressEvent()

References MouseHandler(), and C4DView::MouseHandler4D::mousePressEvent().

Here is the call graph for this function:

void C4DView::mouseReleaseEvent ( QMouseEvent *  e) [private, virtual]

Mouse release event handler, reimplemented from QWidget.

Delegates to MouseHandler4D::mouseReleaseEvent()

References MouseHandler(), and C4DView::MouseHandler4D::mouseReleaseEvent().

Here is the call graph for this function:

GLint C4DView::ObjectList ( ) const [inline, private]
Returns:
GLList for the display of the object

References _objectList.

Referenced by PreRedraw(), RenderScene(), and setBackground().

Here is the caller graph for this function:

void C4DView::OnAnimationTimer ( ) [private, slot]

Animation timer event handler.

Updates values if in the middle of an animation, and renders an image.

Writes image to file too, if wanted.

References UI::ViewImpl::addR(), animationFrame(), animationMaxFrames(), arg(), UI::ViewImpl::getdR(), paintEvent(), UI::ViewImpl::R(), Redraw(), UI::ViewImpl::T(), Transform(), UpdateStatus(), and writeFrame().

Referenced by C4DView().

Here is the call graph for this function:

Here is the caller graph for this function:

void C4DView::paintEvent ( QPaintEvent *  = 0) [private, virtual]

Paint event handler, reimplemented from QGLWidget.

Paint event handler and object drawing routine: called whenever the object is transformed, Does all the OpenGL stuff necessary to paint the object on screen

References UI::ViewImpl::getSolid(), m_rot(), m_trans(), and RenderScene().

Referenced by Benchmark3D(), OnAnimationTimer(), Redraw(), setBackground(), and setLighting().

Here is the call graph for this function:

Here is the caller graph for this function:

void C4DView::PreRedraw ( ) [private]

Draw the projection into an OpenGL display list, but not yet on screen.

Separated from the 3D OpenGL handling into this function

Todo:
either PreRedraw() or Draw() should call DrawCoordinates(), but not both

References CoordinateCross(), DrawCoordinates(), UI::ViewImpl::F(), UI::ViewImpl::getCoordinates(), Util::GetGLList(), ObjectList(), Project(), setCoordinateCross(), and setObjectList().

Referenced by initializeGL(), Redraw(), RenderScene(), and writeFrame().

Here is the call graph for this function:

Here is the caller graph for this function:

void C4DView::Project ( void  ) [private]

Execute the projection into three-space (but don't draw it yet either)

Projects F and coordinate cross into three-space

References _crossScr, _crossTrans, UI::ViewImpl::CamW(), UI::ViewImpl::F(), UI::ViewImpl::getCoordinates(), UI::ViewImpl::getHyperfog(), and UI::ViewImpl::ScrW().

Referenced by animate(), PreRedraw(), setCoordinates(), and setHyperfog().

Here is the call graph for this function:

Here is the caller graph for this function:

void C4DView::RandomAnimation ( bool  start) [private]

Starts a random animation.

xw/yw/zw rotation speed changes every 10 seconds

Todo:

make hardcoded duration of rotation change frequency adjustable

a menu entry for this

References AnimateRandomTimer(), AnimationTimer(), UI::ViewImpl::setdR(), and StartAnimation().

Here is the call graph for this function:

void C4DView::Redraw ( ) [private]

Draw the transformed and projected function onto the screen.

Draws the projected Function into GL display lists, and then draws those lists onto the screen

References UI::ViewImpl::F(), paintEvent(), and PreRedraw().

Referenced by animate(), ApplyChanges(), applyTransform(), Benchmark4D(), C4DView(), C4DView::CustomFunctionSlot< function >::createCustomFunction(), C4DView::CustomFunctionSlot< function >::createCustomSurface(), OnAnimationTimer(), setCoordinates(), and setHyperfog().

Here is the call graph for this function:

Here is the caller graph for this function:

void C4DView::RenderScene ( ) [private]

Wrapper for displaying OpenGL display lists.

Execute GL display lists, with error reporting and an exit strategy

References cerr, CoordinateCross(), endl(), exit(), UI::ViewImpl::getCoordinates(), Util::itoa(), ObjectList(), and PreRedraw().

Referenced by initializeGL(), and paintEvent().

Here is the call graph for this function:

Here is the caller graph for this function:

void C4DView::resizeEvent ( QResizeEvent *  e) [private, virtual]

Resizing routine, reimplemented from QGLWidget.

Also, the definition of the GL viewport is done here

References Size().

Here is the call graph for this function:

void C4DView::resizeGL ( int  width,
int  height 
) [private, virtual]

GL stuff needed in addition to resizeEvent(). Reimplemented from QGLWidget.

change of viewing distance is handled here too, which is not so clean programming style...

Todo:
eliminate hardcoded constants

References atan(), UI::ViewImpl::distance(), fabs(), UI::ViewImpl::getFog(), Loki::SingletonHolder< T, CreationPolicy >::Instance(), m_trans(), SetupDepthCue(), and Size().

Here is the call graph for this function:

void C4DView::setLighting ( bool  light) [virtual]

Re-Implementation of UI::ViewImpl::setLighting.

Todo:
Decide whether to turn lighting off completely, if lighting is deselected, or whether to use flat, all-ambient, lighting. Another possibility would be to make a three-way switch between full lighting, flat lighting and no lighting at all.

Reimplemented from UI::ViewImpl.

References UI::ViewImpl::getLighting(), paintEvent(), and LightOpenGL::render().

Referenced by C4DView().

Here is the call graph for this function:

Here is the caller graph for this function:

void C4DView::SetupDepthCue ( float  dist,
float  size 
) [private]

Adjust parameters for depth cue.

Todo:
fill in the meaning of the parameters
Parameters:
dist
size

References Loki::SingletonHolder< T, CreationPolicy >::Instance(), and std::max().

Here is the call graph for this function:

void C4DView::SetupDepthCue ( bool  on) [private]

Switch 3D depth cue on and off.

Parameters:
onwhether to use fog

References fabs(), Loki::SingletonHolder< T, CreationPolicy >::Instance(), m_trans(), setFog(), and Size().

Referenced by InitFog(), and resizeGL().

Here is the call graph for this function:

Here is the caller graph for this function:

double C4DView::Size ( ) [private]

Get size of displayed area.

Returns:
approximate diameter of definition space

References sqrt(), and Values().

Referenced by InitFog(), resizeEvent(), resizeGL(), and SetupDepthCue().

Here is the call graph for this function:

Here is the caller graph for this function:

void C4DView::StartAnimation ( ) [private]

Err well.. just that!

Starts AnimationTimer, too...

dR3() &&

References animation_fps(), AnimationTimer(), UI::ViewImpl::getdR(), Loki::SingletonHolder< T, CreationPolicy >::Instance(), setAnimated(), setanimationFrame(), and UpdateStatus().

Referenced by RandomAnimation().

Here is the call graph for this function:

Here is the caller graph for this function:

void C4DView::Transform ( ) [private]

Overloaded function executing the transform to the default state.

Four-dimensional transform is set to no rotation, no translation.

Three-dimensional transform is 15 degrees about x and y axis, and 10 units distance from the camera.

References UI::ViewImpl::R(), setm_rot(), setm_trans(), UI::ViewImpl::setR(), UI::ViewImpl::setT(), and UI::ViewImpl::T().

Referenced by animate(), ApplyChanges(), applyTransform(), AssignValues(), Benchmark4D(), and OnAnimationTimer().

Here is the call graph for this function:

Here is the caller graph for this function:

void C4DView::Transform ( const VecMath::Rotation< 4 > &  R,
const VecMath::Vector< 4 > &  T 
) [private]

Set the transform for the displayed object (but don't draw it yet)

Calls F->Transform () and transforms the coordinate cross

Parameters:
RRotation
TTranslation

References _cross, _crossTrans, UI::ViewImpl::F(), and UI::ViewImpl::T().

Here is the call graph for this function:

void C4DView::UpdateStatus ( QString  status = "") [private]

display some info about current object and its transformations

In the status bar.

Side effect: checks rotation values for overflow and resets them to the interval [-360, 360].

Parameters:
statusstring to be displayed

References checkAnglesForOverflow(), UI::ViewImpl::F(), and Loki::SingletonHolder< T, CreationPolicy >::Instance().

Referenced by AssignValues(), Benchmark3D(), Benchmark4D(), C4DView::CustomFunctionSlot< function >::createCustomFunction(), C4DView::CustomFunctionSlot< function >::createCustomSurface(), OnAnimationTimer(), and StartAnimation().

Here is the call graph for this function:

Here is the caller graph for this function:

UI::Dialogs::ValuesDialogImpl* C4DView::Values ( ) const [inline, private]
Returns:
Dialog to enter function parameters

References _values.

Referenced by ApplyChanges(), AssignValues(), C4DView(), C4DView::CustomFunctionSlot< function >::createCustomFunction(), C4DView::CustomFunctionSlot< function >::createCustomSurface(), and Size().

Here is the caller graph for this function:

void C4DView::writeFrame ( ) [private]

Writes a snapshot of the current frame of an animation or interactive display to disk. Updates animationFrame

References animationFrame(), animationMaxFrames(), UI::ViewImpl::getImgDir(), UI::ViewImpl::getImgPrefix(), UI::ViewImpl::getWriteImages(), Loki::SingletonHolder< T, CreationPolicy >::Instance(), log(), makePixmap(), PreRedraw(), setanimationFrame(), and setCurrentlyRendering().

Referenced by OnAnimationTimer().

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends

Generated on Mon Apr 9 2012 20:25:17 for HyperspaceExplorer 0.7.1 by doxygen 1.7.4  -  Hosted bySourceForge.net Logo