Hide menu
Loading...
Searching...
No Matches
cadex::OBJ_Writer Class Reference

Writes Waverfront OBJ files. More...

#include <cadex/OBJ_Writer.hxx>

Inheritance diagram for cadex::OBJ_Writer:
cadex::Base_Writer

Public Member Functions

 OBJ_Writer ()
 
const OBJ_WriterParametersParameters () const
 Returns parameters.
 
OBJ_WriterParametersParameters ()
 Returns parameters.
 
- Public Member Functions inherited from cadex::Base_Writer
 ~Base_Writer ()
 Destructor.
 
bool Transfer (const ModelData_Model &theModel)
 Converts source model into memory representation of the target file.
 
bool Transfer (const ModelData_BIMModel &theModel)
 Converts source model into memory representation of the target file.
 
bool Transfer (const TopoDS_Shape &theShape)
 Converts source shape into memory representation of the target file.
 
bool WriteFile (const Base_UTF16String &theFileName)
 Writes contents to a target file.
 
bool WriteFile (std::ostream &theStream)
 Writes contents to a target stream.
 
Base_ProgressStatusProgressStatus () const
 Returns a progress status.
 
Base_WriterStatistics Statistics () const
 Returns an object containing information about export process.
 
internal::Base_Writer_Private * Impl () const
 
template<typename T >
T * Impl () const
 Reserved for internal use.
 

Additional Inherited Members

- Protected Member Functions inherited from cadex::Base_Writer
 Base_Writer (internal::Base_Writer_Private *theImpl)
 Constructor.
 

Detailed Description

Writes Waverfront OBJ files.

Refer to OBJ Converter.

Warning
WriteFile() overload accepting a stream cannot be used. Instead, use the overload accepting a file name.

The following example demonstrates using OBJ_Writer:

#include <cadex/OBJ_WriterParameters.hxx>
using namespace cadex;
OBJ_Writer aWriter;
OBJ_WriterParameters& aParam = aWriter.Parameters();
aParam.SaveNormals() = false;
aParam.ToGenerateMtlFile() = false;
if (aWriter.Transfer (aModel) && aWriter.WriteFile ("myfile.obj")) {
//OK
}
bool WriteFile(const Base_UTF16String &theFileName)
Writes contents to a target file.
Definition: Base_Writer.cxx:265
bool Transfer(const ModelData_Model &theModel)
Converts source model into memory representation of the target file.
Definition: Base_Writer.cxx:117
Writes Waverfront OBJ files.
Definition: OBJ_Writer.hxx:29
const OBJ_WriterParameters & Parameters() const
Returns parameters.
Definition: OBJ_Writer.cxx:167
Defines parameters of the OBJ writer.
Definition: OBJ_WriterParameters.hxx:27
bool ToGenerateMtlFile() const
Returns true if the write should generates a separate .mtl file.
Definition: OBJ_WriterParameters.cxx:90
Defines classes, types, and global functions related to CAD Exchanger.
Definition: A3DSTestLib.hxx:22
Examples
conversion/export/Program.cs, and conversion/export/main.cxx.

Constructor & Destructor Documentation

◆ OBJ_Writer()

cadex::OBJ_Writer::OBJ_Writer ( )

Constructor.

Exceptions
LicenseManager_LicenseErrorif no OBJ license was activated.