Classes | |
struct | BITMAPINFOHEADER |
struct | DSObject |
struct | mapcoord_type |
struct | polygon_type |
struct | vertex_type |
Public Types | |
enum | TEXTURES { NONE, OTHER, SKY, GROUND, WOOD, TREE } |
Public Member Functions | |
ViewPort (const char *winname, const char *ground="ground.ppm", const char *sky="sky.ppm", bool useFog=false, bool drawWorld=true, int w=320, int h=240, const double cameraParam[3][4]=NULL) | |
XEvent | initFrame (const double *cameraParam=NULL) |
init the frame and process window events before drawing stuff | |
int | updateFrame () |
update the frame and return if we are running or not | |
void | getFrame (unsigned char *img) |
Image< PixRGB< byte > > | getFrame () |
void | setTextures (bool val) |
void | setShadows (bool val) |
Dims | getDims () |
void | setWireframe (bool val) |
void | setDrawWorld (bool val) |
void | setZoom (float val) |
void | createMainWindow (const char *winname) |
void | destroyMainWindow () |
void | handleEvent (XEvent &event) |
void | startGraphics (const char *prefix, const char *ground, const char *sky) |
void | stopGraphics () |
void | buildProjectionMatrix (const double cameraParam[3][4], double projMatrix[16]) |
int | paramDecompMat (const double source[3][4], double cpara[3][4], double trans[3][4]) |
void | initCamera () |
void | dsSetViewpoint (double xyz[3], double hpr[3]) |
void | dsGetViewpoint (double xyz[3], double hpr[3]) |
void | unProjectPoint (const int x, const int y, double objLoc[3]) |
get the 3D location of an x,y pos on the screen | |
void | dsSetTexture (TEXTURES texture_number, Texture *texturePtr=NULL) |
void | dsSetColor (double red, double green, double blue) |
void | dsSetColorAlpha (double red, double green, double blue, double alpha) |
void | dsDrawBox (const double pos[3], const double R[12], const double sides[3]) |
void | dsDrawSphere (const double pos[3], const double R[12], double radius) |
void | dsDrawTriangle (const double pos[3], const double R[12], const double *v0, const double *v1, const double *v2, int solid) |
void | dsDrawCylinder (const double pos[3], const double R[12], double length, double radius) |
void | dsDrawCappedCylinder (const double pos[3], const double R[12], double length, double radius) |
void | dsDrawLine (const double pos1[3], const double pos2[3]) |
void | dsDrawBoxD (const double pos[3], const double R[12], const double sides[3]) |
void | dsDrawSphereD (const double pos[3], const double R[12], const double radius) |
void | dsDrawTriangleD (const double pos[3], const double R[12], const double *v0, const double *v1, const double *v2, int solid) |
void | dsDrawCylinderD (const double pos[3], const double R[12], double length, double radius) |
void | dsDrawCappedCylinderD (const double pos[3], const double R[12], double length, double radius) |
void | dsDrawLineD (const double pos1[3], const double pos2[3]) |
void | dsSetSphereQuality (int n) |
void | dsSetCappedCylinderQuality (int n) |
void | normalizeVector3 (float *) |
double | dDOT (const double *, const double *) |
void | setCamera (double, double, double, double, double, double) |
void | setColor (double, double, double, double) |
void | setTransform (const double *, const double *) |
void | setShadowTransform () |
void | drawBox (const double *) |
void | drawPatch (double *, double *, double *, int) |
void | drawSphere () |
void | drawSphereShadow (double, double, double, double) |
void | drawTriangle (const double *, const double *, const double *, int) |
void | drawTriangleD (const double *, const double *, const double *, int) |
void | drawCappedCylinder (double, double) |
void | drawCylinder (double, double, double) |
void | initMotionModel () |
void | wrapCameraAngles () |
void | dsMotion (int, int, int) |
void | drawSky (double *) |
void | drawGround () |
void | drawPyramidGrid () |
void | dsDrawFrame (const double cameraParam[16]=NULL) |
int | dsGetShadows () |
void | dsSetShadows (int) |
int | dsGetTextures () |
void | dsSetTextures (int) |
void | setupDrawingMode () |
void | setShadowDrawingMode () |
DSObject | load3DSObject (const char *filename, const char *textureFile=NULL) |
int | loadBitmap (const char *filename) |
void | dsDraw3DSObject (const double pos[3], const double R[12], DSObject &object) |
void | draw3dsObject (DSObject &object) |
Static Public Member Functions | |
static void | mainWindowThread (void *t) |
Public Attributes | |
int | itsWidth |
int | itsHeight |
int | run |
int | writeframes |
pthread_t | win_thread |
Display * | display |
XVisualInfo * | visual |
Colormap | colormap |
Window | win |
GLXContext | glx_context |
int | last_key_pressed |
Atom | wm_protocols_atom |
Atom | wm_delete_window_atom |
int | screen |
Texture * | sky_texture |
Texture * | ground_texture |
Texture * | wood_texture |
Texture * | tree_texture |
Texture * | other_texture |
GLuint | listnum |
bool | itsDrawWorld |
double | view_xyz [3] |
double | view_hpr [3] |
double | itsProjMatrix [16] |
double | color [4] |
int | tnum |
double | ground_scale |
double | ground_ofsx |
double | ground_ofsy |
double | sky_scale |
double | sky_height |
int | sphere_quality |
int | capped_cylinder_quality |
int | use_textures |
int | use_shadows |
Definition at line 83 of file ViewPort.H.
XEvent ViewPort::initFrame | ( | const double * | cameraParam = NULL |
) |
init the frame and process window events before drawing stuff
Definition at line 311 of file ViewPort.C.
void ViewPort::unProjectPoint | ( | const int | x, | |
const int | y, | |||
double | objLoc[3] | |||
) |
get the 3D location of an x,y pos on the screen
Definition at line 588 of file ViewPort.C.
Referenced by ArmSim::getObjLoc().
int ViewPort::updateFrame | ( | ) |
update the frame and return if we are running or not
Definition at line 327 of file ViewPort.C.