Skip to content

RPolyMeshEntity

Class in Entity Module
Header: #include <src/entity/RPolyMeshEntity.h>
Inherits: REntity

Polygon mesh entity: an indexed mesh of faces with three or more vertices sharing one list of vertices (see RPolyMeshData).

Stored in DXF/DWG as MESH (AutoCAD 2010 and newer) or polyface mesh (older formats), imported from MESH, polyface meshes and polygon meshes.

Rendering is implemented by a proxy (see RPolyMeshEntityProxy).

Scriptable: This class is available in script environments.

Shared Pointer Support: Objects can be used in QSharedPointer.

RPolyMeshEntity(RDocument *document, const RPolyMeshData &data)
virtual ~RPolyMeshEntity()
virtual QSharedPointer< RObject > clone() const
QSharedPointer< RPolyMeshEntity > cloneToPolyMeshEntity() const
int countFaces() const
int countVertices() const
virtual void exportEntity(RExporter &e, bool preview=false, bool forceSelected=false) const
Exports the entity to the given exporter.
virtual RPolyMeshData & getData()
virtual const RPolyMeshData & getData() const
QList< int > getFace(int index) const
QList< int > getFaces() const
virtual QPair< QVariant, RPropertyAttributes > getProperty(RPropertyTypeId &propertyTypeId, bool humanReadable=false, bool noAttributes=false, bool showOnRequest=false)
QList< RTriangle > getTriangles() const
RVector getVertexAt(int index) const
QList< RVector > getVertices() const
bool isTriangleMesh() const
virtual bool setProperty(RPropertyTypeId propertyTypeId, const QVariant &value, RTransaction *transaction=NULL)
Sets the given property to the given value.
static RPolyMeshEntityProxy * getPolyMeshEntityProxy()
static RS::EntityType getRtti()
static QSet< RPropertyTypeId > getStaticPropertyTypeIds()
static bool hasProxy()
static void init()
static void setPolyMeshEntityProxy(RPolyMeshEntityProxy *p)
static RPropertyTypeId PropertyBlock
static RPropertyTypeId PropertyColor
static RPropertyTypeId PropertyCustom
static RPropertyTypeId PropertyDisplayedColor
static RPropertyTypeId PropertyDrawOrder
static RPropertyTypeId PropertyFaceCount
static RPropertyTypeId PropertyHandle
static RPropertyTypeId PropertyLayer
static RPropertyTypeId PropertyLinetype
static RPropertyTypeId PropertyLinetypeScale
static RPropertyTypeId PropertyLineweight
static RPropertyTypeId PropertyProtected
static RPropertyTypeId PropertyType
static RPropertyTypeId PropertyVertexCount
static RPropertyTypeId PropertyWorkingSet
virtual void print(QDebug dbg) const
Stream operator for QDebug.
RPolyMeshData data
static RPolyMeshEntityProxy * polyMeshEntityProxy

RPolyMeshEntity::RPolyMeshEntity(RDocument *document, const RPolyMeshData &data)

virtual RPolyMeshEntity::~RPolyMeshEntity()

virtual

virtual QSharedPointer< RObject > RPolyMeshEntity::clone() const

virtual inline const

Reimplemented from clone.

QSharedPointer< RPolyMeshEntity > RPolyMeshEntity::cloneToPolyMeshEntity() const

inline const

int RPolyMeshEntity::countFaces() const

inline const

int RPolyMeshEntity::countVertices() const

inline const

virtual void RPolyMeshEntity::exportEntity(RExporter &e, bool preview=false, bool forceSelected=false) const

virtual const

Exports the entity to the given exporter.

The exporter might be a file exporter, a graphics scene or any other platform one can export entities to.

Reimplemented from exportEntity.

virtual RPolyMeshData & RPolyMeshEntity::getData()

virtual inline

Returns: Reference to the data object of the entity.

Reimplemented from getData.

virtual const RPolyMeshData & RPolyMeshEntity::getData() const

virtual inline const

Returns: Const reference to the data object of the entity.

Reimplemented from getData.

QList< int > RPolyMeshEntity::getFace(int index) const

inline const

QList< int > RPolyMeshEntity::getFaces() const

inline const

virtual QPair< QVariant, RPropertyAttributes > RPolyMeshEntity::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.

QList< RTriangle > RPolyMeshEntity::getTriangles() const

inline const

RVector RPolyMeshEntity::getVertexAt(int index) const

inline const

QList< RVector > RPolyMeshEntity::getVertices() const

inline const

bool RPolyMeshEntity::isTriangleMesh() const

inline const

virtual bool RPolyMeshEntity::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.

static RPolyMeshEntityProxy * RPolyMeshEntity::getPolyMeshEntityProxy()

static inline

Non-Scriptable: This function is not available in script environments.

static RS::EntityType RPolyMeshEntity::getRtti()

static inline

static QSet< RPropertyTypeId > RPolyMeshEntity::getStaticPropertyTypeIds()

static inline

static bool RPolyMeshEntity::hasProxy()

static inline

static void RPolyMeshEntity::init()

static

static void RPolyMeshEntity::setPolyMeshEntityProxy(RPolyMeshEntityProxy *p)

static inline

Non-Scriptable: This function is not available in script environments.

static RPropertyTypeId RPolyMeshEntity::PropertyBlock

static

static RPropertyTypeId RPolyMeshEntity::PropertyColor

static

static RPropertyTypeId RPolyMeshEntity::PropertyCustom

static

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.

static RPropertyTypeId RPolyMeshEntity::PropertyDisplayedColor

static

static RPropertyTypeId RPolyMeshEntity::PropertyDrawOrder

static

static RPropertyTypeId RPolyMeshEntity::PropertyFaceCount

static

static RPropertyTypeId RPolyMeshEntity::PropertyHandle

static

static RPropertyTypeId RPolyMeshEntity::PropertyLayer

static

static RPropertyTypeId RPolyMeshEntity::PropertyLinetype

static

static RPropertyTypeId RPolyMeshEntity::PropertyLinetypeScale

static

static RPropertyTypeId RPolyMeshEntity::PropertyLineweight

static

static RPropertyTypeId RPolyMeshEntity::PropertyProtected

static

static RPropertyTypeId RPolyMeshEntity::PropertyType

static

static RPropertyTypeId RPolyMeshEntity::PropertyVertexCount

static

static RPropertyTypeId RPolyMeshEntity::PropertyWorkingSet

static

virtual void RPolyMeshEntity::print(QDebug dbg) const

virtual const protected

Stream operator for QDebug.

Reimplemented from print.

RPolyMeshData RPolyMeshEntity::data

protected

static RPolyMeshEntityProxy * RPolyMeshEntity::polyMeshEntityProxy = NULL

static protected