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

xycoord.cpp

Go to the documentation of this file.
00001 /*****************************************************************************/
00002 /* Módulo: xycoord.cpp                                                       */
00003 /* Autores: Carlos Henrique Levy e Jaudênia Cavalcante                       */
00004 /* Data: 29 jul 97                                                           */
00005 /* Comentário:                                                               */
00006 /*    Implementação de métodos da classe que define os tipos de coordenadas  */
00007 /* usadas pelos objetos membros do pacote XY++.                              */
00008 /*****************************************************************************/
00009 
00010 #include "xycoord.h"
00011 
00012 const char* xy_id_xycoord_cpp="$Id: xycoord.cpp,v 1.5 1999/07/14 13:16:50 camilo Exp $";
00013                                                                 
00014 void XYCoordinate::set (double p)
00015 {
00016    _type = world;
00017    _p = p;
00018 }
00019 
00020 void XYCoordinate::set (int p)
00021 {
00022    _type = pixel;
00023    _pp = p;
00024 }
00025 
00026 
00027 void XYCoordinate::set (const XYObject* r, Where d, int g)
00028 {
00029    _type = relative;
00030    _ref  = r;
00031    _dir  = d;
00032    _gap  = g;
00033 }
00034 
00035 void XYCoordinate::get (double* p) const
00036 {
00037    *p = _p;
00038 }
00039 
00040 void XYCoordinate::get (int* pp) const
00041 {
00042    *pp = _pp;
00043 }
00044 
00045 
00046 void XYCoordinate::type (int t)
00047 {
00048    _type  = t;
00049 }
00050 
00051 int XYCoordinate::type (void) const
00052 {
00053    return _type;
00054 }
00055 
00056  void XYCoordinate::reference (const XYObject* obj)
00057 {
00058    _ref = obj;
00059 }
00060 
00061 const XYObject* XYCoordinate::reference (void) const
00062 {
00063    return _ref;
00064 }
00065 
00066 void XYCoordinate::direction (Where d)
00067 {
00068    _dir = d;
00069 }
00070 
00071 int XYCoordinate::direction (void) const
00072 {
00073    return _dir;
00074 }
00075 
00076 void XYCoordinate::gap (int g)
00077 {
00078    _gap = g;
00079 }
00080 
00081 int XYCoordinate::gap (void) const
00082 {
00083    return _gap;
00084 }
00085 

XY
Tecgraf / PUC-Rio - Computer Graphics Technology Group