RUcs
Class in Core Module
Header: #include <src/core/RUcs.h>
Inherits: RObject
Description
Section titled “Description”Represents a user coordinate system (UCS) in a drawing.
The current UCS of a drawing defines the current workplane and coordinate system that is being used for all input.
Scriptable: This class is available in script environments.
Shared Pointer Support: Objects can be used in QSharedPointer.
Public Functions
Section titled “Public Functions”RUcs() |
|
RUcs(RDocument *document, const QString &name, const RVector &origin, const RVector &xAxisDirection, const RVector &yAxisDirection) |
|
| virtual | ~RUcs() |
| virtual QSharedPointer< RObject > | clone() const |
| QSharedPointer< RUcs > | cloneToUcs() const |
| virtual QPair< QVariant, RPropertyAttributes > | getProperty(RPropertyTypeId &propertyTypeId, bool humanReadable=false, bool noAttributes=false, bool showOnRequest=false) |
| virtual RS::EntityType | getType() const |
| RVector | getZAxisDirection() |
| RVector | mapFromUcs(const RVector &positionUcs)Maps the given UCS (user coordinate system) position to an absolute WCS (world coordinate system) position. |
| RVector | mapToUcs(const RVector &positionWcs)Maps the given WCS position to a UCS position. |
| void | setOrigin(const RVector &o) |
| virtual bool | setProperty(RPropertyTypeId propertyTypeId, const QVariant &value, RTransaction *transaction=NULL)Sets the given property to the given value. |
| void | setXAxisDirection(const RVector &x) |
| void | setYAxisDirection(const RVector &y) |
Static Public Functions
Section titled “Static Public Functions”| static RS::EntityType | getRtti() |
| static void | init() |
Public Attributes
Section titled “Public Attributes”| QString | name |
| RVector | origin |
| RVector | xAxisDirection |
| RVector | yAxisDirection |
Static Public Attributes
Section titled “Static Public Attributes”| static RPropertyTypeId | PropertyName |
| static RPropertyTypeId | PropertyOriginX |
| static RPropertyTypeId | PropertyOriginY |
| static RPropertyTypeId | PropertyOriginZ |
| static RPropertyTypeId | PropertyXAxisDirectionX |
| static RPropertyTypeId | PropertyXAxisDirectionY |
| static RPropertyTypeId | PropertyXAxisDirectionZ |
| static RPropertyTypeId | PropertyYAxisDirectionX |
| static RPropertyTypeId | PropertyYAxisDirectionY |
| static RPropertyTypeId | PropertyYAxisDirectionZ |
Member Documentation
Section titled “Member Documentation”RUcs::RUcs()inline
RUcs::RUcs(RDocument *document, const QString &name, const RVector &origin, const RVector &xAxisDirection, const RVector &yAxisDirection)inline
virtual RUcs::~RUcs()virtual inline
virtual QSharedPointer< RObject > RUcs::clone() constvirtual inline const
Reimplemented from clone.
cloneToUcs
Section titled “cloneToUcs”QSharedPointer< RUcs > RUcs::cloneToUcs() constinline const
getProperty
Section titled “getProperty”virtual QPair< QVariant, RPropertyAttributes > RUcs::getProperty(RPropertyTypeId &propertyTypeId, bool humanReadable=false, bool noAttributes=false, bool showOnRequest=false)virtual
Returns: The value and attributes of the given property or an invalid property if this property owner has no property with the given ID.
Reimplemented from getProperty.
getType
Section titled “getType”virtual RS::EntityType RUcs::getType() constvirtual inline const
Returns: The unique entity type, usually the same as RTTI, different for custom entities.
Reimplemented from getType.
getZAxisDirection
Section titled “getZAxisDirection”RVector RUcs::getZAxisDirection()Returns: Vector that indicates the direction of the Z-Axis (orthogonal to the XY plane).
mapFromUcs
Section titled “mapFromUcs”RVector RUcs::mapFromUcs(const RVector &positionUcs)Maps the given UCS (user coordinate system) position to an absolute WCS (world coordinate system) position.
mapToUcs
Section titled “mapToUcs”RVector RUcs::mapToUcs(const RVector &positionWcs)Maps the given WCS position to a UCS position.
setOrigin
Section titled “setOrigin”void RUcs::setOrigin(const RVector &o)inline
setProperty
Section titled “setProperty”virtual bool RUcs::setProperty(RPropertyTypeId propertyTypeId, const QVariant &value, RTransaction *transaction=NULL)virtual
Sets the given property to the given value.
If this property owner does not know a property with that ID, it is up to the property owner what happens. The property might be added into a list of dynamic properties or dropped.
Returns: True if the property owner was modified in any way, false otherwise.
Reimplemented from setProperty.
setXAxisDirection
Section titled “setXAxisDirection”void RUcs::setXAxisDirection(const RVector &x)inline
setYAxisDirection
Section titled “setYAxisDirection”void RUcs::setYAxisDirection(const RVector &y)inline
getRtti
Section titled “getRtti”static RS::EntityType RUcs::getRtti()static inline
static void RUcs::init()static
QString RUcs::nameorigin
Section titled “origin”RVector RUcs::originxAxisDirection
Section titled “xAxisDirection”RVector RUcs::xAxisDirectionyAxisDirection
Section titled “yAxisDirection”RVector RUcs::yAxisDirectionPropertyName
Section titled “PropertyName”static RPropertyTypeId RUcs::PropertyNamestatic
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.
PropertyOriginX
Section titled “PropertyOriginX”static RPropertyTypeId RUcs::PropertyOriginXstatic
PropertyOriginY
Section titled “PropertyOriginY”static RPropertyTypeId RUcs::PropertyOriginYstatic
PropertyOriginZ
Section titled “PropertyOriginZ”static RPropertyTypeId RUcs::PropertyOriginZstatic
PropertyXAxisDirectionX
Section titled “PropertyXAxisDirectionX”static RPropertyTypeId RUcs::PropertyXAxisDirectionXstatic
PropertyXAxisDirectionY
Section titled “PropertyXAxisDirectionY”static RPropertyTypeId RUcs::PropertyXAxisDirectionYstatic
PropertyXAxisDirectionZ
Section titled “PropertyXAxisDirectionZ”static RPropertyTypeId RUcs::PropertyXAxisDirectionZstatic
PropertyYAxisDirectionX
Section titled “PropertyYAxisDirectionX”static RPropertyTypeId RUcs::PropertyYAxisDirectionXstatic
PropertyYAxisDirectionY
Section titled “PropertyYAxisDirectionY”static RPropertyTypeId RUcs::PropertyYAxisDirectionYstatic
PropertyYAxisDirectionZ
Section titled “PropertyYAxisDirectionZ”static RPropertyTypeId RUcs::PropertyYAxisDirectionZstatic