83 virtual QSharedPointer<RObject>
clone()
const {
84 return QSharedPointer<RObject>(
new RRayEntity(*
this));
88 return QSharedPointer<RRayEntity>(
new RRayEntity(*
this));
93 virtual QPair<QVariant, RPropertyAttributes>
getProperty(
95 bool humanReadable =
false,
bool noAttributes =
false,
bool showOnRequest =
false);
107 void setShape(
const RRay& r);
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
Stores and manages all data that defines the geometry and appearance of a ray entity.
Definition RRayData.h:40
Infinite ray entity.
Definition RRayEntity.h:38
virtual RRayData & getData()
Definition RRayEntity.h:99
virtual QSharedPointer< RObject > clone() const
Definition RRayEntity.h:83
static RPropertyTypeId PropertyProtected
Definition RRayEntity.h:43
double getDirection2() const
Definition RRayEntity.h:149
static RPropertyTypeId PropertyWorkingSet
Definition RRayEntity.h:44
static RPropertyTypeId PropertyDirectionX
Definition RRayEntity.h:62
static QSet< RPropertyTypeId > getStaticPropertyTypeIds()
Definition RRayEntity.h:79
static RPropertyTypeId PropertyDisplayedColor
Definition RRayEntity.h:52
static RPropertyTypeId PropertyLineweight
Definition RRayEntity.h:50
static RPropertyTypeId PropertyLayer
Definition RRayEntity.h:47
double getDirection1() const
Definition RRayEntity.h:145
RS::Ending getTrimEnd(const RVector &trimPoint, const RVector &clickPoint)
Definition RRayEntity.h:161
QSharedPointer< RRayEntity > cloneToRayEntity() const
Definition RRayEntity.h:87
RVector getBasePoint() const
Definition RRayEntity.h:113
virtual const RRayData & getData() const
Definition RRayEntity.h:103
static RPropertyTypeId PropertyBasePointZ
Definition RRayEntity.h:57
void setFixedAngle(bool on)
Definition RRayEntity.h:141
static RPropertyTypeId PropertyColor
Definition RRayEntity.h:51
static RPropertyTypeId PropertyLinetype
Definition RRayEntity.h:48
void setSecondPoint(const RVector &p)
Definition RRayEntity.h:117
static RPropertyTypeId PropertyType
Definition RRayEntity.h:45
void setDirectionVectorPoint(const RVector &v)
Definition RRayEntity.h:125
RS::Side getSideOfPoint(const RVector &point) const
Definition RRayEntity.h:157
static RPropertyTypeId PropertyBlock
Definition RRayEntity.h:46
double getAngle() const
Definition RRayEntity.h:133
RVector getDirectionVector() const
Definition RRayEntity.h:129
RVector getSecondPoint() const
Definition RRayEntity.h:121
static RPropertyTypeId PropertyFixedAngle
Definition RRayEntity.h:67
static RPropertyTypeId PropertyAngle
Definition RRayEntity.h:66
void setBasePoint(const RVector &p)
Definition RRayEntity.h:109
bool hasFixedAngle() const
Definition RRayEntity.h:137
double getLength() const
Definition RRayEntity.h:172
static RPropertyTypeId PropertyLinetypeScale
Definition RRayEntity.h:49
static RPropertyTypeId PropertyDirectionY
Definition RRayEntity.h:63
static RPropertyTypeId PropertyBasePointY
Definition RRayEntity.h:56
static RPropertyTypeId PropertySecondPointZ
Definition RRayEntity.h:60
RRayData data
Definition RRayEntity.h:180
bool trimStartPoint(const RVector &trimPoint, const RVector &clickPoint=RVector::invalid, bool extend=false)
Definition RRayEntity.h:165
bool trimEndPoint(const RVector &trimPoint, const RVector &clickPoint=RVector::invalid, bool extend=false)
Definition RRayEntity.h:168
static RPropertyTypeId PropertyCustom
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RRayEntity.h:41
static RS::EntityType getRtti()
Definition RRayEntity.h:75
static RPropertyTypeId PropertyDrawOrder
Definition RRayEntity.h:53
static RPropertyTypeId PropertySecondPointX
Definition RRayEntity.h:58
static RPropertyTypeId PropertyDirectionZ
Definition RRayEntity.h:64
static RPropertyTypeId PropertyBasePointX
Definition RRayEntity.h:55
static RPropertyTypeId PropertySecondPointY
Definition RRayEntity.h:59
bool reverse()
Definition RRayEntity.h:153
static RPropertyTypeId PropertyHandle
Definition RRayEntity.h:42
Low-level mathematical representation of a ray.
Definition RRay.h:41
EntityType
Entity types used for property handling / filtering.
Definition RS.h:227
@ EntityRay
Ray.
Definition RS.h:251
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
#define QCADENTITY_EXPORT
Definition entity_global.h:10
#define NULL
Definition opennurbs_system.h:256