Virtual U.org
Get Personal Training on VU Today
    
Top shadow
 
 register/help
User Name:

Password:

Matrix class Reference
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

Matrix Class Reference

#include <Omatrix.h>

Inheritance diagram for Matrix:

MapMatrix ZoomMatrix List of all members.

Public Methods

 Matrix ()
 ~Matrix ()
void init (int winX1, int winY1, int winX2, int winY2, int locWidth, int locHeight, Location *locMatrix, int maxXLoc, int maxYLoc, int zoomLevel, char saveImageFlag=0)
virtual void draw_all ()
virtual void draw_update ()
virtual int detect ()
void reset_image_buf ()
void put_center_text (int x, int y, char *str)
void set_top_loc (int topXLoc, int topYLoc)
void loc_to_abs_top_left (int &absX, int &absY, int locX, int locY)
void loc_to_abs_center_left (int &absX, int &absY, int locX, int locY)
void loc_to_abs_bottom_right (int &absX, int &absY, int locX, int locY)
void abs_to_loc (int &locX, int &locY, int absX, int absY)

Public Attributes

int max_x_loc
int max_y_loc
Locationloc_matrix
int loc_width
int loc_height
int top_x_loc
int top_y_loc
int abs_top_x
int abs_top_y
int disp_x_loc
int disp_y_loc
int win_x1
int win_y1
int win_x2
int win_y2
int win_width
int win_height
char save_image_flag
short * save_image_buf
char is_image_buf_latest
char zoom_level

Static Public Attributes

DynArray disp_sort_array

Detailed Description

Class representing the Main map of the physical layout of the campus. Handles the drawing of objects on the main map.

Definition at line 115 of file Omatrix.h.


Constructor & Destructor Documentation

Matrix::Matrix  
 

Definition at line 33 of file Omatrix.cpp.

References NULL.

Matrix::~Matrix  
 

Definition at line 41 of file Omatrix.cpp.

References mem_del, and NULL.


Member Function Documentation

void Matrix::abs_to_loc int &    locX,
int &    locY,
int    absX,
int    absY
 

Return the location position of a given absolute position

<int&> locX, locY - vars for returning the location positions <int> absX, absY - the given absolute position

Definition at line 184 of file Omatrix.cpp.

Referenced by MapMatrix::detect(), and MapMatrix::scroll().

virtual int Matrix::detect void    [inline, virtual]
 

Reimplemented in MapMatrix, and ZoomMatrix.

Definition at line 146 of file Omatrix.h.

void Matrix::draw_all   [virtual]
 

Reimplemented in MapMatrix, and ZoomMatrix.

Definition at line 193 of file Omatrix.cpp.

Referenced by ZoomMatrix::draw_all(), and MapMatrix::draw_all().

void Matrix::draw_update   [virtual]
 

Reimplemented in MapMatrix, and ZoomMatrix.

Definition at line 217 of file Omatrix.cpp.

void Matrix::init int    winX1,
int    winY1,
int    winX2,
int    winY2,
int    locWidth,
int    locHeight,
Location   locMatrix,
int    maxXLoc,
int    maxYLoc,
int    zoomLevel,
char    saveImageFlag = 0
 

<int> winX1,winY1 = the coordination of the win, winX2,winY2 including the scroll bar and up,down panel

<int> locWidth = width and height of each location <int> locHeight

<Location*> locMatrix = pointer to a pre-allocated loc_matrix to be used by this class.

<int> maxXLoc = number of locations horizontally and vertically <int> maxYLoc in the matrix.

<int> zoomLevel = any of ZOOM_SMALL, ZOOM_MEDIUM, or ZOOM_LARGE <int> saveImageFlag = whether save the image to a buffer after drawing and reuse it during updates

Definition at line 68 of file Omatrix.cpp.

References MAX_WORLD_X_LOC, mem_add, mem_del, and BitmapW::size().

