AngelCAD  1.5-00
Public Member Functions | List of all members
rectangle Class Reference

rectangle, by default located in 1st quadrant touching origin More...

#include <angelcad.h>

Inheritance diagram for rectangle:
shape2d shape

Public Member Functions

 rectangle (double dx, double dy, bool center=false)
 Create rectangle with extent in x and y. More...
 
double dx () const
 extent in x direction More...
 
double dy () const
 extent in y direction More...
 
- Public Member Functions inherited from shape2d
shape2dopAdd (shape2d@ b)
 Boolean union operator+ overload. More...
 
shape2dopAnd (shape2d@ b)
 Boolean intersection operator& overload. More...
 
shape2dopMul (tmatrix@ matrix)
 Transform object by matrix multiplication: shape2d@ o2 = T * o1. More...
 
shape2dopSub (shape2d@ b)
 Boolean difference operator- overload. More...
 
- Public Member Functions inherited from shape
boundingboxbox () const
 Return bounding box of object. More...
 
tmatrixtransform () const
 Return transformation matrix of object. More...
 
void write_csg (string path)
 Write object to OpenSCAD .csg file. More...
 
void write_xcsg (string path, double secant_tolerance=- 1.0)
 Write object to .xcsg file for processing by xcsg program. More...
 

Detailed Description

rectangle, by default located in 1st quadrant touching origin

a rectangle is a 2d object defined by its extent in x and y. By default it touches the
origin and extends along positive x and y.

Constructor & Destructor Documentation

◆ rectangle()

rectangle::rectangle ( double  dx,
double  dy,
bool  center = false 
)

Create rectangle with extent in x and y.

Parameters
dxdouble, extent in x direction
dydouble, extent in y direction
centerbool, true if rectangle should be centered on origin

Member Function Documentation

◆ dx()

double rectangle::dx ( ) const

extent in x direction

Returns
double, extent in x direction

◆ dy()

double rectangle::dy ( ) const

extent in y direction

Returns
double, extent in y direction

The documentation for this class was generated from the following file: