Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/testbed/pgrid.cxx File Reference

#include "pandaFramework.h"
#include "pandaNode.h"
#include "transformState.h"
#include "clockObject.h"
#include "string_utils.h"
#include "pvector.h"
#include "gnu_getopt.h"

Go to the source code of this file.

Compounds

struct  gridded_file_info
class  GriddedFilename

Defines

#define RANDFRAC   (rand()/(float)(RAND_MAX))
#define GRIDCELLSIZE   5.0
#define MIN_WANDERAREA_DIMENSION   120.0f
#define DO_FP_MODULUS(VAL, MAXVAL)
#define MIN_REVOLUTION_ANGVEL   30
#define MAX_REVOLUTION_ANGVEL   60
#define MIN_ROTATION_ANGVEL   30
#define MAX_ROTATION_ANGVEL   600
#define MAX_RADIUS   4.0*GRIDCELLSIZE
#define MIN_RADIUS   0.1*GRIDCELLSIZE
#define MIN_VEL   2.0
#define MAX_VEL   (fabs(wander_area_pos_offset))

Typedefs

typedef pvector< GriddedFilenameGriddedFilenames
typedef pvector< gridded_file_infoGriddedInfoArray

Enumerations

enum  GriddedMotionType { None, Rotation, LinearMotion }

Functions

void move_gridded_stuff (GriddedMotionType gridmotiontype, gridded_file_info *InfoArr, int size)
bool get_command_line_opts (int &argc, char **&argv)
void get_command_line_filenames (int argc, char *argv[], pvector< Filename > &static_filenames, GriddedFilenames &gridded_filenames)
void load_gridded_models (WindowFramework *window, GriddedFilenames &filenames, GriddedInfoArray &info_arr)
int main (int argc, char *argv[])

Variables

int gridwidth
float grid_pos_offset
float wander_area_pos_offset
GriddedMotionType gridmotiontype = None


Detailed Description

Definition in file pgrid.cxx.


Define Documentation

#define DO_FP_MODULUS VAL,
MAXVAL   ) 
 

Value:

{if(VAL > MAXVAL) {int idivresult = (int)(VAL / (float)MAXVAL);  VAL=VAL-idivresult*MAXVAL;} else  \
    if(VAL < -MAXVAL) {int idivresult = (int)(VAL / (float)MAXVAL);  VAL=VAL+idivresult*MAXVAL;}}

#define GRIDCELLSIZE   5.0
 

Definition at line 70 of file pgrid.cxx.

#define MAX_RADIUS   4.0*GRIDCELLSIZE
 

#define MAX_REVOLUTION_ANGVEL   60
 

#define MAX_ROTATION_ANGVEL   600
 

#define MAX_VEL   (fabs(wander_area_pos_offset))
 

#define MIN_RADIUS   0.1*GRIDCELLSIZE
 

#define MIN_REVOLUTION_ANGVEL   30
 

#define MIN_ROTATION_ANGVEL   30
 

#define MIN_VEL   2.0
 

#define MIN_WANDERAREA_DIMENSION   120.0f
 

Definition at line 73 of file pgrid.cxx.

#define RANDFRAC   (rand()/(float)(RAND_MAX))
 

Definition at line 36 of file pgrid.cxx.

Referenced by move_gridded_stuff().


Typedef Documentation

typedef pvector<GriddedFilename> GriddedFilenames
 

Definition at line 44 of file pgrid.cxx.

typedef pvector<gridded_file_info> GriddedInfoArray
 

Definition at line 66 of file pgrid.cxx.


Enumeration Type Documentation

enum GriddedMotionType
 

Enumeration values:
None 
Rotation 
LinearMotion 

Definition at line 68 of file pgrid.cxx.


Function Documentation

void get_command_line_filenames int  argc,
char *  argv[],
pvector< Filename > &  static_filenames,
GriddedFilenames gridded_filenames
 

Definition at line 189 of file pgrid.cxx.

References GriddedFilename::_count, GriddedFilename::_filename, argv, Filename::from_os_specific(), nout, NULL, size_t, and string_to_int().

bool get_command_line_opts int &  argc,
char **&  argv
 

Definition at line 158 of file pgrid.cxx.

References gridmotiontype, LinearMotion, nout, optind, options, and Rotation.

void load_gridded_models WindowFramework window,
GriddedFilenames filenames,
GriddedInfoArray info_arr
 

Definition at line 223 of file pgrid.cxx.

int main int  argc,
char *  argv[]
 

Definition at line 396 of file pgrid.cxx.

References framework.

void move_gridded_stuff GriddedMotionType  gridmotiontype,
gridded_file_info InfoArr,
int  size
[static]
 

Definition at line 83 of file pgrid.cxx.

References gridded_file_info::ang1, gridded_file_info::ang1_vel, csqrt(), gridmotiontype, TransformState::make_mat(), rad_2_deg(), RANDFRAC, Rotation, gridded_file_info::starttime, and wander_area_pos_offset.


Variable Documentation

float grid_pos_offset [static]
 

Definition at line 75 of file pgrid.cxx.

GriddedMotionType gridmotiontype = None [static]
 

Definition at line 78 of file pgrid.cxx.

Referenced by get_command_line_opts(), and move_gridded_stuff().

int gridwidth [static]
 

Definition at line 71 of file pgrid.cxx.

float wander_area_pos_offset [static]
 

Definition at line 76 of file pgrid.cxx.

Referenced by move_gridded_stuff().


Generated on Fri May 2 00:46:15 2003 for Panda by doxygen1.3