Cytosim PI Cytoskeleton Simulator

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

List of all members | Public Member Functions
View Class Reference

## Detailed Description

ViewProp does not depend on the window-system (GLUT), but only on the rendering engine (OpenGL)

Inheritance diagram for View:

## Public Member Functions
| View (const std::string &n)
| constructor
| ~View ()
| destructor
int | window () const
| return window-id
void | window (int w)
| set window-id
void | reshaped (int, int)
| handle window resize events
void | setProjection ()
| set OpenGL Projection matrix
void | setModelView () const
| set OpenGL Model-View matrix
void | reset ()
| reset the view (no-rotation, zoom=1), and enable auto_scale
void | setScale (real)
| set the range that is visible in the window if zoom = 1
real | pixelSize () const
| size of pixel in drawing units
int | width () const
| width of window
int | height () const
| height of window
void | initGL (int depth_test, int multisample, int depth_clamp) const
| init OpenGL display parameters
void | setLights (bool local=false) const
| set OpenGL Lights for lighting effects More...
void | setFog (int mode, real density, gle_color)
| set OpenGL Fog, with mode (GL_EXP or GL_LINEAR), intensity and color
void | setFog (int mode, real density)
void | setFog () const
void | setClipPlane (GLenum glp, Vector3 dir, real sca) const
| enable cliping plane in OpenGL More...
void | setClipPlaneEye (GLenum glp, Vector3 dir, real sca) const
void | setClipPlanes () const
| call setClipPlane(int) for all enabled clipping planes
void | endClipPlanes () const
| disable cliping planes in OpenGL
void | enableClipPlane (unsigned int, Vector3 dir, real scal, bool absolute=true)
| set equations for a clipping plane, and enable it in View
void | disableClipPlane (unsigned int)
| disable cliping plane in View
bool | hasClipPlane (unsigned int) const
| return enable/disable state
void | getGLMatrices ()
| store the matrices defining the current OpenGL ModelView and Projection transformations
Vector3 | unproject (GLdouble x, GLdouble y, GLdouble z, bool get_matrices=false)
| transform window coordinates to 3D world-coordinates More...
void | move_to (const Vector3 &pos)
| position 'pos' in the center of the display
void | shift_to (const Vector3 &pos)
| set additional translation of focal point
void | move_by (const Vector3 &trans)
| translate view
void | rotate_to (const Quaternion< real > &)
| set rotation to given Quaternion
void | rotate_to (const Vector3 &dir)
| rotate to have 'dir' aligned with the X-axis
void | rotate_by (const Quaternion< real > &q)
| rotate view
void | zoom_to (real z)
| set absolute zoom
void | zoom_in (real z)
| increase zoom (multiplicative)
void | zoom_out (real z)
| decrease zoom (multiplicative)
void | travelingMotion (real dt)
| apply the transformation specified by ViewProp::auto_translation and auto_rotation
void | matchROI (Vector3, Vector3)
| adjust zoom and focus to match the ROI specificed by two corner points
void | displaySubScaleBar (bool, GLfloat) const
| display a portion of a scale bar (called by displayScaleBar)
void | displayScaleBar (bool, GLfloat) const
| display a scale bar vertical or horizontal
Public Member Functions inherited from ViewProp
| ViewProp (const std::string &n)
| constructor
| ~ViewProp ()
| destructor
std::string | kind () const
| identifies the property
void | clear ()
| set default values
void | read (Glossary &)
| set from a Glossary
Property * | clone () const
| return a carbon copy of object
void | write_data (std::ostream &) const
| write all values
Public Member Functions inherited from Property
| Property (const std::string &n, const int index=-1)
| constructor must provide a name
virtual | ~Property ()
| destructor
std::string | name () const
| return identifier for instantiation
void | name (const std::string &n)
| change name
bool | is_named (const std::string &n)
| true if 'name' matches
int | index () const
| index, unique among all Property of similar kind()
void | index (int x)
| set index in the array of Properties
bool | modified () const
| true if at least one value is different than its default setting
void | readString (std::string &, char stamp)
| set from a string, return number of values assigned More...
void | readFile (const char file[])
| set from a string, return number of values assigned
virtual void | complete (SimulProp const *sp, PropertyList *plist)
| set variables derived from the parameters, and check consistency of values More...
void | write_diff (std::ostream &, const Property *ref) const
| write only values that differ from the ones specified in ref
void | write_diff (std::ostream &, bool prune) const
| if ( prune == true ), write values that differ from the default values
void | write (std::ostream &, bool prune=false) const
| write header + data More...

