QCAD
Open Source 2D CAD
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RPointData Class Reference

Copyright (c) 2011-2013 by Andrew Mustun. More...

#include <RPointData.h>

Inheritance diagram for RPointData:
REntityData RPoint RShape

List of all members.

Public Member Functions

virtual RShapecastToShape ()
RVector getPosition () const
virtual QList< RVectorgetReferencePoints (RS::ProjectionRenderingHint hint=RS::RenderTop) const
virtual QList< QSharedPointer
< RShape > > 
getShapes (const RBox &queryBox=RDEFAULT_RBOX) const
virtual bool moveReferencePoint (const RVector &referencePoint, const RVector &targetPoint)
 Moves the given reference point to the given target point or does nothing if this entity has no reference point as the given location.
 RPointData ()
 Copyright (c) 2011-2013 by Andrew Mustun.
 RPointData (const RVector &point)
- Public Member Functions inherited from REntityData
virtual const RShapecastToConstShape () const
virtual bool flipHorizontal ()
virtual bool flipVertical ()
RBlock::Id getBlockId () const
QString getBlockName () const
virtual RBox getBoundingBox () const
virtual QList< RBoxgetBoundingBoxes () const
virtual QList< RVectorgetCenterPoints (const RBox &queryBox=RDEFAULT_RBOX) const
virtual RVector getClosestPointOnEntity (const RVector &point, double range=RNANDOUBLE, bool limited=true) const
virtual QSharedPointer< RShapegetClosestShape (const RVector &pos, double range=RNANDOUBLE) const
virtual RColor getColor () const
virtual RColor getColor (bool resolve, const QStack< RBlockReferenceEntity * > &blockRefStack) const
virtual double getDistanceTo (const RVector &point, bool limited=true, double range=0.0, bool draft=false) const
RDocumentgetDocument ()
const RDocumentgetDocument () const
virtual int getDrawOrder () const
virtual QList< RVectorgetEndPoints (const RBox &queryBox=RDEFAULT_RBOX) const
virtual QList< RVectorgetInternalReferencePoints (RS::ProjectionRenderingHint hint=RS::RenderTop) const
 Can be overwritten to return internal, resolved reference points.
virtual QList< RVectorgetIntersectionPoints (const REntityData &other, bool limited=true, bool same=false, const RBox &queryBox=RDEFAULT_RBOX) const
 Override to disable intersection point.
virtual QList< RVectorgetIntersectionPoints (const RShape &shape, bool limited=true, const RBox &queryBox=RDEFAULT_RBOX) const
RLayer::Id getLayerId () const
QString getLayerName () const
RLinetype::Id getLinetypeId () const
virtual RLinetype::Id getLinetypeId (bool resolve, const QStack< RBlockReferenceEntity * > &blockRefStack) const
RLineweight::Lineweight getLineweight () const
virtual RLineweight::Lineweight getLineweight (bool resolve, const QStack< RBlockReferenceEntity * > &blockRefStack) const
double getLineweightInUnits (const QStack< RBlockReferenceEntity * > &blockRefStack) const
virtual QList< RVectorgetMiddlePoints (const RBox &queryBox=RDEFAULT_RBOX) const
RObject::Id getParentId () const
virtual RVector getPointOnEntity () const
virtual QList< RVectorgetPointsWithDistanceToEnd (double distance, RS::From from=RS::FromAny, const RBox &queryBox=RDEFAULT_RBOX) const
virtual RVector getVectorTo (const RVector &point, bool limited=true) const
virtual bool intersectsWith (const RShape &shape) const
virtual bool isInside (const RBox &box) const
virtual bool isOnEntity (const RVector &point, bool limited=true) const
virtual bool isSelected () const
virtual bool mirror (const RLine &axis)
virtual bool mirror (const RVector &axis1, const RVector &axis2)
virtual bool move (const RVector &offset)
 Moves this entity by the given offset.
 REntityData (RDocument *document=NULL)
 Copyright (c) 2011-2013 by Andrew Mustun.
virtual bool rotate (double rotation, const RVector &center=RDEFAULT_RVECTOR)
virtual bool scale (const RVector &scaleFactors, const RVector &center=RDEFAULT_RVECTOR)
virtual bool scale (double scaleFactor, const RVector &center=RDEFAULT_RVECTOR)
virtual void setBlockId (RBlock::Id blockId)
void setColor (const RColor &color)
void setDocument (RDocument *document)
virtual void setDrawOrder (int drawOrder)
 Sets the draw order of this entity.
virtual void setLayerId (RLayer::Id layerId)
virtual void setLinetype (RLinetype linetype)
virtual void setLinetypeId (RLinetype::Id linetypeId)
void setLineweight (RLineweight::Lineweight lineweight)
virtual void setParentId (RObject::Id parentId)
virtual void setSelected (bool on)
 Selects or deselects this entity.
