OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    RWObj_ObjWriterContext Class Reference

    Auxiliary low-level tool writing OBJ file. More...

    #include <RWObj_ObjWriterContext.hxx>

    Public Member Functions

     RWObj_ObjWriterContext (const TCollection_AsciiString &theName)
     Main constructor.
     ~RWObj_ObjWriterContext ()
     Destructor, will emit error message if file was not closed.
    bool IsOpened () const
     Return true if file has been opened.
    bool Close ()
     Correctly close the file.
    bool HasNormals () const
     Return true if normals are defined.
    void SetNormals (const bool theHasNormals)
     Set if normals are defined.
    bool HasTexCoords () const
     Return true if normals are defined.
    void SetTexCoords (const bool theHasTexCoords)
     Set if normals are defined.
    bool WriteHeader (const int theNbNodes, const int theNbElems, const TCollection_AsciiString &theMatLib, const NCollection_IndexedDataMap< TCollection_AsciiString, TCollection_AsciiString > &theFileInfo)
     Write the header.
    const TCollection_AsciiString & ActiveMaterial () const
     Return active material or empty string if not set.
    bool WriteActiveMaterial (const TCollection_AsciiString &theMaterial)
     Set active material.
    bool WriteTriangle (const NCollection_Vec3< int > &theTri)
     Writing a triangle.
    bool WriteQuad (const NCollection_Vec4< int > &theQuad)
     Writing a quad.
    bool WriteVertex (const NCollection_Vec3< float > &theValue)
     Writing a vector.
    bool WriteNormal (const NCollection_Vec3< float > &theValue)
     Writing a vector.
    bool WriteTexCoord (const NCollection_Vec2< float > &theValue)
     Writing a vector.
    bool WriteGroup (const TCollection_AsciiString &theValue)
     Writing a group name.
    void FlushFace (int theNbNodes)
     Increment indices shift.

    Data Fields

    int NbFaces

    Detailed Description

    Auxiliary low-level tool writing OBJ file.

    Constructor & Destructor Documentation

    ◆ RWObj_ObjWriterContext()

    RWObj_ObjWriterContext::RWObj_ObjWriterContext ( const TCollection_AsciiString & theName)

    Main constructor.

    ◆ ~RWObj_ObjWriterContext()

    RWObj_ObjWriterContext::~RWObj_ObjWriterContext ( )

    Destructor, will emit error message if file was not closed.

    Member Function Documentation

    ◆ ActiveMaterial()

    const TCollection_AsciiString & RWObj_ObjWriterContext::ActiveMaterial ( ) const
    inline

    Return active material or empty string if not set.

    ◆ Close()

    bool RWObj_ObjWriterContext::Close ( )

    Correctly close the file.

    ◆ FlushFace()

    void RWObj_ObjWriterContext::FlushFace ( int theNbNodes)

    Increment indices shift.

    ◆ HasNormals()

    bool RWObj_ObjWriterContext::HasNormals ( ) const
    inline

    Return true if normals are defined.

    ◆ HasTexCoords()

    bool RWObj_ObjWriterContext::HasTexCoords ( ) const
    inline

    Return true if normals are defined.

    ◆ IsOpened()

    bool RWObj_ObjWriterContext::IsOpened ( ) const
    inline

    Return true if file has been opened.

    ◆ SetNormals()

    void RWObj_ObjWriterContext::SetNormals ( const bool theHasNormals)
    inline

    Set if normals are defined.

    ◆ SetTexCoords()

    void RWObj_ObjWriterContext::SetTexCoords ( const bool theHasTexCoords)
    inline

    Set if normals are defined.

    ◆ WriteActiveMaterial()

    bool RWObj_ObjWriterContext::WriteActiveMaterial ( const TCollection_AsciiString & theMaterial)

    Set active material.

    ◆ WriteGroup()

    bool RWObj_ObjWriterContext::WriteGroup ( const TCollection_AsciiString & theValue)

    Writing a group name.

    ◆ WriteHeader()

    bool RWObj_ObjWriterContext::WriteHeader ( const int theNbNodes,
    const int theNbElems,
    const TCollection_AsciiString & theMatLib,
    const NCollection_IndexedDataMap< TCollection_AsciiString, TCollection_AsciiString > & theFileInfo )

    Write the header.

    ◆ WriteNormal()

    bool RWObj_ObjWriterContext::WriteNormal ( const NCollection_Vec3< float > & theValue)

    Writing a vector.

    ◆ WriteQuad()

    bool RWObj_ObjWriterContext::WriteQuad ( const NCollection_Vec4< int > & theQuad)

    Writing a quad.

    ◆ WriteTexCoord()

    bool RWObj_ObjWriterContext::WriteTexCoord ( const NCollection_Vec2< float > & theValue)

    Writing a vector.

    ◆ WriteTriangle()

    bool RWObj_ObjWriterContext::WriteTriangle ( const NCollection_Vec3< int > & theTri)

    Writing a triangle.

    ◆ WriteVertex()

    bool RWObj_ObjWriterContext::WriteVertex ( const NCollection_Vec3< float > & theValue)

    Writing a vector.

    Field Documentation

    ◆ NbFaces

    int RWObj_ObjWriterContext::NbFaces

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