void Matrix::loc_to_abs_bottom_right int &    absX,
int &    absY,
int    locX,
int    locY
 

Return the bottom-right absolute positions of a given location

<int&> absX, absY - vars for returning the absolute positions of the location.

<int> locX, locY - the given location

Definition at line 170 of file Omatrix.cpp.

void Matrix::loc_to_abs_center_left int &    absX,
int &    absY,
int    locX,
int    locY
 

Return the top-left absolute positions of a given location

<int&> absX, absY - vars for returning the absolute positions of the location.

<int> locX, locY - the given location

Definition at line 154 of file Omatrix.cpp.

Referenced by MapMatrix::scroll().

void Matrix::loc_to_abs_top_left int &    absX,
int &    absY,
int    locX,
int    locY
 

Return the top-left absolute positions of a given location

<int&> absX, absY - vars for returning the absolute positions of the location.

<int> locX, locY - the given location

Definition at line 138 of file Omatrix.cpp.

void Matrix::put_center_text int    x,
int    y,
char *    str
 

<int> x, y - center of the absolute position where the text should be put. <char*> str - the display string.

Definition at line 574 of file Omatrix.cpp.

References V_BLACK.

void Matrix::reset_image_buf   [inline]
 

Definition at line 148 of file Omatrix.h.

References is_image_buf_latest.

void Matrix::set_top_loc int    topXLoc,
int    topYLoc
 

Definition at line 120 of file Omatrix.cpp.


Member Data Documentation

int Matrix::abs_top_x
 

Definition at line 122 of file Omatrix.h.

Referenced by MapMatrix::detect(), and MapMatrix::scroll().

int Matrix::abs_top_y
 

Definition at line 122 of file Omatrix.h.

Referenced by MapMatrix::detect(), and MapMatrix::scroll().

DynArray Matrix::disp_sort_array [static]
 

int Matrix::disp_x_loc
 

Definition at line 123 of file Omatrix.h.

int Matrix::disp_y_loc
 

Definition at line 123 of file Omatrix.h.

char Matrix::is_image_buf_latest
 

Definition at line 130 of file Omatrix.h.

Referenced by reset_image_buf().

int Matrix::loc_height
 

Definition at line 119 of file Omatrix.h.

Referenced by MapMatrix::detect(), and MapMatrix::scroll().

Location* Matrix::loc_matrix
 

Definition at line 118 of file Omatrix.h.

int Matrix::loc_width
 

Definition at line 119 of file Omatrix.h.

Referenced by MapMatrix::detect(), and MapMatrix::scroll().

int Matrix::max_x_loc
 

Definition at line 117 of file Omatrix.h.

int Matrix::max_y_loc
 

Definition at line 117 of file Omatrix.h.

short* Matrix::save_image_buf
 

Definition at line 129 of file Omatrix.h.

char Matrix::save_image_flag
 

Definition at line 128 of file Omatrix.h.

int Matrix::top_x_loc
 

Definition at line 121 of file Omatrix.h.

int Matrix::top_y_loc
 

Definition at line 121 of file Omatrix.h.

int Matrix::win_height
 

Definition at line 126 of file Omatrix.h.

int Matrix::win_width
 

Definition at line 126 of file Omatrix.h.

int Matrix::win_x1
 

Definition at line 125 of file Omatrix.h.

Referenced by MapMatrix::detect().

int Matrix::win_x2
 

Definition at line 125 of file Omatrix.h.

Referenced by MapMatrix::detect().

int Matrix::win_y1
 

Definition at line 125 of file Omatrix.h.

Referenced by MapMatrix::detect().

int Matrix::win_y2
 

Definition at line 125 of file Omatrix.h.

Referenced by MapMatrix::detect().

char Matrix::zoom_level
 

Definition at line 132 of file Omatrix.h.


The documentation for this class was generated from the following files:
Generated on Fri Aug 23 01:39:23 2002 for VirtualU by doxygen1.2.17