## Additional Inherited Members
Static Public Member Functions inherited from Property
template<typename C >
static void | write_param (std::ostream &os, std::string const &name, C const &c)
| formatted output of one parameter
template<typename C >
static void | write_param (std::ostream &os, std::string const &name, C const *c, int cnt)
| formatted output of one parameter
template<typename C , typename D >
static void | write_param (std::ostream &os, std::string const &name, C const &c, D const &d)
| formatted output of one parameter
template<typename C , typename D , typename E >
static void | write_param (std::ostream &os, std::string const &name, C const &c, D const &d, E const &e)
| formatted output of one parameter
template<typename C , typename D , typename E , typename F >
static void | write_param (std::ostream &os, std::string const &name, C const &c, D const &d, E const &e, F const &f)
| formatted output of one parameter
Public Attributes inherited from ViewProp
real | zoom
| zoom factor = ratio between visible area and `view_size`
real | view_size
| size of area visible in the window, in sim-units (default=10)
unsigned int | auto_scale
| enables the display area to be set from the size of the simulation space More...
Vector3 | focus
| the point that is in the center of the window in real-world coordinates
Vector3 | focus_shift
| additional translation used by autoTrack
Quaternion< real > | rotation
| orientation of display
unsigned int | traveling
| enables auto_translation, auto_zoom or auto_rotation More...
Vector3 | auto_translation
| translation speed of display (known as `traveling`[1]) More...
Quaternion< real > | auto_rotation
| rotational speed of display (known as `traveling`[2]) More...
real | auto_zoom
| zooming speed of display (known as `traveling`[3]) More...
int | window_position [2]
| position of window on screen (top-left corner, in pixels)
unsigned int | window_size [2]
| desired size of window in pixels (also known as `size`)
real | scale_bar
| size of scale-bar in sim-world units
unsigned int | show_scale
| display flag for scale-bar (set as `scale_bar`[1])
unsigned int | show_axes
| display flag for axes
unsigned int | clip_plane_mode [NB_CLIP_PLANES]
| on/off flags for clipping (defined as `clip_plane`?) More...
Vector3 | clip_plane_vector [NB_CLIP_PLANES]
| direction perpendicular to clipping plane (defined as `clip_plane`?[1])
real | clip_plane_scalar [NB_CLIP_PLANES]
| scalar offset defining the equation of the clipping plane (defined as `clip_plane`?[2])
unsigned int | track_fibers
| automatically adjust view to keep fibers in window More...
int | fog_type
| characteristics of OpenGL fog (also known as `fog`[0])
real | fog_density
| density of fog (also known as `fog`[1])
gle_color | fog_color
| color of fog (also known as `fog`[2])
real | eyeTranslation [3]
| position between Camera and the origin
Static Public Attributes inherited from ViewProp
static const unsigned int | NB_CLIP_PLANES = 3
| number of OpenGL clipping planes

## Member Function Documentation

void setClipPlane | ( | GLenum | glp,
|  | Vector3 | dir,
|  | real | sca
| ) |  | const

The plane equations is relative to the model

void setClipPlaneEye | ( | GLenum | glp,
|  | Vector3 | dir,
|  | real | sca
| ) |  | const

The plane equation is relative to the camera

void setLights | ( | bool | local = `false` | ) | const

Set two light sources and enable GL_COLOR_MATERIAL

Vector3 unproject | ( | GLdouble | x,
|  | GLdouble | y,
|  | GLdouble | z,
|  | bool | get_matrices = `false`
| ) |  |

Transforms the given window coordinates into user coordinates.

It uses the matrices obtained at the last call of getGLMatrices(), or the current matrices if get_matrices == true.

For more info, enter: man gluUnProject()