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

CNCoord Class Reference

CNCoord is a data type for managing 2-dimensional coordinates. More...

#include <Coord.h>

Inheritance diagram for CNCoord::

CNObject CNCL List of all members.

Public Methods

CNCoord & operator+= (const CNCoord &v)
 Defines the operator+= for coordinates by applying the standard C/C++ operators to the x and y components.

CNCoord & operator-= (const CNCoord &v)
 Defines the operator-= for coordinates by applying the standard C/C++ operators to the x and y components.

CNCoord & operator= (const CNCoord &v)
 Defines the operator= for coordinates by applying the standard C/C++ operators to the x and y components.

bool operator== (const CNObject *v) const
 Defines the operator== for coordinates by comparing x and y components.

bool operator== (const CNCoord &v) const
 Defines the operator== for coordinates by comparing x and y components.

 CNCoord ()
 Default Constructor.

 CNCoord (CNParam *)
 Initializes the coordinates from CNParam.

 CNCoord (double vx, double vy)
 Initializes the coordinates object from two doubles for x and y.

 CNCoord (const CNICoord &v)
 Initializes the coordinates object from CNICoord parameters.

 CNCoord (const CNCoord &v)
 Initializes the coordinates object from CNICoord parameters.

virtual CNClassDesc class_desc () const
 Returns the class description (pointer to instance of CNClass) for runtime type information.

virtual bool is_a (CNClassDesc desc) const
 Checks the Type.

virtual void print (ostream &strm=cout) const
 Print output.

virtual void dump (ostream &strm=cout) const
 Debug output.


Static Public Methods

double set_scale (double new_scale)
 Sets the scale setting.

double get_scale ()
 Gets the scale setting.

CNCoord * cast_from_object (CNObject *obj)
 Safes the Type Cast.

CNObjectnew_object (CNParam *param=NIL)
 creates a new Object.


Public Attributes

double x
 The x and y components of CNCoord.

double y
 The x and y components of CNCoord.


Friends

class CNICoord

Detailed Description

CNCoord is a data type for managing 2-dimensional coordinates.

It is typically used together with CNICoord for world coordinates and pixel coordinates respectively. A CNCoord has double x and y members which are public accessible. CNCoords can be automatically converted to CNICoords and vice versa. This is done by applying the conversion factor CNCoord::scale


The documentation for this class was generated from the following file:
Generated on Fri Feb 1 19:54:26 2002 for CNCL by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001