#include <mydxfentities.hpp>
Inheritance diagram for MyDXFLWPolyline:
Public Member Functions | |
MyDXFLWPolyline (class MyDXFFile *dxf) | |
Construct line entity by reading from DXF file. | |
virtual | ~MyDXFLWPolyline () |
Virtual destructor. | |
virtual MyDXFLWPolyline * | copy (void) const |
Get a new copy of entity. | |
virtual void | explode (class MyDXFEntities *ent, MyDXFFile *dxf, const Transformation *t) const |
Explode into entities. | |
virtual void | write (class MyDXFFile *dxf, std::ofstream &ostr) |
Write dxf file to stream. | |
virtual EntityType | get_type (void) const |
Get entity type. | |
virtual Vec3D | start (void) const |
Get start point of path entity. | |
virtual Vec3D | end (void) const |
Get end point of path entity. | |
virtual void | set_start (const Vec3D &s) |
Set start point of path entity. | |
virtual void | set_end (const Vec3D &e) |
Set end point of path entity. | |
virtual int | ray_cross (double x, double y) const |
Check for ray crossing. | |
bool | geom_same (const MyDXFLWPolyline &line, double eps=1.0e-6) const |
Check if two entities are geometrically same. | |
uint32_t | size () const |
Get number of vertices in entity. | |
Vec3D | vertex (uint32_t i) const |
Get vertix i. | |
bool | closed (void) const |
Is entity closed path? | |
virtual void | plot (const class MyDXFFile *dxf, cairo_t *cairo, const Transformation *t, const double range[4]) const |
Plot entity with cairo. | |
virtual void | get_bbox (Vec3D &min, Vec3D &max, const class MyDXFFile *dxf, const Transformation *t) const |
Return bounding box of entity. | |
virtual void | scale (class MyDXFFile *dxf, double s) |
Scale entity by factor s. |
MyDXFLWPolyline::MyDXFLWPolyline | ( | class MyDXFFile * | dxf | ) |
Construct line entity by reading from DXF file.
virtual MyDXFLWPolyline::~MyDXFLWPolyline | ( | ) | [inline, virtual] |
Virtual destructor.
bool MyDXFLWPolyline::closed | ( | void | ) | const [inline] |
Is entity closed path?
virtual MyDXFLWPolyline* MyDXFLWPolyline::copy | ( | void | ) | const [inline, virtual] |
virtual Vec3D MyDXFLWPolyline::end | ( | void | ) | const [inline, virtual] |
virtual void MyDXFLWPolyline::explode | ( | class MyDXFEntities * | ent, | |
MyDXFFile * | dxf, | |||
const Transformation * | t | |||
) | const [virtual] |
Explode into entities.
Break entity into atomic entities and tranform entities them with tranformation t. Add the tranformed entities to the database ent.
Implements MyDXFEntity.
bool MyDXFLWPolyline::geom_same | ( | const MyDXFLWPolyline & | line, | |
double | eps = 1.0e-6 | |||
) | const |
Check if two entities are geometrically same.
Checks if entity a is the geometrically same as entity b within error limit eps.
virtual void MyDXFLWPolyline::get_bbox | ( | Vec3D & | min, | |
Vec3D & | max, | |||
const class MyDXFFile * | dxf, | |||
const Transformation * | t | |||
) | const [virtual] |
virtual EntityType MyDXFLWPolyline::get_type | ( | void | ) | const [inline, virtual] |
virtual void MyDXFLWPolyline::plot | ( | const class MyDXFFile * | dxf, | |
cairo_t * | cairo, | |||
const Transformation * | t, | |||
const double | range[4] | |||
) | const [virtual] |
Plot entity with cairo.
Plot the entity using the transformation from from the object space to cairo coordinates. The visible range is specified by range (xmin,ymin,xmax,ymax) in cairo coordinates.
Implements MyDXFEntity.
virtual int MyDXFLWPolyline::ray_cross | ( | double | x, | |
double | y | |||
) | const [virtual] |
Check for ray crossing.
Check if ray going from point (x,y) downwards (negative y direction) crosses the entity. Return 1 if crosses odd number of times and 0 if even number of times. Return 2 in case of exact crossing at boundaries. This function is used as a subroutine to inside_loop().
Implements MyDXFPathEntity.
virtual void MyDXFLWPolyline::scale | ( | class MyDXFFile * | dxf, | |
double | s | |||
) | [virtual] |
virtual void MyDXFLWPolyline::set_end | ( | const Vec3D & | e | ) | [virtual] |
virtual void MyDXFLWPolyline::set_start | ( | const Vec3D & | s | ) | [virtual] |
uint32_t MyDXFLWPolyline::size | ( | void | ) | const [inline] |
Get number of vertices in entity.
virtual Vec3D MyDXFLWPolyline::start | ( | void | ) | const [inline, virtual] |
Vec3D MyDXFLWPolyline::vertex | ( | uint32_t | i | ) | const [inline] |
Get vertix i.
virtual void MyDXFLWPolyline::write | ( | class MyDXFFile * | dxf, | |
std::ofstream & | ostr | |||
) | [virtual] |