83 virtual QSharedPointer<RObject>
clone()
const {
88 return QSharedPointer<RXLineEntity>(
new RXLineEntity(*
this));
93 virtual QPair<QVariant, RPropertyAttributes>
getProperty(
95 bool humanReadable =
false,
bool noAttributes =
false,
bool showOnRequest =
false);
107 void setShape(
const RXLine& l);
110 data.setBasePoint(p);
114 return data.getBasePoint();
118 data.setSecondPoint(p);
122 return data.getSecondPoint();
126 data.setDirectionVector(v);
130 return data.getDirectionVector();
134 return data.getAngle();
138 return data.hasFixedAngle();
142 data.setFixedAngle(on);
146 return data.getDirection1();
150 return data.getDirection2();
154 return data.reverse();
158 return data.getSideOfPoint(point);
162 return data.getTrimEnd(trimPoint, clickPoint);
166 return data.trimStartPoint(trimPoint, clickPoint, extend);
169 return data.trimEndPoint(trimPoint, clickPoint, extend);
173 return data.getLength();
177 virtual void print(QDebug dbg)
const;
Q_DECLARE_METATYPE(RMath *)
A graphics document contains and owns entities, layers, user coordinate systems, variables,...
Definition RDocument.h:78
Base class for all entity classes.
Definition REntity.h:63
virtual QPair< QVariant, RPropertyAttributes > getProperty(RPropertyTypeId &propertyTypeId, bool humanReadable=false, bool noAttributes=false, bool showOnRequest=false)
Definition REntity.cpp:236
static void init()
Definition REntity.cpp:89
virtual bool setProperty(RPropertyTypeId propertyTypeId, const QVariant &value, RTransaction *transaction=NULL)
Sets the given property to the given value.
Definition REntity.cpp:338
virtual void exportEntity(RExporter &e, bool preview=false, bool forceSelected=false) const =0
Exports the entity to the given exporter.
virtual void print(QDebug dbg) const
Stream operator for QDebug.
Definition REntity.cpp:487
Abstract base class for exporters.
Definition RExporter.h:78
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RPropertyTypeId.h:54
static QSet< RPropertyTypeId > getPropertyTypeIds(RS::EntityType type, RPropertyAttributes::Option=RPropertyAttributes::NoOptions)
Gets all property type IDs that where registered for the given class.
Definition RPropertyTypeId.cpp:283
EntityType
Entity types used for property handling / filtering.
Definition RS.h:227
@ EntityXLine
XLine.
Definition RS.h:250
Side
Side used for side of a point relative to an entity (right hand or left hand side)
Definition RS.h:313
Ending
Entity ending.
Definition RS.h:323
Transaction implementation.
Definition RTransaction.h:73
Represents a 3d vector (x/y/z).
Definition RVector.h:47
static const RVector invalid
invalid vector
Definition RVector.h:335
Stores and manages all data that defines the geometry and appearance of an infinite line (xline) enti...
Definition RXLineData.h:43
Infinite line entity.
Definition RXLineEntity.h:38
void setDirectionVectorPoint(const RVector &v)
Definition RXLineEntity.h:125
static RPropertyTypeId PropertySecondPointX
Definition RXLineEntity.h:58
virtual QSharedPointer< RObject > clone() const
Definition RXLineEntity.h:83
static RPropertyTypeId PropertyType
Definition RXLineEntity.h:45
RS::Side getSideOfPoint(const RVector &point) const
Definition RXLineEntity.h:157
static RPropertyTypeId PropertyDirectionY
Definition RXLineEntity.h:63
double getDirection1() const
Definition RXLineEntity.h:145
RVector getDirectionVector() const
Definition RXLineEntity.h:129
static RPropertyTypeId PropertyAngle
Definition RXLineEntity.h:66
double getDirection2() const
Definition RXLineEntity.h:149
static RPropertyTypeId PropertyLayer
Definition RXLineEntity.h:47
static RPropertyTypeId PropertyLinetype
Definition RXLineEntity.h:48
static RPropertyTypeId PropertyFixedAngle
Definition RXLineEntity.h:67
static QSet< RPropertyTypeId > getStaticPropertyTypeIds()
Definition RXLineEntity.h:79
static RPropertyTypeId PropertyBlock
Definition RXLineEntity.h:46
RS::Ending getTrimEnd(const RVector &trimPoint, const RVector &clickPoint)
Definition RXLineEntity.h:161
bool reverse()
Definition RXLineEntity.h:153
static RPropertyTypeId PropertyLinetypeScale
Definition RXLineEntity.h:49
bool trimStartPoint(const RVector &trimPoint, const RVector &clickPoint=RVector::invalid, bool extend=false)
Definition RXLineEntity.h:165
virtual RXLineData & getData()
Definition RXLineEntity.h:99
static RPropertyTypeId PropertySecondPointY
Definition RXLineEntity.h:59
static RPropertyTypeId PropertyBasePointX
Definition RXLineEntity.h:55
static RPropertyTypeId PropertyBasePointZ
Definition RXLineEntity.h:57
static RPropertyTypeId PropertyBasePointY
Definition RXLineEntity.h:56
static RPropertyTypeId PropertyDrawOrder
Definition RXLineEntity.h:53
static RPropertyTypeId PropertyDirectionZ
Definition RXLineEntity.h:64
static RS::EntityType getRtti()
Definition RXLineEntity.h:75
virtual const RXLineData & getData() const
Definition RXLineEntity.h:103
static RPropertyTypeId PropertyProtected
Definition RXLineEntity.h:43
RVector getSecondPoint() const
Definition RXLineEntity.h:121
double getLength() const
Definition RXLineEntity.h:172
static RPropertyTypeId PropertyDirectionX
Definition RXLineEntity.h:62
void setFixedAngle(bool on)
Definition RXLineEntity.h:141
QSharedPointer< RXLineEntity > cloneToXLineEntity() const
Definition RXLineEntity.h:87
static RPropertyTypeId PropertyCustom
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RXLineEntity.h:41
static RPropertyTypeId PropertyColor
Definition RXLineEntity.h:51
static RPropertyTypeId PropertyLineweight
Definition RXLineEntity.h:50
double getAngle() const
Definition RXLineEntity.h:133
static RPropertyTypeId PropertyWorkingSet
Definition RXLineEntity.h:44
void setSecondPoint(const RVector &p)
Definition RXLineEntity.h:117
RXLineData data
Definition RXLineEntity.h:180
static RPropertyTypeId PropertyDisplayedColor
Definition RXLineEntity.h:52
static RPropertyTypeId PropertyHandle
Definition RXLineEntity.h:42
static RPropertyTypeId PropertySecondPointZ
Definition RXLineEntity.h:60
RVector getBasePoint() const
Definition RXLineEntity.h:113
bool trimEndPoint(const RVector &trimPoint, const RVector &clickPoint=RVector::invalid, bool extend=false)
Definition RXLineEntity.h:168
void setBasePoint(const RVector &p)
Definition RXLineEntity.h:109
bool hasFixedAngle() const
Definition RXLineEntity.h:137
Low-level mathematical representation of an infinite line.
Definition RXLine.h:42
#define QCADENTITY_EXPORT
Definition entity_global.h:10
#define NULL
Definition opennurbs_system.h:256