Polygon Crucher SDK - Documentation
Documentation
Loading...
Searching...
No Matches
Io3dmgr.h File Reference

3D import / export classes definitions More...

Detailed Description

3D import / export classes definitions

#include "IoCommon.h"

Go to the source code of this file.

Classes

class  CSceneImportOptions
 This class is used to provide some specific options when loading scene file. More...
 
class  CSceneExportOptions
 This class is used to provide some specific options when exporting a 3D scene. More...
 
class  C3DIo
 C3DIo class handles reading / writing / updating 3D file. More...
 
class  C3DParser
 Class for reading / writing a specific file format. If is called by C3DIo when extension has been recognized to belong to the parser recognized extension. More...
 

Macros

#define PRIVATE_IO_SPECIFIC_OPTIONS   MAKE_CUSTOM_ID('S', 'P', 'C', 'I')
 
Common import/export options
#define COMMON_IMPORT_COPY_EMBED_TO_DIR   MAKE_CUSTOM_ID('C', 'Y', 'E', 'M')
 String: a path where to copy the embedded textures (use by FBX/SKP/GLTF). When use the embeded media are extracted and not deleted. Otherwise embeded content is extracted on scene opening and deleted when scene is released.
 
#define COMMON_IMPORT_FROM_MEMORY_DATA   MAKE_CUSTOM_ID('I', 'M', 'M', 'D')
 Binary: a memory block containing the data file that is used for parsing (GLTF/SKP). Note, that the filename is required because it defined the memory block format as well as a path that can be useful for textures, or default name.
 
#define COMMON_EXPORT_TO_MEMORY   MAKE_CUSTOM_ID('E', 'X', 'M', 'M')
 Bool: false by default, set to true if you require an export to a memory data block (GLTF). Once output performed, the memory data block can be retrieved thourgh the parser options COMMON_EXPORT_MEMORY_DATA. filename is required as it defined the output format.
 
#define COMMON_EXPORT_MEMORY_DATA   MAKE_CUSTOM_ID('E', 'M', 'M', 'D')
 Binary: a memory data block that is used for parsing the specific file format instead of the provided filename. Note, that the filename is required as it defined the memory block format as well as a a file path that can be used for textures, or default name.
 
GLTF import / export options
#define GLTF_IMPORT_WELD_POINTS   MAKE_CUSTOM_ID('W', 'E', 'L', 'D')
 Bool: weld points at import.
 
#define GLTF_EXPORT_OPTION_EMBEDDED_MEDIA   MAKE_CUSTOM_ID('E', 'M', 'B', 'D')
 Bool: Write optionBoolean options for embedded media. If set to true, GLTF will embed media when writting.
 
#define GLTF_EXPORT_JPEG_COMPRESSION   MAKE_CUSTOM_ID('J', 'G', 'C', 'M')
 UInt: JPEG compression factor.
 
#define GLTF_EXPORT_JPEG_MODE   MAKE_CUSTOM_ID('J', 'G', 'M', 'D')
 UInt: false (0): native texture format, 1 : JPG except if transparencies or normal map, 2: JPG except if normal map, 3 : always Jpeg.
 
Wavefront import / export options
#define OBJ_IO_FILE_ENCODING   MAKE_CUSTOM_ID('W', 'V', 'E', 'N')
 

Functions

void RegisterIOPlugins ()
 
void FreeIOPlugins ()
 

FBX import / export options

#define FBX_EXPORT_OPTION_EMBEDDED_MEDIA   MAKE_CUSTOM_ID('E', 'M', 'B', 'D')
 Bool: Write optionBoolean options for embedded media. If set to true, FBX will embed media when writting.
 
#define FBX_IO_OPTION_PASSWORD   MAKE_CUSTOM_ID('P', 'S', 'W', 'D')
 CXString: String that contains a password to read/write the fbx.
 
#define FBX_EXPORT_OPTION_SAVE_MATID   MAKE_CUSTOM_ID('M', 'T', 'I', 'D')
 Unsigned int: Save material ID in properties (not used)
 
#define FBX_EXPORT_OPTION_FBX_VERSION   MAKE_CUSTOM_ID('F', 'X', 'V', 'S')
 Unsigned int (FbxExportVersion): The fbx target version to use.
 
#define FBX_EXPORT_OPTION_FBX_ASCII   MAKE_CUSTOM_ID('F', 'X', 'I', 'I')
 bool: set to true to export in ASCII
 
#define FBX_EXPORT_CONVERT_MATERIAL_TO_STANDARD   MAKE_CUSTOM_ID('C', 'V', 'S', 'T')
 bool: true convert pbr material to standard material
 
#define FBX_EXPORT_KEEP_PBR_FORMAT   MAKE_CUSTOM_ID('K', 'P', 'P', 'B')
 bool: keep the input PBR format if defined (max or Maya)
 
#define FBX_EXPORT_PBR_FORMAT   MAKE_CUSTOM_ID('C', 'V', 'P', 'B')
 UInt: 0: 3ds max PBR format, 1: Maya PBR format.
 
