The dimeEntity class is the superclass of all entity classes. More...
#include <Entity.h>
Inherits dimeRecordHolder.
Inherited by dimeBlock, dimeEllipse, dimeExtrusionEntity, dimeFaceEntity, dimeInsert, dimeSpline, dimeUnknownEntity and dimeVertex.
Constructor.
[virtual]
Destructor.
Returns the color number for this entity.
Sets the color number for this entity. Zero indicates the BYBLOCK (floating) color. 256 indicates BYLAYER. A negative value indicates that the layer is turned off.
[virtual]
Sets the layer for this entity. This will change the record with group code 8. If layer equals NULL, the layer will be set to the default layer.
Reimplemented in dimePolyline.
[pure virtual]
Must be implemented by subclasses to return the entity name; e.g. POLYLINE, 3DFACE, etc.
Reimplemented in dime3DFace, dimeArc, dimeBlock, dimeCircle, dimeEllipse, dimeInsert, dimeLWPolyline, dimeLine, dimePoint, dimePolyline, dimeSolid, dimeSpline, dimeTrace, dimeUnknownEntity and dimeVertex.
Returns the layer of this entity.
Convenience function which returns the layer name of this entity.
[pure virtual]
Must be implemented by subclasses to return a copy of the entity. model is the model the new entity should belong to.
Reimplemented in dime3DFace, dimeArc, dimeBlock, dimeCircle, dimeEllipse, dimeInsert, dimeLWPolyline, dimeLine, dimePoint, dimePolyline, dimeSolid, dimeSpline, dimeTrace, dimeUnknownEntity and dimeVertex.
[virtual]
Reads an entity from in. Can be overloaded by subclasses, but in most cases this will not be necessary.
Reimplemented from dimeRecordHolder.
Reimplemented in dimeBlock, dimeInsert and dimePolyline.
[virtual]
Reimplemented from dimeRecordHolder.
Reimplemented in dime3DFace, dimeArc, dimeBlock, dimeCircle, dimeEllipse, dimeInsert, dimeLWPolyline, dimeLine, dimePoint, dimePolyline, dimeSolid, dimeSpline, dimeTrace, dimeUnknownEntity and dimeVertex.
[virtual]
Reimplemented from dimeRecordHolder.
Reimplemented in dimeExtrusionEntity and dimeFaceEntity.
[virtual]
Reimplemented from dimeRecordHolder.
Reimplemented in dime3DFace, dimeArc, dimeBlock, dimeCircle, dimeEllipse, dimeExtrusionEntity, dimeFaceEntity, dimeInsert, dimeLWPolyline, dimeLine, dimePoint, dimePolyline, dimeSolid, dimeSpline, dimeTrace, dimeUnknownEntity and dimeVertex.
[virtual]
Reimplemented in dime3DFace, dimeArc, dimeCircle, dimeEllipse, dimeLWPolyline, dimeLine and dimeSpline.
Returns if this entity is marked as deleted or not.
Sets the deleted state of this entity to onOff.
[virtual]
Reimplemented from dimeRecordHolder.
Reimplemented in dime3DFace, dimeArc, dimeBlock, dimeCircle, dimeEllipse, dimeExtrusionEntity, dimeFaceEntity, dimeInsert, dimeLWPolyline, dimeLine, dimePoint, dimePolyline, dimeSolid, dimeSpline, dimeTrace and dimeVertex.
[virtual]
A special convenience function, included for your pleasure. Enables the user to ignore the type of entity, and just call this method when extracting geometry. Very useful for 3D viewers that need DXF support. Check out the dxf2vrml directory for an example on how to convert a DXF file to VRML.
Should be overloaded by all subclasses that have geometry, default function returns no geometry. Don't forget to transform vertices by the current transformation matrix if used in a callback from dimeEntity::traverse().
If there are coordinates, but no indices, this means running indices for the entire vertex array.
Different faces and/or line segments are separated by a -1 in the indices array, just as in VRML files.
If thickness != 0.0, the data should, before transformation, be extruded by that length along the extrusion direction. Hence, a point becomes a line, a line becomes a quad, and a polygon becomes an object with a volume.
If thickness == 0.0 and extrusionDir != (0,0,1) all the vertices should be transformed by a matrix that can be created using dimeEntity::generateUCS(). If you are using dimeModel::traverseEntities() to extract the geometry, simply right-multiply the UCS matrix with the matrix found in dimeState to get the correct transformation.
Reimplemented in dimeArc, dimeCircle, dimeFaceEntity, dimeLWPolyline, dimeLine, dimePoint and dimePolyline.
[static]
Static function which creates an entity based on its name.
[static]
Static function that reads all entities until an entity of type stopat is found. Returns true if all entities were read OK. When reading stops, the group code 0 and the entity name (stopat) will already have been read.
[static]
Static function which copies all non-deleted entites from array of length nument into destarray.
[static]
Static function which copies all non-deleted entites from array of length nument into a new array. Will return the number of copied entities in nument. This function returns NULL either when out of memory, or if there was no non-deleted entities.
[static]
Will return an "arbitrary" axis, based on givenaxis. Based on code from DXF Parser R10, from Autodesk Inc. Is used to find the x-axis bases on the given z-axis.
[static]
Will generate a coordinate system, based on givenaxis, which will be the z-axis in the new coordinate system.
[protected]
Writes the group code 0, layer name, and some other stuff.
[protected, virtual]
The traversal function used when dimeModel::traverseEntities() is called. Most entities use this default method, but some entities (INSERT, BUILD) will need to overload it.
Reimplemented in dimeBlock, dimeInsert and dimePolyline.
[protected, virtual]
Used to find all forward references.
Reimplemented in dimeBlock and dimeInsert.
[protected, virtual]
Reimplemented from dimeRecordHolder.
Reimplemented in dime3DFace, dimeArc, dimeBlock, dimeCircle, dimeEllipse, dimeExtrusionEntity, dimeFaceEntity, dimeInsert, dimeLWPolyline, dimeLine, dimePoint, dimePolyline, dimeSolid, dimeSpline, dimeTrace and dimeVertex.
[protected]
Copies the common and unclassified records.