virtual bool stretch (const RPolyline &area, const RVector &offset)
 Stretches the end points of this entity that are inside area by offset.
virtual void update () const
 Entities can reimplement this function to invalidate any internal cache (mark the entity as dirty).
virtual ~REntityData ()

Protected Member Functions

 RPointData (RDocument *document, const RPointData &data)
- Protected Member Functions inherited from RPoint
virtual RPointclone () const
virtual bool flipHorizontal ()
virtual bool flipVertical ()
virtual RBox getBoundingBox () const
virtual QList< RVectorgetCenterPoints () const
virtual QList< RVectorgetEndPoints () const
virtual double getLength () const
virtual QList< RVectorgetMiddlePoints () const
virtual QList< RVectorgetPointsWithDistanceToEnd (double distance, RS::From from=RS::FromAny) const
virtual QSharedPointer< RShapegetTransformed (const QTransform &transform) const
virtual RVector getVectorTo (const RVector &point, bool limited=true) const
virtual bool mirror (const RLine &axis)
virtual bool move (const RVector &offset)
virtual bool rotate (double rotation, const RVector &center=RDEFAULT_RVECTOR)
 RPoint ()
 Copyright (c) 2011-2013 by Andrew Mustun.
 RPoint (const RVector &position)
 Creates a point object with the given position.
virtual bool scale (const RVector &scaleFactors, const RVector &center=RDEFAULT_RVECTOR)
void setPosition (const RVector &p)
virtual void to2D ()
 Flattens this shape to the X/Y plane.
virtual ~RPoint ()
virtual void print (QDebug dbg) const
- Protected Member Functions inherited from RShape
void dump ()
virtual QList< RVectorfilterOnShape (const QList< RVector > &pointList, bool limited=true, double tolerance=RDEFAULT_TOLERANCE_1E_MIN4) const
virtual RVector getClosestPointOnShape (const RVector &p, bool limited=true) const
virtual double getDistanceTo (const RVector &point, bool limited=true) const
QList< RVectorgetIntersectionPoints (const RShape &other, bool limited=true, bool same=false, bool force=false) const
virtual RVector getPointAtPercent (double p) const
virtual RVector getVectorFromEndpointTo (const RVector &point) const
virtual bool intersectsWith (const RShape &other, bool limited=true) const
virtual bool isInterpolated () const
 Reimplement and return true if this shape relies on interpolation for geometrical operations such as finding intersection points.
virtual bool isOnShape (const RVector &point, bool limited=true, double tolerance=RDEFAULT_TOLERANCE_1E_MIN4) const
 RShape ()
virtual bool scale (double scaleFactor, const RVector &center=RVector())
virtual bool stretch (const RBox &area, const RVector &offset)
virtual bool stretch (const RPolyline &area, const RVector &offset)
virtual ~RShape ()

Friends

class RPointEntity

Additional Inherited Members

- Protected Attributes inherited from REntityData
RBlock::Id blockId
RColor color
RDocumentdocument
int drawOrder
RLayer::Id layerId
RLinetype::Id linetypeId
RLineweight::Lineweight lineweight
RObject::Id parentId
bool selectionStatus
- Protected Attributes inherited from RPoint
RVector position
 Getter function for this property: getPosition.

Detailed Description

Copyright (c) 2011-2013 by Andrew Mustun.

All rights reserved.

This file is part of the QCAD project.

QCAD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

QCAD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with QCAD. Stores and manages all data that defines the geometry and appearance of a point entity.

Scriptable:
This class is wrapped for script environments.

Constructor & Destructor Documentation

RPointData::RPointData ( RDocument document,
const RPointData data 
)
protected
RPointData::RPointData ( )

Copyright (c) 2011-2013 by Andrew Mustun.

All rights reserved.

This file is part of the QCAD project.

QCAD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

QCAD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with QCAD.

RPointData::RPointData ( const RVector point)

Member Function Documentation

virtual RShape* RPointData::castToShape ( )
inlinevirtual

Reimplemented from REntityData.

RVector RPointData::getPosition ( ) const
inline

Reimplemented from RPoint.

QList< RVector > RPointData::getReferencePoints ( RS::ProjectionRenderingHint  hint = RS::RenderTop) const
virtual
Returns:
Vector of reference points of this entity. Reference points can usually be moved around by the user to change the geometry of the entity.

Implements REntityData.

virtual QList<QSharedPointer<RShape> > RPointData::getShapes ( const RBox queryBox = RDEFAULT_RBOX) const
inlinevirtual
Returns:
Shapes that represent the geometry of this entity.

Reimplemented from REntityData.

bool RPointData::moveReferencePoint ( const RVector referencePoint,
const RVector targetPoint 
)
virtual

Moves the given reference point to the given target point or does nothing if this entity has no reference point as the given location.

Returns:
True if a reference point has been moved successfully, false otherwise.

Implements REntityData.


Friends And Related Function Documentation

friend class RPointEntity
friend

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