enum  FbxExportVersion {
  FBX_2010 = 2010 , FBX_2011 = 2011 , FBX_2012 = 2012 , FBX_2013 = 2013 ,
  FBX_2014 = 2014 , FBX_2016 = 2016 , FBX_2018 = 2018 , FBX_2019 = 2019 ,
  FBX_2020 = 2020 , FBX_MOST_RECENT = 0 , FBX_DEFAULT_VERSION = FBX_MOST_RECENT
}
 
typedef enum FbxExportVersion FbxExportVersion
 

JT import / export options

#define JT_IO_OPTION_SIEMENS_ID   MAKE_CUSTOM_ID('S', 'I', 'E', 'M')
 Unsigned Integer that contains a password to register siemens toolkit. If not defined, evaluation scheme is used, meaning that the parser will fails once evaluation period is over.
 
#define JT_IO_OPTION_FLAGS   MAKE_CUSTOM_ID('J', 'T', 'F', 'G')
 Unsigned int : flags for control on import / export, Cf. JTIoFlags.
 
#define JT_IMPORT_OPTION_SPECIFIC_LOD   MAKE_CUSTOM_ID('S', 'L', 'O', 'D')
 Unsigned int : define a specific LOD to load.
 
enum  JTIoFlags {
  JT_UNDEFINED_FLAGS = 0x00 , JT_IMPORT_CONCATENATE = 0x01 , JT_IMPORT_LOAD_LOD = 0x02 , JT_PRIVATE_FLAGS = 0xFF000000 ,
  JT_UPDATE_STORE = 0x01000000 , JT_DO_UPDATE = 0x02000000
}
 
typedef enum JTIoFlags JTIoFlags
 

Sketchup import / export options

#define SKP_IMPORT_TRIANGULATE   MAKE_CUSTOM_ID('T', 'R', 'I', 'A')
 Bool: always uses internal sketchup trianguler.
 
#define SKP_IMPORT_FORCE_AFFINE_UV   MAKE_CUSTOM_ID('A', 'F', 'U', 'V')
 Bool: true by default - Reduce the number of texture by considering that all transformation are affine. Provide the parameter with false to get an accurate projection which might result in a large texture file amount.
 
#define SKP_IMPORT_FORCE_TEXTURE_FORMAT   MAKE_CUSTOM_ID('T', 'X', 'T', 'F')
 Unsigned int: 0 (default): native sketchup texture format. 1: texture are converted to PNG format. 2: Texture are converted to JPG format (transparency loss)
 
#define SKP_IMPORT_COLLAPSE_LIVECOMPONENT   MAKE_CUSTOM_ID('L', 'V', 'C', 'L')
 Bool: Concatenate live component sub hierarchy to a single node.
 
#define SKP_IMPORT_COLLAPSE_DEFINITION   MAKE_CUSTOM_ID('S', 'M', 'Y', 'D')
 Bool: collapse definition.
 
#define SKP_IMPORT_COLLAPSE_GROUP   MAKE_CUSTOM_ID('S', 'M', 'Y', 'G')
 Bool: collapse group.
 
#define SKP_IMPORT_SKIP_CURVE   MAKE_CUSTOM_ID('S', 'K', 'C', 'R')
 Bool: skip curves.
 
#define SKP_IMPORT_TRACK_SKPID   MAKE_CUSTOM_ID('S', 'K', 'T', 'K')
 Bool: track skp ids to know what id is in mootools object.
 
#define SKP_EXPORT_VERSION   MAKE_CUSTOM_ID('S', 'K', 'V', 'R')
 UInt: version to export:
 
enum  SkpExportVersion {
  SKP_2013 = 2013 , SKP_2014 = 2014 , SKP_2015 = 2015 , SKP_2016 = 2016 ,
  SKP_2017 = 2017 , SKP_2018 = 2018 , SKP_2019 = 2019 , SKP_2020 = 2020 ,
  SKP_2021 = 2021 , SKP_MOST_RECENT = 0 , SKP_DEFAULT_VERSION = SKP_MOST_RECENT
}
 
typedef enum SkpExportVersion SkpExportVersion
 

Enumeration Type Documentation

◆ FbxExportVersion

Defines the FBX file version to use with FBX_EXPORT_OPTION_FBX_VERSION

Enumerator
FBX_MOST_RECENT 

The native fbx version of the Fbx SDK.

◆ JTIoFlags

Use these flags to keep control on the JT import / export process using settings JT_IO_FLAGS through CSceneExportOptions::GetData / CSceneImportOptions::GetData

Enumerator
JT_IMPORT_CONCATENATE 

Concatenate meshes that are part of the same assembly.

JT_IMPORT_LOAD_LOD 

Load a specific lod meshes, which is defined by JT_IO_SPECIFIC_LOD.

◆ SkpExportVersion

Defines the Sketchup file version to use with SKP_EXPORT_VERSION