PLY writer context from XCAF document. More...
#include <RWPly_CafWriter.hxx>

Public Member Functions | |
| RWPly_CafWriter (const TCollection_AsciiString &theFile) | |
| Main constructor. | |
| virtual | ~RWPly_CafWriter () |
| Destructor. | |
| const RWMesh_CoordinateSystemConverter & | CoordinateSystemConverter () const |
| Return transformation from OCCT to PLY coordinate system. | |
| RWMesh_CoordinateSystemConverter & | ChangeCoordinateSystemConverter () |
| Return transformation from OCCT to PLY coordinate system. | |
| void | SetCoordinateSystemConverter (const RWMesh_CoordinateSystemConverter &theConverter) |
| Set transformation from OCCT to PLY coordinate system. | |
| const XCAFPrs_Style & | DefaultStyle () const |
| Return default material definition to be used for nodes with only color defined. | |
| void | SetDefaultStyle (const XCAFPrs_Style &theStyle) |
| Set default material definition to be used for nodes with only color defined. | |
| bool | IsDoublePrecision () const |
| Return TRUE if vertex position should be stored with double floating point precision; FALSE by default. | |
| void | SetDoublePrecision (bool theDoublePrec) |
| Set if vertex position should be stored with double floating point precision. | |
| bool | HasNormals () const |
| Return TRUE if normals should be written; TRUE by default. | |
| void | SetNormals (const bool theHasNormals) |
| Set if normals are defined. | |
| bool | HasTexCoords () const |
| Return TRUE if UV / texture coordinates should be written; FALSE by default. | |
| void | SetTexCoords (const bool theHasTexCoords) |
| Set if UV / texture coordinates should be written. | |
| bool | HasColors () const |
| Return TRUE if point colors should be written; TRUE by default. | |
| void | SetColors (bool theToWrite) |
| Set if point colors should be written. | |
| bool | HasPartId () const |
| Return TRUE if part Id should be written as element attribute; TRUE by default. | |
| void | SetPartId (bool theSurfId) |
| Set if part Id should be written as element attribute; FALSE by default. Cannot be combined with HasFaceId(). | |
| bool | HasFaceId () const |
| Return TRUE if face Id should be written as element attribute; FALSE by default. | |
| void | SetFaceId (bool theSurfId) |
| Set if face Id should be written as element attribute; FALSE by default. Cannot be combined with HasPartId(). | |
| virtual bool | Perform (const Handle< TDocStd_Document > &theDocument, const TDF_LabelSequence &theRootLabels, const TColStd_MapOfAsciiString *theLabelFilter, const TColStd_IndexedDataMapOfStringString &theFileInfo, const Message_ProgressRange &theProgress) |
| Write PLY file and associated MTL material file. Triangulation data should be precomputed within shapes! | |
| virtual bool | Perform (const Handle< TDocStd_Document > &theDocument, const TColStd_IndexedDataMapOfStringString &theFileInfo, const Message_ProgressRange &theProgress) |
| Write PLY file and associated MTL material file. Triangulation data should be precomputed within shapes! | |
Public Member Functions inherited from Standard_Transient | |
| Standard_Transient () | |
| Empty constructor. | |
| Standard_Transient (const Standard_Transient &) | |
| Copy constructor – does nothing. | |
| Standard_Transient & | operator= (const Standard_Transient &) |
| Assignment operator, needed to avoid copying reference counter. | |
| virtual | ~Standard_Transient () |
| Destructor must be virtual. | |
| virtual const opencascade::handle< Standard_Type > & | DynamicType () const |
| Returns a type descriptor about this object. | |
| Standard_Boolean | IsInstance (const opencascade::handle< Standard_Type > &theType) const |
| Returns a true value if this is an instance of Type. | |
| Standard_Boolean | IsInstance (const Standard_CString theTypeName) const |
| Returns a true value if this is an instance of TypeName. | |
| Standard_Boolean | IsKind (const opencascade::handle< Standard_Type > &theType) const |
| Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. | |
| Standard_Boolean | IsKind (const Standard_CString theTypeName) const |
| Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. | |
| Standard_Transient * | This () const |
| Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero. | |
| Standard_Integer | GetRefCount () const noexcept |
| Get the reference counter of this object. | |
| void | IncrementRefCounter () noexcept |
| Increments the reference counter of this object. | |
| Standard_Integer | DecrementRefCounter () noexcept |
| Decrements the reference counter of this object; returns the decremented value. | |
| virtual void | Delete () const |
| Memory deallocator for transient classes. | |
Protected Member Functions | |
| virtual Standard_Boolean | toSkipFaceMesh (const RWMesh_FaceIterator &theFaceIter) |
| Return TRUE if face mesh should be skipped (e.g. because it is invalid or empty). | |
| virtual void | addFaceInfo (const RWMesh_FaceIterator &theFace, Standard_Integer &theNbNodes, Standard_Integer &theNbElems) |
| Collect face triangulation info. | |
| virtual bool | writeShape (RWPly_PlyWriterContext &theWriter, Message_LazyProgressScope &thePSentry, const Standard_Integer theWriteStep, const TDF_Label &theLabel, const TopLoc_Location &theParentTrsf, const XCAFPrs_Style &theParentStyle) |
| Write the shape. | |
| virtual bool | writeNodes (RWPly_PlyWriterContext &theWriter, Message_LazyProgressScope &thePSentry, const RWMesh_FaceIterator &theFace) |
| Write face triangle vertices and attributes. | |
| virtual bool | writeIndices (RWPly_PlyWriterContext &theWriter, Message_LazyProgressScope &thePSentry, const RWMesh_FaceIterator &theFace) |
| Write face triangles indices. | |
Protected Attributes | |
| TCollection_AsciiString | myFile |
| output PLY file | |
| RWMesh_CoordinateSystemConverter | myCSTrsf |
| transformation from OCCT to PLY coordinate system | |
| XCAFPrs_Style | myDefaultStyle |
| default material definition to be used for nodes with only color defined | |
| Standard_Boolean | myIsDoublePrec |
| Standard_Boolean | myHasNormals |
| Standard_Boolean | myHasColors |
| Standard_Boolean | myHasTexCoords |
| Standard_Boolean | myHasPartId |
| Standard_Boolean | myHasFaceId |
Additional Inherited Members | |
| typedef void | base_type |
| Returns a type descriptor about this object. | |
| static constexpr const char * | get_type_name () |
| Returns a type descriptor about this object. | |
| static const opencascade::handle< Standard_Type > & | get_type_descriptor () |
| Returns type descriptor of Standard_Transient class. | |
PLY writer context from XCAF document.
| RWPly_CafWriter::RWPly_CafWriter | ( | const TCollection_AsciiString & | theFile | ) |
Main constructor.
| [in] | theFile | path to output PLY file |
|
virtual |
Destructor.
|
protectedvirtual |
Collect face triangulation info.
| [in] | theFace | face to process |
| [in,out] | theNbNodes | overall number of triangulation nodes (should be appended) |
| [in,out] | theNbElems | overall number of triangulation elements (should be appended) |
|
inline |
Return transformation from OCCT to PLY coordinate system.
|
inline |
Return transformation from OCCT to PLY coordinate system.
|
inline |
Return default material definition to be used for nodes with only color defined.
|
inline |
Return TRUE if point colors should be written; TRUE by default.
|
inline |
Return TRUE if face Id should be written as element attribute; FALSE by default.
|
inline |
Return TRUE if normals should be written; TRUE by default.
|
inline |
Return TRUE if part Id should be written as element attribute; TRUE by default.
|
inline |
Return TRUE if UV / texture coordinates should be written; FALSE by default.
|
inline |
Return TRUE if vertex position should be stored with double floating point precision; FALSE by default.
|
virtual |
Write PLY file and associated MTL material file. Triangulation data should be precomputed within shapes!
| [in] | theDocument | input document |
| [in] | theFileInfo | map with file metadata to put into PLY header section |
| [in] | theProgress | optional progress indicator |
|
virtual |
Write PLY file and associated MTL material file. Triangulation data should be precomputed within shapes!
| [in] | theDocument | input document |
| [in] | theRootLabels | list of root shapes to export |
| [in] | theLabelFilter | optional filter with document nodes to export, with keys defined by XCAFPrs_DocumentExplorer::DefineChildId() and filled recursively (leaves and parent assembly nodes at all levels); when not NULL, all nodes not included into the map will be ignored |
| [in] | theFileInfo | map with file metadata to put into PLY header section |
| [in] | theProgress | optional progress indicator |
|
inline |
Set if point colors should be written.
|
inline |
Set transformation from OCCT to PLY coordinate system.
|
inline |
Set default material definition to be used for nodes with only color defined.
|
inline |
Set if vertex position should be stored with double floating point precision.
|
inline |
Set if face Id should be written as element attribute; FALSE by default. Cannot be combined with HasPartId().
|
inline |
Set if normals are defined.
|
inline |
Set if part Id should be written as element attribute; FALSE by default. Cannot be combined with HasFaceId().
|
inline |
Set if UV / texture coordinates should be written.
|
protectedvirtual |
Return TRUE if face mesh should be skipped (e.g. because it is invalid or empty).
|
protectedvirtual |
Write face triangles indices.
| [in] | theWriter | PLY writer context |
| [in] | thePSentry | progress sentry |
| [in] | theFace | current face |
|
protectedvirtual |
Write face triangle vertices and attributes.
| [in] | theWriter | PLY writer context |
| [in] | thePSentry | progress sentry |
| [in] | theFace | current face |
|
protectedvirtual |
Write the shape.
| [in] | theWriter | PLY writer context |
| [in] | thePSentry | progress sentry |
| [in] | theWriteStep | export step, 0 for vertex attributes, 1 for elements |
| [in] | theLabel | document label to process |
| [in] | theParentTrsf | parent node transformation |
| [in] | theParentStyle | parent node style |
|
protected |
transformation from OCCT to PLY coordinate system
|
protected |
default material definition to be used for nodes with only color defined
|
protected |
output PLY file
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |