API Documentation
Static Public Member Functions | List of all members
nkGraphics::ObjEncoder Class Referencefinal

Allows to work with the Obj format. More...

Static Public Member Functions

static bool canDecode (nkMemory::BufferView<> sources)
 
static DecodedData decode (nkMemory::BufferView<> sources, const ObjDecodeOptions &options=ObjDecodeOptions())
 

Detailed Description

Allows to work with the Obj format.

The encoder only supports decoding for now.

Member Function Documentation

◆ canDecode()

static bool nkGraphics::ObjEncoder::canDecode ( nkMemory::BufferView<>  sources)
static

Checks whether data can be decoded or not.

Parameters
sourcesData to check.
Returns
Whether the data can be decoded using this encoder (true) or not (false).

◆ decode()

static DecodedData nkGraphics::ObjEncoder::decode ( nkMemory::BufferView<>  sources,
const ObjDecodeOptions options = ObjDecodeOptions() 
)
static

Decodes provided data.

Parameters
sourcesData to decode.
optionsThe decoding options to drive how data should be decoded.
Returns
Decoded data.
Remarks
The decoding currently supports groups and objects along with mtl file parsing. Within an mtl files are supported all fields available in the parsed material structures.

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