Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Animation Class Reference

#include <Animation.h>

Inheritance diagram for Animation:

UIObject List of all members.

Public Types

enum  AnimDir {
  ANIM_FORWARD, ANIM_FORWARD1, ANIM_REVERSE, ANIM_REVERSE1,
  ANIM_PAUSE, ANIM_TOTAL_DIRS
}
enum  AnimStyle { ANIM_ONCE, ANIM_LOOP, ANIM_ROCK, ANIM_TOTAL_STYLES }

Public Methods

 Animation (VMDApp *)
 constructor: take VMDApp pointer for UIObject baseclass. More...

int num ()
 total number of frames currently stored FIXME: should be const, but MoleculeList lacks const accessors. More...

int frame ()
 return the current frame number (frames 0...(frames -1); -1 => no frames) FIXME: should be const, but MoleculeList lacks const accessors. More...

void goto_frame (int fr)
 move each molecule to the specified frame, clamped by the range of the respective molecules. Any ongoing animation is paused. More...

virtual int check_event ()
 UIObject interface. More...

void skip (int newsk)
 set # frames to skip. More...

int skip () const
 get # frames to skip. More...

void anim_dir (AnimDir ad)
 set animation direction. More...

AnimDir anim_dir () const
 get animation direction. More...

void anim_style (AnimStyle as)
 set animation style. More...

AnimStyle anim_style () const
 get animation style. More...

float speed (float newsp)
 animation speed methods: newsp should be from 0 (min speed) to 1 (max speed). More...

float speed () const

Detailed Description

Animation (1) provides an interface for defining how frames in a collection of molecules get animated over time; and (2) notifies those molecules at the appropriate time.

Definition at line 38 of file Animation.h.


Member Enumeration Documentation

enum Animation::AnimDir
 

Enumeration values:
ANIM_FORWARD 
ANIM_FORWARD1 
ANIM_REVERSE 
ANIM_REVERSE1 
ANIM_PAUSE 
ANIM_TOTAL_DIRS 

Definition at line 41 of file Animation.h.

Referenced by MainFltkMenu::act_on_command, anim_dir, VMDApp::animation_set_dir, CmdAnimDir::CmdAnimDir, and text_cmd_animate.

enum Animation::AnimStyle
 

Enumeration values:
ANIM_ONCE 
ANIM_LOOP 
ANIM_ROCK 
ANIM_TOTAL_STYLES 

Definition at line 43 of file Animation.h.

Referenced by anim_style, VMDApp::animation_set_style, CmdAnimStyle::CmdAnimStyle, and text_cmd_animate.


Constructor & Destructor Documentation

Animation::Animation VMDApp  
 

constructor: take VMDApp pointer for UIObject baseclass.

Definition at line 38 of file Animation.C.

References anim_dir, ANIM_LOOP, ANIM_PAUSE, anim_style, skip, speed, and time_of_day.


Member Function Documentation

AnimDir Animation::anim_dir   const [inline]
 

get animation direction.

Definition at line 88 of file Animation.h.

References AnimDir.

Referenced by Animation.

void Animation::anim_dir AnimDir    ad [inline]
 

set animation direction.

Definition at line 87 of file Animation.h.

References AnimDir.

Referenced by VMDApp::animation_set_dir, and VMDApp::animation_set_frame.

AnimStyle Animation::anim_style   const [inline]
 

get animation style.

Definition at line 90 of file Animation.h.

References AnimStyle.

Referenced by Animation.

void Animation::anim_style AnimStyle    as
 

set animation style.

Definition at line 144 of file Animation.C.

Referenced by VMDApp::animation_set_style, py_style, and text_cmd_animate.

int Animation::check_event   [virtual]
 

UIObject interface.

Reimplemented from UIObject.

Definition at line 65 of file Animation.C.

References ANIM_FORWARD, ANIM_FORWARD1, ANIM_LOOP, ANIM_ONCE, ANIM_PAUSE, ANIM_REVERSE, ANIM_REVERSE1, ANIM_ROCK, frame, goto_frame, n, num, UIObject::runcommand, SPEED_FACTOR, and time_of_day.

int Animation::frame   [inline]
 

return the current frame number (frames 0...(frames -1); -1 => no frames) FIXME: should be const, but MoleculeList lacks const accessors.

Definition at line 72 of file Animation.h.

References DrawMolecule::frame, and MoleculeList::top.

Referenced by check_event.

void Animation::goto_frame int    fr
 

move each molecule to the specified frame, clamped by the range of the respective molecules. Any ongoing animation is paused.

Definition at line 47 of file Animation.C.

References DrawMolecule::active, DrawMolecule::change_ts, MoleculeList::molecule, MoleculeList::num, DrawMolecule::numframes, and DrawMolecule::override_current_frame.

Referenced by VMDApp::animation_set_frame, and check_event.

int Animation::num   [inline]
 

total number of frames currently stored FIXME: should be const, but MoleculeList lacks const accessors.

Definition at line 64 of file Animation.h.

References DrawMolecule::numframes, and MoleculeList::top.

Referenced by check_event.

int Animation::skip   const [inline]
 

get # frames to skip.

Definition at line 86 of file Animation.h.

Referenced by Animation.

void Animation::skip int    newsk
 

set # frames to skip.

Definition at line 127 of file Animation.C.

Referenced by VMDApp::animation_set_stride, py_skip, and text_cmd_animate.

float Animation::speed   const [inline]
 

Definition at line 96 of file Animation.h.

References SPEED_FACTOR.

Referenced by Animation.

float Animation::speed float    newsp
 

animation speed methods: newsp should be from 0 (min speed) to 1 (max speed).

Definition at line 132 of file Animation.C.

References SPEED_FACTOR.

Referenced by VMDApp::animation_set_speed, py_speed, and text_cmd_animate.


The documentation for this class was generated from the following files:
Generated on Tue Dec 3 02:46:46 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002