Classes | Functions
contrib/gel/vsol/vsol_rectangle_2d.h File Reference

Rectangle in 2D space. More...

#include <vsol/vsol_polygon_2d.h>
#include <vsl/vsl_binary_io.h>
#include <vcl_iosfwd.h>

Go to the source code of this file.

Classes

class  vsol_rectangle_2d

Functions

void vsl_b_write (vsl_b_ostream &os, const vsol_rectangle_2d *r)
 Binary save vsol_rectangle_2d* to stream.
void vsl_b_read (vsl_b_istream &is, vsol_rectangle_2d *&r)
 Binary load vsol_rectangle_2d* from stream.

Detailed Description

Rectangle in 2D space.

The "width/abscissa" (long axis) of the rectangle is along p0-p1, p2-p3, the "height/ordinate" (short axis) of the rectangle is along p1-p2, p3-p0.

Note, a constructor from 3 vertices is also defined The 3 vertices are to be defined in counterclockwise order, with a 90 degree corner between p_c-p_abs and p_c-p_ord.

                p3            p_ord        p2
                 o ------------o------------o
                 |             |            |
                 |             |            |
                 |             o------------o p_abs
                 |            p_c           |
                 |                          |
                 o -------------------------o
                 p0                         p1
   
Author:
François BERTEL
Date:
2000-05-08
    Modifications
     2000-05-08 François BERTEL Creation
     2000-06-17 Peter Vanroose  Implemented all operator==()s and type info
     2001-07-03 Peter Vanroose  Replaced vnl_double_2 by vgl_vector_2d
     2004-05-11 Joseph Mundy    Changed internal representation to 4 verts,
                                which allows consistent polygon operations.
                                3 vert constructor is maintained
     2004-05-14 Peter Vanroose  Added describe()
   

Definition in file vsol_rectangle_2d.h.


Function Documentation

void vsl_b_read ( vsl_b_istream is,
vsol_rectangle_2d *&  r 
)

Binary load vsol_rectangle_2d* from stream.

Definition at line 283 of file vsol_rectangle_2d.cxx.

void vsl_b_write ( vsl_b_ostream os,
const vsol_rectangle_2d r 
)

Binary save vsol_rectangle_2d* to stream.

Definition at line 270 of file vsol_rectangle_2d.cxx.