Cytosim PI Cytoskeleton Simulator

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

- Namespace List
- Namespace Members

Enumerations | Functions | Variables
Player Namespace Reference

GUI for Cytosim. Display is done by Display, most mouse handling by glApp.

## Enumerations
enum | PlayMode { PLAY_REVERSE = -1, PLAY_STOP = 0, PLAY_FORWARD = 1, PLAY_FORWARD_WRITE = 2 }
| the different values for PP.dir

## Functions
DisplayProp | DP ("*")
| the display parameters
PlayProp | PP ("*")
| the parameters for play
SimThread | simThread (glApp::postRedisplay)
| SimThread for live simulation.
void | setPointers (bool)
| set FDisp; More...
void | widenDisplay ()
| adjust window to screen width and tightly around the visible space in 2D. More...
void | reset ()
| reset view, without changing the current frame
void | startForward ()
| start animation
void | startBackward ()
| start animation
void | step ()
| allow one step of the simulation engine
void | restart ()
| reset the sim-state and timer
void | readFrame (int)
| load specified frame
void | previousFrame ()
| load previous frame
void | nextFrame ()
| go to the next frame, returns 1 if EOF is encountered More...
void | writePlayParameters (std::ostream &out, bool prune)
| write global display parameters More...
void | writeDisplayParameters (std::ostream &out, bool prune)
| write Object display parameters More...
void | help (std::ostream &)
| returns a string with some help on what pressing keys do More...
void | timer (int)
| GLUT callback function for timed events.
void | buildMenus ()
| build all the menus from scratch
void | processNormalKey (unsigned char, int=0, int=0)
| GLUT callback function for most keys.
void | processMouseEntry (int)
| GLUT callback function for when mouse enters current window. More...
void | processMouseAction (const Vector3 &, int)
| GLUT callback function for mouse motion, when one button is pressed. More...
void | processMouseActionMotion (Vector3 &, const Vector3 &, int)
| GLUT callback function for mouse motion, when no button is pressed. More...
void | initStyle (int)
| initialize display with given style
std::string | buildMessageL (Simul const &)
| build left message More...
std::string | buildMessageR (Simul const &)
| build right message More...
std::string | buildMessage (int)
| build central message More...
void | autoTrack (FiberSet const &, View &, int mode)
| set View::focus and quat to match the center of gravity of the Fibers
int | autoScale (SpaceSet const &, View &)
| adjust the viewing area More...
void | prepareDisplay (View &, Simul const &, real mag=1)
| adjust the model view and load frame if asked
void | displayCytosim (Simul const &)
| display cytosim state and message
void | displayLive ()
| display function for on-screen rendering More...
void | displayScene ()
| display function for off-screen rendering More...
int | saveImage (const char *filename, const char *format)
| save the displayed image in a graphic file More...
int | saveMagnifiedImage (int mag, const char *filename, const char *format)
| save a high-resolution image More...
int | saveImage (unsigned indx)
| save the displayed image in a graphic file
int | saveMagnifiedImage (int mag, unsigned indx)
| save a high-resolution image More...

## Variables
PropertyList | dproperties
| the display properties
FiberDisp * | FDisp = 0
| the 'current' FiberDisp on which any change is applied
Simul & | simul = simThread.sim()
| make alias
Display * | mDisplay = 0
| the Display class

## Function Documentation

int autoScale | ( | SpaceSet const & | spaces,
|  | View & | view
| ) |  |

Adjust to see the biggest Space in simul

std::string buildMessage | ( | int | type | ) |

This text is normally display in the center of the window

std::string buildMessageL | ( | Simul const & | simul | ) |

Build a message containing the label and the time. For an interactive window, it also adds 'live' or the frame index, and the force generated by the mouse.

std::string buildMessageR | ( | Simul const & | simul | ) |

This calls simul.report(), making sure that the displayed information is identical to what would be printed by the corresponding parser command 'write'.

void displayLive | ( |  | ) |

display is done only if data can be accessed by this thread, otherwise display is postponed with a call to postRedisplay()

void displayScene | ( |  | ) |

This can be used for off-screen rendering.

void help | ( | std::ostream & | os = `std::cout` | ) |

returns a string with some help on what pressing keys do

void nextFrame | ( |  | ) |

Reads the next frame from the current file position. This will jump over missing frames.

void processMouseAction | ( | const Vector3 & | pos3,
|  | int |
| ) |  |

Processes mouse clicks

void processMouseActionMotion | ( | Vector3 & | ori3,
|  | const Vector3 & | pos3,
|  | int | mode
| ) |  |

Processes mouse motion

void processMouseEntry | ( | int | state | ) |

Called when mouse enters/leaves current window

int saveImage | ( | const char * | name,
|  | const char * | format
| ) |  |

Saves to disc pixels currently stored in graphical memory. This does not require access to the simulation world.

int saveMagnifiedImage | ( | int | mag,
|  | const char * | name,
|  | const char * | format
| ) |  |

save an image where the resolution is magnified by a factor mag. This requires access to the simulation world.

int saveMagnifiedImage | ( | int | mag,
|  | unsigned | indx
| ) |  |

save an image where the resolution is magnified by a factor mag. This requires access to the simulation world.

void setPointers | ( | bool | next | ) |

try to initialize current FDisp and PDisp

void widenDisplay | ( |  | ) |

Adjust window size to occupy the full screen width

void writeDisplayParameters | ( | std::ostream & | os,
|  | bool | prune
| ) |  |

Write all the parameters that control the display:

- GlappProp
- DisplayProp
- PlayProp
- ObjectDisp

void writePlayParameters | ( | std::ostream & | os,
|  | bool | prune
| ) |  |

Write global parameters that control the display:

- GlappProp
- DisplayProp
- PlayProp