#include <mydxfentities.hpp>
Inheritance diagram for MyDXFLine:
Public Member Functions | |
MyDXFLine () | |
Default constructor. | |
MyDXFLine (const MyDXFEntity &ent) | |
Constructor for copying MyDXFEntity properties. | |
MyDXFLine (class MyDXFFile *dxf) | |
Construct line entity by reading from DXF file. | |
virtual | ~MyDXFLine () |
Virtual destructor. | |
virtual MyDXFLine * | 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 MyDXFLine &line, double eps=1.0e-6) const |
Check if two entities are geometrically same. | |
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. |
MyDXFLine::MyDXFLine | ( | ) | [inline] |
Default constructor.
MyDXFLine::MyDXFLine | ( | const MyDXFEntity & | ent | ) | [inline] |
Constructor for copying MyDXFEntity properties.
MyDXFLine::MyDXFLine | ( | class MyDXFFile * | dxf | ) |
Construct line entity by reading from DXF file.
virtual MyDXFLine::~MyDXFLine | ( | ) | [inline, virtual] |
Virtual destructor.
virtual MyDXFLine* MyDXFLine::copy | ( | void | ) | const [inline, virtual] |
virtual Vec3D MyDXFLine::end | ( | void | ) | const [inline, virtual] |
virtual void MyDXFLine::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 MyDXFLine::geom_same | ( | const MyDXFLine & | 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 MyDXFLine::get_bbox | ( | Vec3D & | min, | |
Vec3D & | max, | |||
const class MyDXFFile * | dxf, | |||
const Transformation * | t | |||
) | const [virtual] |
virtual EntityType MyDXFLine::get_type | ( | void | ) | const [inline, virtual] |
virtual void MyDXFLine::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 MyDXFLine::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 MyDXFLine::scale | ( | class MyDXFFile * | dxf, | |
double | s | |||
) | [virtual] |
virtual void MyDXFLine::set_end | ( | const Vec3D & | e | ) | [virtual] |
virtual void MyDXFLine::set_start | ( | const Vec3D & | s | ) | [virtual] |
virtual Vec3D MyDXFLine::start | ( | void | ) | const [inline, virtual] |
virtual void MyDXFLine::write | ( | class MyDXFFile * | dxf, | |
std::ofstream & | ostr | |||
) | [virtual] |